From 3ab9a5b6118d723a8d32cd0b6296a9745cb1dfcc Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 20 Jun 2018 15:59:25 +0200 Subject: drop dependency on initscripts #1592356 --- glpi.spec | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/glpi.spec b/glpi.spec index 67c09f5..71e9c9e 100644 --- a/glpi.spec +++ b/glpi.spec @@ -39,9 +39,16 @@ # remirepo:1 %endif +# remirepo:5 +%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 +%global with_systemd 1 +%else +%global with_systemd 0 +%endif + Name: %{gh_project} Version: 9.2.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Free IT asset management software Summary(fr): Gestion Libre de Parc Informatique @@ -234,8 +241,15 @@ Provides: bundled(tiny_mce) = 4.3.13 Requires: php-composer(fedora/autoloader) Requires: %{_sysconfdir}/logrotate.d +# remirepo:1 +%if %{with_systemd} +Requires(postun): %{_bindir}/systemctl +Requires(post): %{_bindir}/systemctl +# remirepo:4 +%else Requires(postun): /sbin/service Requires(post): /sbin/service +%endif %if %{useselinux} Requires(post): /sbin/restorecon Requires(post): /usr/sbin/semanage @@ -488,7 +502,13 @@ restorecon -R %{_localstatedir}/lib/%{name} restorecon -R %{_localstatedir}/log/%{name} ) &>/dev/null %endif +# remirepo:1 +%if %{with_systemd} +%{_bindir}/systemctl condrestart httpd > /dev/null 2>&1 || : +# remirepo:3 +%else /sbin/service httpd condrestart > /dev/null 2>&1 || : +%endif %postun @@ -503,7 +523,13 @@ if [ "$1" -eq "0" ]; then ) &>/dev/null fi %endif +# remirepo:1 +%if %{with_systemd} +%{_bindir}/systemctl condrestart httpd > /dev/null 2>&1 || : +# remirepo:3 +%else /sbin/service httpd condrestart > /dev/null 2>&1 || : +%endif %files -f %{name}.lang @@ -547,6 +573,9 @@ fi %changelog +* Wed Jun 20 2018 Remi Collet - 9.2.3-3 +- drop dependency on initscripts #1592356 + * Fri Apr 27 2018 Remi Collet - 9.2.3-2 - use range dependencies on F27+ -- cgit