Forráskód Böngészése

Merge pull request #1230 from sergey-safarov/spec_update11

pkg/kamailio/obs: Updated obs SPEC file
Daniel-Constantin Mierla 8 éve
szülő
commit
bdd16faefc

+ 1 - 1
pkg/kamailio/obs/kamailio.service

@@ -9,7 +9,7 @@ Group=daemon
 Environment='CFGFILE=/etc/kamailio/kamailio.cfg'
 Environment='CFGFILE=/etc/kamailio/kamailio.cfg'
 Environment='SHM_MEMORY=64'
 Environment='SHM_MEMORY=64'
 Environment='PKG_MEMORY=4'
 Environment='PKG_MEMORY=4'
-EnvironmentFile=/etc/sysconfig/kamailio
+EnvironmentFile=-/etc/sysconfig/kamailio
 ExecStart=/usr/sbin/kamailio -DD -P /var/run/kamailio/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY
 ExecStart=/usr/sbin/kamailio -DD -P /var/run/kamailio/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY
 Restart=on-failure
 Restart=on-failure
 
 

+ 116 - 23
pkg/kamailio/obs/kamailio.spec

@@ -53,7 +53,7 @@
 %bcond_without xmlrpc
 %bcond_without xmlrpc
 %endif
 %endif
 
 
-%if 0%{?centos_version} == 600
+%if 0%{?centos_ver} == 6
 %define dist_name centos
 %define dist_name centos
 %define dist_version %{?centos}
 %define dist_version %{?centos}
 %bcond_with cnxcc
 %bcond_with cnxcc
@@ -70,9 +70,10 @@
 %bcond_without xmlrpc
 %bcond_without xmlrpc
 %endif
 %endif
 
 
-%if 0%{?centos_version} == 700
+%if 0%{?centos_ver} == 7
 %define dist_name centos
 %define dist_name centos
 %define dist_version %{?centos}
 %define dist_version %{?centos}
+%define dist .el7.centos
 %bcond_without cnxcc
 %bcond_without cnxcc
 %bcond_with dnssec
 %bcond_with dnssec
 %bcond_without geoip
 %bcond_without geoip
@@ -104,7 +105,7 @@
 %bcond_without xmlrpc
 %bcond_without xmlrpc
 %endif
 %endif
 
 
-%if 0%{?rhel_version} == 600
+%if 0%{?rhel} == 6 && 0%{?centos_ver} != 6
 %define dist_name rhel
 %define dist_name rhel
 %define dist_version %{?rhel}
 %define dist_version %{?rhel}
 %bcond_with cnxcc
 %bcond_with cnxcc
@@ -121,7 +122,7 @@
 %bcond_without xmlrpc
 %bcond_without xmlrpc
 %endif
 %endif
 
 
-%if 0%{?rhel_version} == 700
+%if 0%{?rhel} == 7 && 0%{?centos_ver} != 7
 %define dist_name rhel
 %define dist_name rhel
 %define dist_version %{?rhel}
 %define dist_version %{?rhel}
 %bcond_with cnxcc
 %bcond_with cnxcc
@@ -224,8 +225,14 @@ Berkeley database connectivity for Kamailio.
 %package    carrierroute
 %package    carrierroute
 Summary:    The carrierroute module for Kamailio
 Summary:    The carrierroute module for Kamailio
 Group:      System Environment/Daemons
 Group:      System Environment/Daemons
-Requires:   libconfuse, kamailio = %ver
+Requires:   kamailio = %ver
+%if 0%{?leap_version}
+Requires:   libconfuse0
+BuildRequires:  libconfuse-devel
+%else
+Requires:   libconfuse
 BuildRequires:  libconfuse-devel
 BuildRequires:  libconfuse-devel
+%endif
 
 
 %description    carrierroute
 %description    carrierroute
 The carrierroute module for Kamailio.
 The carrierroute module for Kamailio.
@@ -265,7 +272,23 @@ CPL (Call Processing Language) interpreter for Kamailio.
 %package    crypto
 %package    crypto
 Summary:    Module to support cryptographic extensions for use in the Kamailio configuration
 Summary:    Module to support cryptographic extensions for use in the Kamailio configuration
 Group:      System Environment/Daemons
 Group:      System Environment/Daemons
