Browse Source

Merge pull request #1241 from sergey-safarov/spec_update11

pkg/kamailio/obs: Updated obs spec
Daniel-Constantin Mierla 8 years ago
parent
commit
5389f903c1
2 changed files with 54 additions and 29 deletions
  1. 49 29
      pkg/kamailio/obs/kamailio.spec
  2. 5 0
      pkg/kamailio/obs/meta

+ 49 - 29
pkg/kamailio/obs/kamailio.spec

@@ -13,6 +13,7 @@
 %bcond_without json
 %bcond_without json
 %bcond_without kazoo
 %bcond_without kazoo
 %bcond_without memcached
 %bcond_without memcached
+%bcond_without perl
 %bcond_without redis
 %bcond_without redis
 %bcond_without sctp
 %bcond_without sctp
 %bcond_without websocket
 %bcond_without websocket
@@ -30,6 +31,7 @@
 %bcond_without json
 %bcond_without json
 %bcond_without kazoo
 %bcond_without kazoo
 %bcond_without memcached
 %bcond_without memcached
+%bcond_without perl
 %bcond_without redis
 %bcond_without redis
 %bcond_without sctp
 %bcond_without sctp
 %bcond_without websocket
 %bcond_without websocket
@@ -47,6 +49,7 @@
 %bcond_without json
 %bcond_without json
 %bcond_without kazoo
 %bcond_without kazoo
 %bcond_without memcached
 %bcond_without memcached
+%bcond_without perl
 %bcond_without redis
 %bcond_without redis
 %bcond_without sctp
 %bcond_without sctp
 %bcond_without websocket
 %bcond_without websocket
@@ -64,6 +67,7 @@
 %bcond_with json
 %bcond_with json
 %bcond_with kazoo
 %bcond_with kazoo
 %bcond_without memcached
 %bcond_without memcached
+%bcond_without perl
 %bcond_with redis
 %bcond_with redis
 %bcond_without sctp
 %bcond_without sctp
 %bcond_without websocket
 %bcond_without websocket
@@ -82,14 +86,15 @@
 %bcond_without json
 %bcond_without json
 %bcond_without kazoo
 %bcond_without kazoo
 %bcond_without memcached
 %bcond_without memcached
+%bcond_without perl
 %bcond_without redis
 %bcond_without redis
 %bcond_without sctp
 %bcond_without sctp
 %bcond_without websocket
 %bcond_without websocket
 %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
@@ -99,6 +104,7 @@
 %bcond_without json
 %bcond_without json
 %bcond_with kazoo
 %bcond_with kazoo
 %bcond_without memcached
 %bcond_without memcached
+%bcond_without perl
 %bcond_without redis
 %bcond_without redis
 %bcond_without sctp
 %bcond_without sctp
 %bcond_without websocket
 %bcond_without websocket
@@ -116,6 +122,7 @@
 %bcond_with json
 %bcond_with json
 %bcond_with kazoo
 %bcond_with kazoo
 %bcond_with memcached
 %bcond_with memcached
+%bcond_with perl
 %bcond_with redis
 %bcond_with redis
 %bcond_with sctp
 %bcond_with sctp
 %bcond_with websocket
 %bcond_with websocket
@@ -133,6 +140,7 @@
 %bcond_with json
 %bcond_with json
 %bcond_with kazoo
 %bcond_with kazoo
 %bcond_with memcached
 %bcond_with memcached
+%bcond_without perl
 %bcond_without redis
 %bcond_without redis
 %bcond_with sctp
 %bcond_with sctp
 %bcond_with websocket
 %bcond_with websocket
@@ -170,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
 
 
@@ -210,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
@@ -226,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
@@ -285,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
@@ -353,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
@@ -369,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
@@ -396,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
@@ -415,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
@@ -454,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
@@ -504,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
@@ -531,8 +539,14 @@ Protocol (SIP)" support for Kamailio.
 %package    perl
 %package    perl
 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:   mod_perl, kamailio = %ver
+Requires:   kamailio = %ver
+%if 0%{?suse_version}
+Requires:   perl
+BuildRequires:  perl
+%else
+Requires:   mod_perl
 BuildRequires:  mod_perl-devel
 BuildRequires:  mod_perl-devel
+%endif
 
 
 %description    perl
 %description    perl
 Perl extensions and database driver for Kamailio.
 Perl extensions and database driver for Kamailio.
@@ -543,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
@@ -560,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
@@ -586,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
@@ -654,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
@@ -737,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
@@ -798,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
@@ -814,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
@@ -835,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
@@ -844,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} \
@@ -853,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 \
@@ -919,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 \
@@ -987,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
@@ -997,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
 
 
@@ -1005,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."
@@ -1017,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
@@ -1160,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/*

+ 5 - 0
pkg/kamailio/obs/meta

@@ -2,6 +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_Tumbleweed">
+    <path project="openSUSE:Factory" repository="snapshot"/>
+    <arch>i586</arch>
+    <arch>x86_64</arch>
+  </repository>
   <repository name="openSUSE_Leap_42.3">
   <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>