Browse code

pkg/kamailio/obs: added packaging for RHEL 8 and for CentOS 8 dists GH #2078 [skip ci]

(cherry picked from commit a3ce062fdec2d3a5d5e46f49c9d0ea9d449a1bec)

Sergey Safarov authored on 24/10/2019 11:19:32
Showing 1 changed files
... ...
@@ -203,6 +203,32 @@
203 203
 %bcond_without xmlrpc
204 204
 %endif
205 205
 
206
+%if 0%{?centos_ver} == 8
207
+%define dist_name centos
208
+%define dist_version %{?centos}
209
+%define dist .el8.centos
210
+%bcond_with cnxcc
211
+%bcond_with dnssec
212
+%bcond_with geoip
213
+%bcond_without http_async_client
214
+%bcond_without ims
215
+%bcond_without jansson
216
+%bcond_without json
217
+%bcond_without lua
218
+%bcond_without kazoo
219
+%bcond_without memcached
220
+%bcond_without mongodb
221
+%bcond_without perl
222
+%bcond_with phonenum
223
+%bcond_without python3
224
+%bcond_without rabbitmq
225
+%bcond_with redis
226
+%bcond_without ruby
227
+%bcond_without sctp
228
+%bcond_without websocket
229
+%bcond_without xmlrpc
230
+%endif
231
+
206 232
 %if 0%{?suse_version}
207 233
 %define dist_name opensuse
208 234
 %define dist_version %{?suse_version}
... ...
@@ -278,6 +304,31 @@
278 304
 %bcond_without xmlrpc
279 305
 %endif
280 306
 
307
+%if 0%{?rhel} == 8 && 0%{?centos_ver} != 8
308
+%define dist_name rhel
309
+%define dist_version %{?rhel}
310
+%bcond_with cnxcc
311
+%bcond_with dnssec
312
+%bcond_with geoip
313
+%bcond_with http_async_client
314
+%bcond_with ims
315
+%bcond_with jansson
316
+%bcond_with json
317
+%bcond_with lua
318
+%bcond_with kazoo
319
+%bcond_with memcached
320
+%bcond_without mongodb
321
+%bcond_without perl
322
+%bcond_with phonenum
323
+%bcond_with python3
324
+%bcond_with rabbitmq
325
+%bcond_with redis
326
+%bcond_with ruby
327
+%bcond_with sctp
328
+%bcond_with websocket
329
+%bcond_without xmlrpc
330
+%endif
331
+
281 332
 # Defining missing macros on RHEL/CentOS 6
282 333
 %if 0%{?rhel} == 6
283 334
 %define _rundir %{_localstatedir}/run
... ...
@@ -827,8 +878,8 @@ SIP Presence (and RLS, XCAP, etc) support for Kamailio.
827 878
 %package    python
828 879
 Summary:    Python extensions for Kamailio
829 880
 Group:      %{PKGGROUP}
830
-Requires:   python, kamailio = %ver
831
-BuildRequires:  python, python-devel
881
+Requires:   python2, kamailio = %ver
882
+BuildRequires:  python2, python2-devel
832 883
 %if %{with python3}
833 884
 %if 0%{?rhel} == 7
834 885
 Requires:   python36, kamailio = %ver
... ...
@@ -838,9 +889,6 @@ Requires:   python3, kamailio = %ver
838 889
 BuildRequires:  python3, python3-devel
839 890
 %endif
840 891
 %endif
841
-%if 0%{?fedora}
842
-BuildRequires:  python2-devel
843
-%endif
844 892
 
845 893
 %description    python
846 894
 Python extensions for Kamailio.
... ...
@@ -862,7 +910,7 @@ RabbitMQ module for Kamailio.
862 910
 Summary:    RADIUS modules for Kamailio
863 911
 Group:      %{PKGGROUP}
864 912
 Requires:   kamailio = %ver
865
-%if 0%{?fedora} || 0%{?suse_version}
913
+%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} == 8
866 914
 Requires:   freeradius-client
867 915
 BuildRequires:  freeradius-client-devel
868 916
 %else
... ...
@@ -1014,8 +1062,8 @@ Send commands to statsd server.
1014 1062
 %package        sqlang
1015 1063
 Summary:        Squirrel Language (SQLang) for Kamailio
1016 1064
 Group:          %{PKGGROUP}
1017
-Requires:       squirrel-libs, kamailio = %version
1018
-BuildRequires:  squirrel-devel gcc-c++
1065
+Requires:       kamailio = %version
1066
+BuildRequires:  gcc-c++
1019 1067
 
1020 1068
 %description    sqlang
1021 1069
 app_sqlang module for Kamailio.
... ...
@@ -1168,10 +1216,9 @@ UUID module for Kamailio.
1168 1216
     sed -i -e 's:#!/usr/bin/python:#!%{__python2}:' utils/kamctl/dbtextdb/dbtextdb.py
1169 1217
 %endif
1170 1218
 
1171
-
1172 1219
 %build
1173 1220
 ln -s ../obs pkg/kamailio/%{dist_name}/%{dist_version}
1174
-%if 0%{?fedora} || 0%{?suse_version}
1221
+%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} == 8
1175 1222
 export FREERADIUS=1
1176 1223
 %endif
1177 1224
 make cfg prefix=/usr \
... ...
@@ -1183,7 +1230,7 @@ make cfg prefix=/usr \
1183 1230
 make
1184 1231
 make every-module skip_modules="app_mono db_cassandra db_oracle iptrtpproxy \
1185 1232
     jabber ndb_cassandra osp" \
1186
-%if 0%{?fedora} || 0%{?suse_version}
1233
+%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} == 8
1187 1234
     FREERADIUS=1 \
1188 1235
 %endif
1189 1236
     group_include="kstandard kautheph kberkeley kcarrierroute \
... ...
@@ -1267,7 +1314,7 @@ rm -rf %{buildroot}
1267 1314
 make install
1268 1315
 make install-modules-all skip_modules="app_mono db_cassandra db_oracle \
1269 1316
     iptrtpproxy jabber osp" \
1270
-%if 0%{?fedora} || 0%{?suse_version}
1317
+%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} == 8
1271 1318
     FREERADIUS=1 \
1272 1319
 %endif
1273 1320
     group_include="kstandard kautheph kberkeley kcarrierroute \
... ...
@@ -1377,7 +1424,7 @@ install -m644 pkg/kamailio/%{dist_name}/%{dist_version}/sipcapture.sysconfig \
1377 1424
 %if 0%{?suse_version}
1378 1425
 %py_compile -O %{buildroot}%{_libdir}/kamailio/kamctl/dbtextdb
1379 1426
 %endif
1380
-%if 0%{?fedora}
1427
+%if 0%{?fedora} || 0%{?rhel} == 8
1381 1428
 %py_byte_compile %{__python2} %{buildroot}%{_libdir}/kamailio/kamctl/dbtextdb
1382 1429
 %endif
1383 1430