-Requires:   libcrypto
+Requires:   kamailio = %ver
+%if 0%{?rhel} == 6
+Requires:   openssl
+BuildRequires:  openssl-devel
+%endif
+%if 0%{?rhel} == 7
+Requires:   openssl-libs
+BuildRequires:  openssl-devel
+%endif
+%if 0%{?fedora}
+Requires:   openssl-libs
+BuildRequires:  openssl-devel
+%endif
+%if 0%{?leap_version}
+Requires:   libopenssl1_0_0
+BuildRequires:  libopenssl-devel
+%endif
 
 
 %description    crypto
 %description    crypto
 This module provides various cryptography tools for use in Kamailio configuration file.  It relies on OpenSSL libraries for cryptographic operations (libssl, libcrypto). 
 This module provides various cryptography tools for use in Kamailio configuration file.  It relies on OpenSSL libraries for cryptographic operations (libssl, libcrypto). 
@@ -328,8 +351,15 @@ Compressed body (SIP and HTTP) handling for kamailio.
 %package    http_async_client
 %package    http_async_client
 Summary:    Async HTTP client module for Kamailio
 Summary:    Async HTTP client module for Kamailio
 Group:      System Environment/Daemons
 Group:      System Environment/Daemons
-Requires:   libcurl, libevent, kamailio = %ver
-BuildRequires: libcurl-devel, libevent-devel
+Requires:   libevent, kamailio = %ver
+BuildRequires: libevent-devel
+%if 0%{?leap_version}
+Requires:   libcurl4
+BuildRequires:  libcurl-devel
+%else
+Requires:   libcurl
+BuildRequires:  libcurl-devel
+%endif
 
 
 %description   http_async_client
 %description   http_async_client
 This module implements protocol functions that use the libcurl to communicate with HTTP servers in asyncronous way.
 This module implements protocol functions that use the libcurl to communicate with HTTP servers in asyncronous way.
@@ -338,7 +368,14 @@ This module implements protocol functions that use the libcurl to communicate wi
 %package    http_client
 %package    http_client
 Summary:    HTTP client module for Kamailio
 Summary:    HTTP client module for Kamailio
 Group:      System Environment/Daemons
 Group:      System Environment/Daemons
-Requires:   libcrypto
+Requires:   kamailio = %ver
+%if 0%{?leap_version}
+Requires:   libcurl4, libxml2-tools
+BuildRequires:  libcurl-devel, libxml2-devel
+%else
+Requires:   libxml2, libcurl, zlib
+BuildRequires:  libxml2-devel, libcurl-devel, zlib-devel
+%endif
 
 
 %description    http_client
 %description    http_client
 This module implements protocol functions that use the libcurl to communicate with HTTP servers. 
 This module implements protocol functions that use the libcurl to communicate with HTTP servers. 
@@ -418,7 +455,7 @@ 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%{?leap_version}
-Requires:   openldap2 libsasl2
+Requires:   openldap2 libsasl2-3
 BuildRequires:  openldap2-devel cyrus-sasl-devel
 BuildRequires:  openldap2-devel cyrus-sasl-devel
 %else
 %else
 Requires:   openldap
 Requires:   openldap
@@ -465,8 +502,15 @@ Memcached configuration file support for Kamailio.
 %package    mysql
 %package    mysql
 Summary:    MySQL database connectivity for Kamailio
 Summary:    MySQL database connectivity for Kamailio
 Group:      System Environment/Daemons
 Group:      System Environment/Daemons
-Requires:   mysql-libs, kamailio = %ver
-BuildRequires:  mysql-devel zlib-devel
+Requires:   kamailio = %ver
+BuildRequires:  zlib-devel
+%if 0%{?leap_version}
+Requires:   libmysqlclient18
+BuildRequires:  libmysqlclient-devel
+%else
+Requires:   mysql-libs
+BuildRequires:  mysql-devel
+%endif
 
 
 %description    mysql
 %description    mysql
 MySQL database connectivity for Kamailio.
 MySQL database connectivity for Kamailio.
@@ -498,8 +542,14 @@ Perl extensions and database driver for Kamailio.
 %package    postgresql
 %package    postgresql
 Summary:    PostgreSQL database connectivity for Kamailio
 Summary:    PostgreSQL database connectivity for Kamailio
 Group:      System Environment/Daemons
 Group:      System Environment/Daemons
-Requires:   postgresql-libs, kamailio = %ver
+Requires:   kamailio = %ver
+%if 0%{?leap_version}
+Requires:   libpq5
 BuildRequires:  postgresql-devel
 BuildRequires:  postgresql-devel
+%else
+Requires:   postgresql-libs
+BuildRequires:  postgresql-devel
+%endif
 
 
 %description    postgresql
 %description    postgresql
 PostgreSQL database connectivity for Kamailio.
 PostgreSQL database connectivity for Kamailio.
