Browse Source

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

Sergey Safarov 5 years ago
parent
commit
a3ce062fde
1 changed files with 60 additions and 13 deletions
  1. 60 13
      pkg/kamailio/obs/kamailio.spec

+ 60 - 13
pkg/kamailio/obs/kamailio.spec

@@ -203,6 +203,32 @@
 %bcond_without xmlrpc
 %bcond_without xmlrpc
 %endif
 %endif
 
 
+%if 0%{?centos_ver} == 8
+%define dist_name centos
+%define dist_version %{?centos}
+%define dist .el8.centos
+%bcond_with cnxcc
+%bcond_with dnssec
+%bcond_with geoip
+%bcond_without http_async_client
+%bcond_without ims
+%bcond_without jansson
+%bcond_without json
+%bcond_without lua
+%bcond_without kazoo
+%bcond_without memcached
+%bcond_without mongodb
+%bcond_without perl
+%bcond_with phonenum
+%bcond_without python3
+%bcond_without rabbitmq
+%bcond_with redis
+%bcond_without ruby
+%bcond_without sctp
+%bcond_without websocket
+%bcond_without xmlrpc
+%endif
+
 %if 0%{?suse_version}
 %if 0%{?suse_version}
 %define dist_name opensuse
 %define dist_name opensuse
 %define dist_version %{?suse_version}
 %define dist_version %{?suse_version}
@@ -278,6 +304,31 @@
 %bcond_without xmlrpc
 %bcond_without xmlrpc
 %endif
 %endif
 
 
+%if 0%{?rhel} == 8 && 0%{?centos_ver} != 8
+%define dist_name rhel
+%define dist_version %{?rhel}
+%bcond_with cnxcc
+%bcond_with dnssec
+%bcond_with geoip
+%bcond_with http_async_client
+%bcond_with ims
+%bcond_with jansson
+%bcond_with json
+%bcond_with lua
+%bcond_with kazoo
+%bcond_with memcached
+%bcond_without mongodb
+%bcond_without perl
+%bcond_with phonenum
+%bcond_with python3
+%bcond_with rabbitmq
+%bcond_with redis
+%bcond_with ruby
+%bcond_with sctp
+%bcond_with websocket
+%bcond_without xmlrpc
+%endif
+
 # Defining missing macros on RHEL/CentOS 6
 # Defining missing macros on RHEL/CentOS 6
 %if 0%{?rhel} == 6
 %if 0%{?rhel} == 6
 %define _rundir %{_localstatedir}/run
 %define _rundir %{_localstatedir}/run
@@ -827,8 +878,8 @@ SIP Presence (and RLS, XCAP, etc) support for Kamailio.
 %package    python
 %package    python
 Summary:    Python extensions for Kamailio
 Summary:    Python extensions for Kamailio
 Group:      %{PKGGROUP}
 Group:      %{PKGGROUP}
-Requires:   python, kamailio = %ver
-BuildRequires:  python, python-devel
+Requires:   python2, kamailio = %ver
+BuildRequires:  python2, python2-devel
 %if %{with python3}
 %if %{with python3}
 %if 0%{?rhel} == 7
 %if 0%{?rhel} == 7
 Requires:   python36, kamailio = %ver
 Requires:   python36, kamailio = %ver
@@ -838,9 +889,6 @@ Requires:   python3, kamailio = %ver
 BuildRequires:  python3, python3-devel
 BuildRequires:  python3, python3-devel
 %endif
 %endif
 %endif
 %endif
-%if 0%{?fedora}
-BuildRequires:  python2-devel
-%endif
 
 
 %description    python
 %description    python
 Python extensions for Kamailio.
 Python extensions for Kamailio.
@@ -862,7 +910,7 @@ RabbitMQ module for Kamailio.
 Summary:    RADIUS modules for Kamailio
 Summary:    RADIUS modules for Kamailio
 Group:      %{PKGGROUP}
 Group:      %{PKGGROUP}
 Requires:   kamailio = %ver
 Requires:   kamailio = %ver
