|
@@ -93,8 +93,8 @@
|
|
%bcond_without xmlrpc
|
|
%bcond_without xmlrpc
|
|
%endif
|
|
%endif
|
|
|
|
|
|
-%if 0%{?leap_version}
|
|
|
|
-%define dist_name suse
|
|
|
|
|
|
+%if 0%{?suse_version}
|
|
|
|
+%define dist_name opensuse
|
|
%define dist_version %{?suse_version}
|
|
%define dist_version %{?suse_version}
|
|
%bcond_without cnxcc
|
|
%bcond_without cnxcc
|
|
%bcond_with dnssec
|
|
%bcond_with dnssec
|
|
@@ -178,7 +178,7 @@ Conflicts: kamailio-xhttp-pi < %ver, kamailio-xmlops < %ver
|
|
Conflicts: kamailio-xmlrpc < %ver, kamailio-xmpp < %ver
|
|
Conflicts: kamailio-xmlrpc < %ver, kamailio-xmpp < %ver
|
|
Conflicts: kamailio-uuid < %ver
|
|
Conflicts: kamailio-uuid < %ver
|
|
BuildRequires: bison, flex
|
|
BuildRequires: bison, flex
|
|
-%if 0%{?leap_version}
|
|
|
|
|
|
+%if 0%{?suse_version}
|
|
BuildRequires: systemd-mini, shadow
|
|
BuildRequires: systemd-mini, shadow
|
|
%endif
|
|
%endif
|
|
|
|
|
|
@@ -218,7 +218,7 @@ Functions for authentication using shared keys.
|
|
Summary: Berkeley database connectivity for Kamailio
|
|
Summary: Berkeley database connectivity for Kamailio
|
|
Group: System Environment/Daemons
|
|
Group: System Environment/Daemons
|
|
Requires: kamailio = %ver
|
|
Requires: kamailio = %ver
|
|
-%if 0%{?leap_version}
|
|
|
|
|
|
+%if 0%{?suse_version}
|
|
Requires: libdb-4_8
|
|
Requires: libdb-4_8
|
|
BuildRequires: libdb-4_8-devel
|
|
BuildRequires: libdb-4_8-devel
|
|
%else
|
|
%else
|
|
@@ -234,7 +234,7 @@ Berkeley database connectivity for Kamailio.
|
|
Summary: The carrierroute module for Kamailio
|
|
Summary: The carrierroute module for Kamailio
|
|
Group: System Environment/Daemons
|
|
Group: System Environment/Daemons
|
|
Requires: kamailio = %ver
|
|
Requires: kamailio = %ver
|
|
-%if 0%{?leap_version}
|
|
|
|
|
|
+%if 0%{?suse_version}
|
|
Requires: libconfuse0
|
|
Requires: libconfuse0
|
|
BuildRequires: libconfuse-devel
|
|
BuildRequires: libconfuse-devel
|
|
%else
|
|
%else
|
|
@@ -293,7 +293,7 @@ BuildRequires: openssl-devel
|
|
Requires: openssl-libs
|
|
Requires: openssl-libs
|
|
BuildRequires: openssl-devel
|
|
BuildRequires: openssl-devel
|
|
%endif
|
|
%endif
|
|
-%if 0%{?leap_version}
|
|
|
|
|
|
+%if 0%{?suse_version}
|
|
Requires: libopenssl1_0_0
|
|
Requires: libopenssl1_0_0
|
|
BuildRequires: libopenssl-devel
|
|
BuildRequires: libopenssl-devel
|
|
%endif
|
|
%endif
|
|
@@ -361,7 +361,7 @@ Summary: Async HTTP client module for Kamailio
|
|
Group: System Environment/Daemons
|
|
Group: System Environment/Daemons
|
|
Requires: libevent, kamailio = %ver
|
|
Requires: libevent, kamailio = %ver
|
|
BuildRequires: libevent-devel
|
|
BuildRequires: libevent-devel
|
|
-%if 0%{?leap_version}
|
|
|
|
|
|
+%if 0%{?suse_version}
|
|
Requires: libcurl4
|
|
Requires: libcurl4
|
|
BuildRequires: libcurl-devel
|
|
BuildRequires: libcurl-devel
|
|
%else
|
|
%else
|
|
@@ -377,7 +377,7 @@ This module implements protocol functions that use the libcurl to communicate wi
|
|
Summary: HTTP client module for Kamailio
|
|
Summary: HTTP client module for Kamailio
|
|
Group: System Environment/Daemons
|
|
Group: System Environment/Daemons
|
|
Requires: kamailio = %ver
|
|
Requires: kamailio = %ver
|
|
-%if 0%{?leap_version}
|
|
|
|
|
|
+%if 0%{?suse_version}
|
|
Requires: libcurl4, libxml2-tools
|
|
Requires: libcurl4, libxml2-tools
|
|
BuildRequires: libcurl-devel, libxml2-devel
|
|
BuildRequires: libcurl-devel, libxml2-devel
|
|
%else
|
|
%else
|
|
@@ -404,7 +404,7 @@ IMS modules and extensions module for Kamailio.
|
|
Summary: JSON string handling and RPC modules for Kamailio using JANSSON library
|
|
Summary: JSON string handling and RPC modules for Kamailio using JANSSON library
|
|
Group: System Environment/Daemons
|
|
Group: System Environment/Daemons
|
|
Requires: libevent, kamailio = %ver
|
|
Requires: libevent, kamailio = %ver
|
|
-%if 0%{?leap_version}
|
|
|
|
|
|
+%if 0%{?suse_version}
|
|
Requires: libjson-c2
|
|
Requires: libjson-c2
|
|
BuildRequires: libjansson-devel
|
|
BuildRequires: libjansson-devel
|
|
%else
|
|
%else
|
|
@@ -423,7 +423,7 @@ Summary: JSON string handling and RPC modules for Kamailio
|
|
Group: System Environment/Daemons
|
|
Group: System Environment/Daemons
|
|
Requires: libevent, kamailio = %ver
|
|
Requires: libevent, kamailio = %ver
|
|
BuildRequires: libevent-devel
|
|
BuildRequires: libevent-devel
|
|
-%if 0%{?leap_version}
|
|
|
|
|
|
+%if 0%{?suse_version}
|
|
Requires: libjson-c2
|
|
Requires: libjson-c2
|
|
BuildRequires: libjson-c-devel
|
|
BuildRequires: libjson-c-devel
|
|
%else
|
|
%else
|
|
@@ -462,7 +462,7 @@ Least cost routing for Kamailio.
|
|
Summary: LDAP search interface for Kamailio
|
|
Summary: LDAP search interface for Kamailio
|
|
Group: System Environment/Daemons
|
|
Group: System Environment/Daemons
|
|
Requires: kamailio = %ver
|
|
Requires: kamailio = %ver
|
|
-%if 0%{?leap_version}
|
|
|
|
|
|
+%if 0%{?suse_version}
|
|
Requires: openldap2 libsasl2-3
|
|
Requires: openldap2 libsasl2-3
|
|
BuildRequires: openldap2-devel cyrus-sasl-devel
|
|
BuildRequires: openldap2-devel cyrus-sasl-devel
|
|
%else
|
|
%else
|
|
@@ -512,7 +512,7 @@ Summary: MySQL database connectivity for Kamailio
|
|
Group: System Environment/Daemons
|
|
Group: System Environment/Daemons
|
|
Requires: kamailio = %ver
|
|
Requires: kamailio = %ver
|
|
BuildRequires: zlib-devel
|
|
BuildRequires: zlib-devel
|
|
-%if 0%{?leap_version}
|
|
|
|
|
|
+%if 0%{?suse_version}
|
|
Requires: libmysqlclient18
|
|
Requires: libmysqlclient18
|
|
BuildRequires: libmysqlclient-devel
|
|
BuildRequires: libmysqlclient-devel
|
|
%else
|
|
%else
|
|
@@ -540,7 +540,7 @@ Protocol (SIP)" support for Kamailio.
|
|
Summary: Perl extensions and database driver for Kamailio
|
|
Summary: Perl extensions and database driver for Kamailio
|
|
Group: System Environment/Daemons
|
|
Group: System Environment/Daemons
|
|
Requires: kamailio = %ver
|
|
Requires: kamailio = %ver
|
|
-%if 0%{?leap_version}
|
|
|
|
|
|
+%if 0%{?suse_version}
|
|
Requires: perl
|
|
Requires: perl
|
|
BuildRequires: perl
|
|
BuildRequires: perl
|
|
%else
|
|
%else
|
|
@@ -557,7 +557,7 @@ Perl extensions and database driver for Kamailio.
|
|
Summary: PostgreSQL database connectivity for Kamailio
|
|
Summary: PostgreSQL database connectivity for Kamailio
|
|
Group: System Environment/Daemons
|
|
Group: System Environment/Daemons
|
|
Requires: kamailio = %ver
|
|
Requires: kamailio = %ver
|
|
-%if 0%{?leap_version}
|
|
|
|
|
|
+%if 0%{?suse_version}
|
|
Requires: libpq5
|
|
Requires: libpq5
|
|
BuildRequires: postgresql-devel
|
|
BuildRequires: postgresql-devel
|
|
%else
|
|
%else
|
|
@@ -574,7 +574,7 @@ Summary: SIP Presence (and RLS, XCAP, etc) support for Kamailio
|
|
Group: System Environment/Daemons
|
|
Group: System Environment/Daemons
|
|
Requires: libxml2, kamailio = %ver, kamailio-xmpp = %ver
|
|
Requires: libxml2, kamailio = %ver, kamailio-xmpp = %ver
|
|
BuildRequires: libxml2-devel
|
|
BuildRequires: libxml2-devel
|
|
-%if 0%{?leap_version}
|
|
|
|
|
|
+%if 0%{?suse_version}
|
|
Requires: libcurl4
|
|
Requires: libcurl4
|
|
BuildRequires: libcurl-devel
|
|
BuildRequires: libcurl-devel
|
|
%else
|
|
%else
|
|
@@ -600,7 +600,7 @@ Python extensions for Kamailio.
|
|
Summary: RADIUS modules for Kamailio
|
|
Summary: RADIUS modules for Kamailio
|
|
Group: System Environment/Daemons
|
|
Group: System Environment/Daemons
|
|
Requires: kamailio = %ver
|
|
Requires: kamailio = %ver
|
|
-%if 0%{?fedora} || 0%{?leap_version}
|
|
|
|
|
|
+%if 0%{?fedora} || 0%{?suse_version}
|
|
Requires: freeradius-client
|
|
Requires: freeradius-client
|
|
BuildRequires: freeradius-client-devel
|
|
BuildRequires: freeradius-client-devel
|
|
%else
|
|
%else
|
|
@@ -668,7 +668,7 @@ This module collects the Transformations for 3GPP-SMS.
|
|
Summary: SNMP management interface (scalar statistics) for Kamailio
|
|
Summary: SNMP management interface (scalar statistics) for Kamailio
|
|
Group: System Environment/Daemons
|
|
Group: System Environment/Daemons
|
|
Requires: kamailio = %ver
|
|
Requires: kamailio = %ver
|
|
-%if 0%{?leap_version}
|
|
|
|
|
|
+%if 0%{?suse_version}
|
|
Requires: libsnmp30
|
|
Requires: libsnmp30
|
|
BuildRequires: net-snmp-devel
|
|
BuildRequires: net-snmp-devel
|
|
%else
|
|
%else
|
|
@@ -751,7 +751,7 @@ Summary: Non-SIP utitility functions for Kamailio
|
|
Group: System Environment/Daemons
|
|
Group: System Environment/Daemons
|
|
Requires: libxml2, kamailio = %ver
|
|
Requires: libxml2, kamailio = %ver
|
|
BuildRequires: libxml2-devel
|
|
BuildRequires: libxml2-devel
|
|
-%if 0%{?leap_version}
|
|
|
|
|
|
+%if 0%{?suse_version}
|
|
Requires: libcurl4
|
|
Requires: libcurl4
|
|
BuildRequires: libcurl-devel
|
|
BuildRequires: libcurl-devel
|
|
%else
|
|
%else
|
|
@@ -812,7 +812,7 @@ XMLRPC transport and encoding for Kamailio RPCs and MI commands.
|
|
Summary: SIP/XMPP IM gateway for Kamailio
|
|
Summary: SIP/XMPP IM gateway for Kamailio
|
|
Group: System Environment/Daemons
|
|
Group: System Environment/Daemons
|
|
Requires: kamailio = %ver
|
|
Requires: kamailio = %ver
|
|
-%if 0%{?leap_version}
|
|
|
|
|
|
+%if 0%{?suse_version}
|
|
Requires: libexpat1
|
|
Requires: libexpat1
|
|
BuildRequires: libexpat-devel
|
|
BuildRequires: libexpat-devel
|
|
%else
|
|
%else
|
|
@@ -828,7 +828,7 @@ SIP/XMPP IM gateway for Kamailio.
|
|
Summary: UUID generator for Kamailio
|
|
Summary: UUID generator for Kamailio
|
|
Group: System Environment/Daemons
|
|
Group: System Environment/Daemons
|
|
Requires: kamailio = %ver
|
|
Requires: kamailio = %ver
|
|
-%if 0%{?leap_version}
|
|
|
|
|
|
+%if 0%{?suse_version}
|
|
Requires: libuuid1
|
|
Requires: libuuid1
|
|
BuildRequires: libuuid-devel
|
|
BuildRequires: libuuid-devel
|
|
%else
|
|
%else
|
|
@@ -849,8 +849,9 @@ ln -s ../obs pkg/kamailio/fedora/26
|
|
mkdir -p pkg/kamailio/rhel
|
|
mkdir -p pkg/kamailio/rhel
|
|
ln -s ../obs pkg/kamailio/rhel/6
|
|
ln -s ../obs pkg/kamailio/rhel/6
|
|
ln -s ../obs pkg/kamailio/rhel/7
|
|
ln -s ../obs pkg/kamailio/rhel/7
|
|
-mkdir -p pkg/kamailio/suse
|
|
|
|
-ln -s ../obs pkg/kamailio/suse/1315
|
|
|
|
|
|
+mkdir -p pkg/kamailio/opensuse
|
|
|
|
+ln -s ../obs pkg/kamailio/opensuse/1315
|
|
|
|
+ln -s ../obs pkg/kamailio/opensuse/1330
|
|
rm -Rf pkg/kamailio/centos
|
|
rm -Rf pkg/kamailio/centos
|
|
mkdir -p pkg/kamailio/centos
|
|
mkdir -p pkg/kamailio/centos
|
|
ln -s ../obs pkg/kamailio/centos/6
|
|
ln -s ../obs pkg/kamailio/centos/6
|
|
@@ -858,7 +859,7 @@ ln -s ../obs pkg/kamailio/centos/7
|
|
|
|
|
|
|
|
|
|
%build
|
|
%build
|
|
-%if 0%{?fedora} || 0%{?leap_version}
|
|
|
|
|
|
+%if 0%{?fedora} || 0%{?suse_version}
|
|
export FREERADIUS=1
|
|
export FREERADIUS=1
|
|
%endif
|
|
%endif
|
|
make cfg prefix=/usr basedir=%{buildroot} cfg_prefix=%{buildroot} doc_prefix=%{buildroot} \
|
|
make cfg prefix=/usr basedir=%{buildroot} cfg_prefix=%{buildroot} doc_prefix=%{buildroot} \
|
|
@@ -867,7 +868,7 @@ make cfg prefix=/usr basedir=%{buildroot} cfg_prefix=%{buildroot} doc_prefix=%{b
|
|
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%{?leap_version}
|
|
|
|
|
|
+%if 0%{?fedora} || 0%{?suse_version}
|
|
FREERADIUS=1 \
|
|
FREERADIUS=1 \
|
|
%endif
|
|
%endif
|
|
group_include="kstandard kautheph kberkeley kcarrierroute \
|
|
group_include="kstandard kautheph kberkeley kcarrierroute \
|
|
@@ -933,7 +934,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%{?leap_version}
|
|
|
|
|
|
+%if 0%{?fedora} || 0%{?suse_version}
|
|
FREERADIUS=1 \
|
|
FREERADIUS=1 \
|
|
%endif
|
|
%endif
|
|
group_include="kstandard kautheph kberkeley kcarrierroute \
|
|
group_include="kstandard kautheph kberkeley kcarrierroute \
|
|
@@ -1001,7 +1002,7 @@ install -Dpm 0644 pkg/kamailio/%{dist_name}/%{dist_version}/kamailio.service %{b
|
|
install -Dpm 0644 pkg/kamailio/%{dist_name}/%{dist_version}/kamailio.tmpfiles %{buildroot}%{_tmpfilesdir}/kamailio.conf
|
|
install -Dpm 0644 pkg/kamailio/%{dist_name}/%{dist_version}/kamailio.tmpfiles %{buildroot}%{_tmpfilesdir}/kamailio.conf
|
|
%endif
|
|
%endif
|
|
|
|
|
|
-%if 0%{?leap_version}
|
|
|
|
|
|
+%if 0%{?suse_version}
|
|
mkdir -p %{buildroot}/var/adm/fillup-templates/
|
|
mkdir -p %{buildroot}/var/adm/fillup-templates/
|
|
install -m644 pkg/kamailio/%{dist_name}/%{dist_version}/kamailio.sysconfig \
|
|
install -m644 pkg/kamailio/%{dist_name}/%{dist_version}/kamailio.sysconfig \
|
|
%{buildroot}/var/adm/fillup-templates/sysconfig.kamailio
|
|
%{buildroot}/var/adm/fillup-templates/sysconfig.kamailio
|
|
@@ -1011,7 +1012,7 @@ install -m644 pkg/kamailio/%{dist_name}/%{dist_version}/kamailio.sysconfig \
|
|
%{buildroot}%{_sysconfdir}/sysconfig/kamailio
|
|
%{buildroot}%{_sysconfdir}/sysconfig/kamailio
|
|
%endif
|
|
%endif
|
|
|
|
|
|
-%if 0%{?leap_version}
|
|
|
|
|
|
+%if 0%{?suse_version}
|
|
%py_compile -O %{buildroot}%{_libdir}/kamailio/kamctl/dbtextdb
|
|
%py_compile -O %{buildroot}%{_libdir}/kamailio/kamctl/dbtextdb
|
|
%endif
|
|
%endif
|
|
|
|
|
|
@@ -1019,6 +1020,11 @@ install -m644 pkg/kamailio/%{dist_name}/%{dist_version}/kamailio.sysconfig \
|
|
rm -f %{buildroot}%{_libdir}/kamailio/lib*.so
|
|
rm -f %{buildroot}%{_libdir}/kamailio/lib*.so
|
|
|
|
|
|
%pre
|
|
%pre
|
|
|
|
+%if 0%{?suse_version} == 1330
|
|
|
|
+if ! /usr/bin/getent group daemon &>/dev/null; then
|
|
|
|
+ /usr/sbin/groupadd --gid 2 daemon &> /dev/null
|
|
|
|
+fi
|
|
|
|
+%endif
|
|
if ! /usr/bin/id kamailio &>/dev/null; then
|
|
if ! /usr/bin/id kamailio &>/dev/null; then
|
|
/usr/sbin/useradd -r -g daemon -s /bin/false -c "Kamailio daemon" -d %{_libdir}/kamailio kamailio || \
|
|
/usr/sbin/useradd -r -g daemon -s /bin/false -c "Kamailio daemon" -d %{_libdir}/kamailio kamailio || \
|
|
%logmsg "Unexpected error adding user \"kamailio\". Aborting installation."
|
|
%logmsg "Unexpected error adding user \"kamailio\". Aborting installation."
|
|
@@ -1031,7 +1037,7 @@ rm -rf %{buildroot}
|
|
%post
|
|
%post
|
|
%if "%{?_unitdir}" == ""
|
|
%if "%{?_unitdir}" == ""
|
|
mkdir -p %{_var}/run/kamailio 2> /dev/null || :
|
|
mkdir -p %{_var}/run/kamailio 2> /dev/null || :
|
|
-chown kamailio:kamailio %{_var}/run/kamailio 2> /dev/null
|
|
|
|
|
|
+chown kamailio:daemon %{_var}/run/kamailio 2> /dev/null
|
|
/sbin/chkconfig --add kamailio
|
|
/sbin/chkconfig --add kamailio
|
|
%else
|
|
%else
|
|
%tmpfiles_create kamailio
|
|
%tmpfiles_create kamailio
|
|
@@ -1174,7 +1180,7 @@ fi
|
|
|
|
|
|
%dir %attr(-,kamailio,kamailio) %{_sysconfdir}/kamailio
|
|
%dir %attr(-,kamailio,kamailio) %{_sysconfdir}/kamailio
|
|
%config(noreplace) %{_sysconfdir}/kamailio/*
|
|
%config(noreplace) %{_sysconfdir}/kamailio/*
|
|
-%if 0%{?leap_version}
|
|
|
|
|
|
+%if 0%{?suse_version}
|
|
/var/adm/fillup-templates/sysconfig.kamailio
|
|
/var/adm/fillup-templates/sysconfig.kamailio
|
|
%else
|
|
%else
|
|
%config %{_sysconfdir}/sysconfig/*
|
|
%config %{_sysconfdir}/sysconfig/*
|