@@ -508,8 +558,15 @@ PostgreSQL database connectivity for Kamailio.
 %package    presence
 %package    presence
 Summary:    SIP Presence (and RLS, XCAP, etc) support for Kamailio
 Summary:    SIP Presence (and RLS, XCAP, etc) support for Kamailio
 Group:      System Environment/Daemons
 Group:      System Environment/Daemons
-Requires:   libxml2, libcurl, kamailio = %ver, kamailio-xmpp = %ver
-BuildRequires:  libxml2-devel, libcurl-devel
+Requires:   libxml2, kamailio = %ver, kamailio-xmpp = %ver
+BuildRequires:  libxml2-devel
+%if 0%{?leap_version}
+Requires:   libcurl4
+BuildRequires:  libcurl-devel
+%else
+Requires:   libcurl
+BuildRequires:  libcurl-devel
+%endif
 
 
 %description    presence
 %description    presence
 SIP Presence (and RLS, XCAP, etc) support for Kamailio.
 SIP Presence (and RLS, XCAP, etc) support for Kamailio.
@@ -596,8 +653,14 @@ This module collects the Transformations for 3GPP-SMS.
 %package    snmpstats
 %package    snmpstats
 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:   net-snmp-libs, kamailio = %ver
+Requires:   kamailio = %ver
+%if 0%{?leap_version}
+Requires:   libsnmp30
 BuildRequires:  net-snmp-devel
 BuildRequires:  net-snmp-devel
+%else
+Requires:   net-snmp-libs
+BuildRequires:  net-snmp-devel
+%endif
 
 
 %description    snmpstats
 %description    snmpstats
 SNMP management interface (scalar statistics) for Kamailio.
 SNMP management interface (scalar statistics) for Kamailio.
@@ -672,8 +735,15 @@ UnixODBC database connectivity for Kamailio.
 %package    utils
 %package    utils
 Summary:    Non-SIP utitility functions for Kamailio
 Summary:    Non-SIP utitility functions for Kamailio
 Group:      System Environment/Daemons
 Group:      System Environment/Daemons
-Requires:   libcurl, libxml2, kamailio = %ver
-BuildRequires:  libcurl-devel, libxml2-devel
+Requires:   libxml2, kamailio = %ver
+BuildRequires:  libxml2-devel
+%if 0%{?leap_version}
+Requires:   libcurl4
+BuildRequires:  libcurl-devel
+%else
+Requires:   libcurl
+BuildRequires:  libcurl-devel
+%endif
 
 
 %description    utils
 %description    utils
 Non-SIP utitility functions for Kamailio.
 Non-SIP utitility functions for Kamailio.
@@ -729,7 +799,7 @@ 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%{?leap_version}
-Requires:   libexpat
+Requires:   libexpat1
 BuildRequires:  libexpat-devel
 BuildRequires:  libexpat-devel
 %else
 %else
 Requires:   expat
 Requires:   expat
@@ -743,8 +813,14 @@ SIP/XMPP IM gateway for Kamailio.
 %package        uuid
 %package        uuid
 Summary:        UUID generator for Kamailio
 Summary:        UUID generator for Kamailio
 Group:          System Environment/Daemons
 Group:          System Environment/Daemons
-Requires:       libuuid, kamailio = %version
+Requires:   kamailio = %ver
+%if 0%{?leap_version}
+Requires:       libuuid1
 BuildRequires:  libuuid-devel
 BuildRequires:  libuuid-devel
+%else
+Requires:       libuuid
+BuildRequires:  libuuid-devel
+%endif
 
 
 %description    uuid
 %description    uuid
 UUID module for Kamailio.
 UUID module for Kamailio.
@@ -753,6 +829,19 @@ UUID module for Kamailio.
 %prep
 %prep
 %setup -n %{name}-%{ver}
 %setup -n %{name}-%{ver}
 
 
+ln -s ../obs pkg/kamailio/fedora/24
+ln -s ../obs pkg/kamailio/fedora/25
+ln -s ../obs pkg/kamailio/fedora/26
+mkdir -p pkg/kamailio/rhel
+ln -s ../obs pkg/kamailio/rhel/6
+ln -s ../obs pkg/kamailio/rhel/7
+mkdir -p pkg/kamailio/suse
+ln -s ../obs pkg/kamailio/suse/1315
+rm -Rf pkg/kamailio/centos
+mkdir -p pkg/kamailio/centos
+ln -s ../obs pkg/kamailio/centos/6
+ln -s ../obs pkg/kamailio/centos/7
+
 
 
 %build
 %build
 %if 0%{?fedora} || 0%{?leap_version}
 %if 0%{?fedora} || 0%{?leap_version}