-%if 0%{?fedora} || 0%{?suse_version}
+%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} == 8
 Requires:   freeradius-client
 Requires:   freeradius-client
 BuildRequires:  freeradius-client-devel
 BuildRequires:  freeradius-client-devel
 %else
 %else
@@ -1014,8 +1062,8 @@ Send commands to statsd server.
 %package        sqlang
 %package        sqlang
 Summary:        Squirrel Language (SQLang) for Kamailio
 Summary:        Squirrel Language (SQLang) for Kamailio
 Group:          %{PKGGROUP}
 Group:          %{PKGGROUP}
-Requires:       squirrel-libs, kamailio = %version
-BuildRequires:  squirrel-devel gcc-c++
+Requires:       kamailio = %version
+BuildRequires:  gcc-c++
 
 
 %description    sqlang
 %description    sqlang
 app_sqlang module for Kamailio.
 app_sqlang module for Kamailio.
@@ -1168,10 +1216,9 @@ UUID module for Kamailio.
     sed -i -e 's:#!/usr/bin/python:#!%{__python2}:' utils/kamctl/dbtextdb/dbtextdb.py
     sed -i -e 's:#!/usr/bin/python:#!%{__python2}:' utils/kamctl/dbtextdb/dbtextdb.py
 %endif
 %endif
 
 
-
 %build
 %build
 ln -s ../obs pkg/kamailio/%{dist_name}/%{dist_version}
 ln -s ../obs pkg/kamailio/%{dist_name}/%{dist_version}
-%if 0%{?fedora} || 0%{?suse_version}
+%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} == 8
 export FREERADIUS=1
 export FREERADIUS=1
 %endif
 %endif
 make cfg prefix=/usr \
 make cfg prefix=/usr \
@@ -1183,7 +1230,7 @@ make cfg prefix=/usr \
 make
 make
 make every-module skip_modules="app_mono db_cassandra db_oracle iptrtpproxy \
 make every-module skip_modules="app_mono db_cassandra db_oracle iptrtpproxy \
     jabber ndb_cassandra osp" \
     jabber ndb_cassandra osp" \
-%if 0%{?fedora} || 0%{?suse_version}
+%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} == 8
     FREERADIUS=1 \
     FREERADIUS=1 \
 %endif
 %endif
     group_include="kstandard kautheph kberkeley kcarrierroute \
     group_include="kstandard kautheph kberkeley kcarrierroute \
@@ -1267,7 +1314,7 @@ rm -rf %{buildroot}
 make install
 make install
 make install-modules-all skip_modules="app_mono db_cassandra db_oracle \
 make install-modules-all skip_modules="app_mono db_cassandra db_oracle \
     iptrtpproxy jabber osp" \
     iptrtpproxy jabber osp" \
-%if 0%{?fedora} || 0%{?suse_version}
+%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} == 8
     FREERADIUS=1 \
     FREERADIUS=1 \
 %endif
 %endif
     group_include="kstandard kautheph kberkeley kcarrierroute \
     group_include="kstandard kautheph kberkeley kcarrierroute \
@@ -1377,7 +1424,7 @@ install -m644 pkg/kamailio/%{dist_name}/%{dist_version}/sipcapture.sysconfig \
 %if 0%{?suse_version}
 %if 0%{?suse_version}
 %py_compile -O %{buildroot}%{_libdir}/kamailio/kamctl/dbtextdb
 %py_compile -O %{buildroot}%{_libdir}/kamailio/kamctl/dbtextdb
 %endif
 %endif
-%if 0%{?fedora}
+%if 0%{?fedora} || 0%{?rhel} == 8
 %py_byte_compile %{__python2} %{buildroot}%{_libdir}/kamailio/kamctl/dbtextdb
 %py_byte_compile %{__python2} %{buildroot}%{_libdir}/kamailio/kamctl/dbtextdb
 %endif
 %endif