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
... ...
@@ -819,8 +870,8 @@ SIP Presence (and RLS, XCAP, etc) support for Kamailio.
819 870
 %package    python
820 871
 Summary:    Python extensions for Kamailio
821 872
 Group:      %{PKGGROUP}
822
-Requires:   python, kamailio = %ver
823
-BuildRequires:  python, python-devel
873
+Requires:   python2, kamailio = %ver
874
+BuildRequires:  python2, python2-devel
824 875
 %if %{with python3}
825 876
 %if 0%{?rhel} == 7
826 877
 Requires:   python36, kamailio = %ver
... ...
@@ -830,9 +881,6 @@ Requires:   python3, kamailio = %ver
830 881
 BuildRequires:  python3, python3-devel
831 882
 %endif
832 883
 %endif
833
-%if 0%{?fedora}
834
-BuildRequires:  python2-devel
835
-%endif
836 884
 
837 885
 %description    python
838 886
 Python extensions for Kamailio.
... ...
@@ -854,7 +902,7 @@ RabbitMQ module for Kamailio.
854 902
 Summary:    RADIUS modules for Kamailio
855 903
 Group:      %{PKGGROUP}
856 904
 Requires:   kamailio = %ver
857
-%if 0%{?fedora} || 0%{?suse_version}
905
+%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} == 8
858 906
 Requires:   freeradius-client
859 907
 BuildRequires:  freeradius-client-devel
860 908
 %else
... ...
@@ -997,8 +1045,8 @@ Send commands to statsd server.
997 1045
 %package        sqlang
998 1046
 Summary:        Squirrel Language (SQLang) for Kamailio
999 1047
 Group:          %{PKGGROUP}
1000
-Requires:       squirrel-libs, kamailio = %version
1001
-BuildRequires:  squirrel-devel gcc-c++
1048
+Requires:       kamailio = %version
1049
+BuildRequires:  gcc-c++
1002 1050
 
1003 1051
 %description    sqlang
1004 1052
 app_sqlang module for Kamailio.
... ...
@@ -1151,10 +1199,9 @@ UUID module for Kamailio.
1151 1199
     sed -i -e 's:#!/usr/bin/python:#!%{__python2}:' utils/kamctl/dbtextdb/dbtextdb.py
1152 1200
 %endif
1153 1201
 
1154
-
1155 1202
 %build
1156 1203
 ln -s ../obs pkg/kamailio/%{dist_name}/%{dist_version}
1157
-%if 0%{?fedora} || 0%{?suse_version}
1204
+%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} == 8
1158 1205
 export FREERADIUS=1
1159 1206
 %endif
1160 1207
 make cfg prefix=/usr \
... ...
@@ -1166,7 +1213,7 @@ make cfg prefix=/usr \
1166 1213
 make
1167 1214
 make every-module skip_modules="app_mono db_cassandra db_oracle iptrtpproxy \
1168 1215
     jabber ndb_cassandra osp" \
1169
-%if 0%{?fedora} || 0%{?suse_version}
1216
+%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} == 8
1170 1217
     FREERADIUS=1 \
1171 1218
 %endif
1172 1219
     group_include="kstandard kautheph kberkeley kcarrierroute \
... ...
@@ -1250,7 +1297,7 @@ rm -rf %{buildroot}
1250 1297
 make install
1251 1298
 make install-modules-all skip_modules="app_mono db_cassandra db_oracle \
1252 1299
     iptrtpproxy jabber osp" \
1253
-%if 0%{?fedora} || 0%{?suse_version}
1300
+%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} == 8
1254 1301
     FREERADIUS=1 \
1255 1302
 %endif
1256 1303
     group_include="kstandard kautheph kberkeley kcarrierroute \
... ...
@@ -1360,7 +1407,7 @@ install -m644 pkg/kamailio/%{dist_name}/%{dist_version}/sipcapture.sysconfig \
1360 1407
 %if 0%{?suse_version}
1361 1408
 %py_compile -O %{buildroot}%{_libdir}/kamailio/kamctl/dbtextdb
1362 1409
 %endif
1363
-%if 0%{?fedora}
1410
+%if 0%{?fedora} || 0%{?rhel} == 8
1364 1411
 %py_byte_compile %{__python2} %{buildroot}%{_libdir}/kamailio/kamctl/dbtextdb
1365 1412
 %endif
1366 1413