@@ -1279,6 +1368,12 @@ fi
 %{_libdir}/kamailio/modules/cplc.so
 %{_libdir}/kamailio/modules/cplc.so
 
 
 
 
+%files      crypto
+%defattr(-,root,root)
+%doc %{_docdir}/kamailio/modules/README.crypto
+%{_libdir}/kamailio/modules/crypto.so
+
+
 %files      dialplan
 %files      dialplan
 %defattr(-,root,root)
 %defattr(-,root,root)
 %doc %{_docdir}/kamailio/modules/README.dialplan
 %doc %{_docdir}/kamailio/modules/README.dialplan
@@ -1333,7 +1428,6 @@ fi
 %doc %{_docdir}/kamailio/modules/README.cdp
 %doc %{_docdir}/kamailio/modules/README.cdp
 %doc %{_docdir}/kamailio/modules/README.cdp_avp
 %doc %{_docdir}/kamailio/modules/README.cdp_avp
 %doc %{_docdir}/kamailio/modules/README.cfgt
 %doc %{_docdir}/kamailio/modules/README.cfgt
-%doc %{_docdir}/kamailio/modules/README.crypto
 %doc %{_docdir}/kamailio/modules/README.ims_auth
 %doc %{_docdir}/kamailio/modules/README.ims_auth
 %doc %{_docdir}/kamailio/modules/README.ims_charging
 %doc %{_docdir}/kamailio/modules/README.ims_charging
 %doc %{_docdir}/kamailio/modules/README.ims_dialog
 %doc %{_docdir}/kamailio/modules/README.ims_dialog
@@ -1350,7 +1444,6 @@ fi
 %{_libdir}/kamailio/modules/cdp.so
 %{_libdir}/kamailio/modules/cdp.so
 %{_libdir}/kamailio/modules/cdp_avp.so
 %{_libdir}/kamailio/modules/cdp_avp.so
 %{_libdir}/kamailio/modules/cfgt.so
 %{_libdir}/kamailio/modules/cfgt.so
-%{_libdir}/kamailio/modules/crypto.so
 %{_libdir}/kamailio/modules/ims_auth.so
 %{_libdir}/kamailio/modules/ims_auth.so
 %{_libdir}/kamailio/modules/ims_charging.so
 %{_libdir}/kamailio/modules/ims_charging.so
 %{_libdir}/kamailio/modules/ims_dialog.so
 %{_libdir}/kamailio/modules/ims_dialog.so
@@ -1665,7 +1758,7 @@ fi
 
 
 
 
 %changelog
 %changelog
-* Thu Sep 02 2017 Sergey Safarov <[email protected]>
+* Sat Sep 02 2017 Sergey Safarov <[email protected]>
   - added packaging for Fedora 26 and openSUSE Leap 42.3
   - added packaging for Fedora 26 and openSUSE Leap 42.3
   - removed packaging for Fedora 24 and openSUSE Leap 42.1 as End Of Life
   - removed packaging for Fedora 24 and openSUSE Leap 42.1 as End Of Life
   - rewrited SPEC file to support Fedora, RHEL, CentOS, openSUSE distrs
   - rewrited SPEC file to support Fedora, RHEL, CentOS, openSUSE distrs

+ 2 - 2
pkg/kamailio/obs/meta

@@ -2,11 +2,11 @@
   <title>RPM Packages for Kamailio v5.0.x</title>
   <title>RPM Packages for Kamailio v5.0.x</title>
   <description>RPM Packages for Kamailio v5.0.x</description>
   <description>RPM Packages for Kamailio v5.0.x</description>
   <person userid="kamailio" role="maintainer"/>
   <person userid="kamailio" role="maintainer"/>
-  <repository name="openSUSE_Leap_42.3_Update">
+  <repository name="openSUSE_Leap_42.3">
     <path project="openSUSE:Leap:42.3:Update" repository="standard"/>
     <path project="openSUSE:Leap:42.3:Update" repository="standard"/>
     <arch>x86_64</arch>
     <arch>x86_64</arch>
   </repository>
   </repository>
-  <repository name="openSUSE_Leap_42.2_Update">
+  <repository name="openSUSE_Leap_42.2">
     <path project="openSUSE:Leap:42.2:Update" repository="standard"/>
     <path project="openSUSE:Leap:42.2:Update" repository="standard"/>
     <arch>x86_64</arch>
     <arch>x86_64</arch>
   </repository>
   </repository>

+ 5 - 0
pkg/kamailio/obs/prjconf

@@ -0,0 +1,5 @@
+%if 0%{?suse_version}
+Release: <CI_CNT>.<B_CNT>
+%else
+Release: <CI_CNT>%{dist}
+%endif