Module: kamailio Branch: 5.1 Commit: d0c4a23138c3ca90e792b8d2befe98efc46d74c8 URL: https://github.com/kamailio/kamailio/commit/d0c4a23138c3ca90e792b8d2befe98efc46d74c8
Author: Sergey Safarov <s.safa...@gmail.com> Committer: Sergey Safarov <s.safa...@gmail.com> Date: 2017-12-11T15:52:01-05:00 pkg/kamailio/obs: Added missed directories to packaging (non systemd dists) Added workarround for buggy _sharedstatedir on openSUSE Leap. Fixed build error for RHEL7 dists Some SPEC clenup --- Modified: pkg/kamailio/obs/kamailio.spec --- Diff: https://github.com/kamailio/kamailio/commit/d0c4a23138c3ca90e792b8d2befe98efc46d74c8.diff Patch: https://github.com/kamailio/kamailio/commit/d0c4a23138c3ca90e792b8d2befe98efc46d74c8.patch --- diff --git a/pkg/kamailio/obs/kamailio.spec b/pkg/kamailio/obs/kamailio.spec index e911d16b1c..4cbf62a7ae 100644 --- a/pkg/kamailio/obs/kamailio.spec +++ b/pkg/kamailio/obs/kamailio.spec @@ -147,6 +147,11 @@ %bcond_without xmlrpc %endif +# redefine buggy openSUSE Leap _sharedstatedir macro. More info at https://bugzilla.redhat.com/show_bug.cgi?id=183370 +%if 0%{?suse_version} == 1315 +%define _sharedstatedir /var/lib +%endif + Summary: Kamailio (former OpenSER) - the Open Source SIP Server Name: %name Version: %ver @@ -656,7 +661,7 @@ SCTP transport for Kamailio. %package sipcapture-daemon-config -Summary: reference config for sipcapture daemon. +Summary: reference config for sipcapture daemon Group: System Environment/Daemons Requires: kamailio-sipcapture = %ver @@ -1001,9 +1006,12 @@ make install-modules-all skip_modules="app_mono db_cassandra db_oracle \ make install-cfg-pkg +install -d %{buildroot}%{_sharedstatedir}/kamailio + %if "%{?_unitdir}" == "" # On RedHat 6 like -mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d +install -d %{buildroot}%{_var}/run/kamailio +install -d %{buildroot}%{_sysconfdir}/rc.d/init.d install -m755 pkg/kamailio/%{dist_name}/%{dist_version}/kamailio.init \ %{buildroot}%{_sysconfdir}/rc.d/init.d/kamailio %else @@ -1016,13 +1024,13 @@ install -Dpm 0644 pkg/kamailio/%{dist_name}/%{dist_version}/sipcapture.tmpfiles %endif %if 0%{?suse_version} -mkdir -p %{buildroot}/var/adm/fillup-templates/ +install -d %{buildroot}/var/adm/fillup-templates/ install -m644 pkg/kamailio/%{dist_name}/%{dist_version}/kamailio.sysconfig \ %{buildroot}/var/adm/fillup-templates/sysconfig.kamailio install -m644 pkg/kamailio/%{dist_name}/%{dist_version}/sipcapture.sysconfig \ %{buildroot}/var/adm/fillup-templates/sysconfig.sipcapture %else -mkdir -p %{buildroot}%{_sysconfdir}/sysconfig +install -d %{buildroot}%{_sysconfdir}/sysconfig install -m644 pkg/kamailio/%{dist_name}/%{dist_version}/kamailio.sysconfig \ %{buildroot}%{_sysconfdir}/sysconfig/kamailio install -m644 pkg/kamailio/%{dist_name}/%{dist_version}/sipcapture.sysconfig \ @@ -1053,8 +1061,6 @@ rm -rf %{buildroot} %post %if "%{?_unitdir}" == "" -mkdir -p %{_var}/run/kamailio 2> /dev/null || : -chown kamailio:daemon %{_var}/run/kamailio 2> /dev/null /sbin/chkconfig --add kamailio %else %tmpfiles_create kamailio @@ -1204,19 +1210,19 @@ fi %dir %attr(-,kamailio,kamailio) %{_sysconfdir}/kamailio %config(noreplace) %{_sysconfdir}/kamailio/dictionary.kamailio -%config(noreplace) %{_sysconfdir}/kamailio/kamailio-advanced.cfg -%config(noreplace) %{_sysconfdir}/kamailio/kamailio-basic.cfg %config(noreplace) %{_sysconfdir}/kamailio/kamailio.cfg %config(noreplace) %{_sysconfdir}/kamailio/kamctlrc %config(noreplace) %{_sysconfdir}/kamailio/pi_framework.xml %config(noreplace) %{_sysconfdir}/kamailio/tls.cfg +%dir %attr(-,kamailio,kamailio) %{_sharedstatedir}/kamailio %if 0%{?suse_version} /var/adm/fillup-templates/sysconfig.kamailio %else -%config %{_sysconfdir}/sysconfig/* +%config %{_sysconfdir}/sysconfig/kamailio %endif %if "%{?_unitdir}" == "" %config %{_sysconfdir}/rc.d/init.d/* +%dir %attr(-,kamailio,kamailio) %{_var}/run/kamailio %else %{_unitdir}/kamailio.service %{_tmpfilesdir}/kamailio.conf @@ -1707,6 +1713,11 @@ fi %files sipcapture-daemon-config %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/kamailio/kamailio-sipcapture.cfg +%if 0%{?suse_version} +/var/adm/fillup-templates/sysconfig.sipcapture +%else +%config(noreplace) %{_sysconfdir}/sysconfig/sipcapture +%endif %if "%{?_unitdir}" != "" %{_unitdir}/sipcapture.service %{_tmpfilesdir}/sipcapture.conf _______________________________________________ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev