summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--glpi.spec31
1 files changed, 30 insertions, 1 deletions
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 <remi@remirepo.net> - 9.2.3-3
+- drop dependency on initscripts #1592356
+
* Fri Apr 27 2018 Remi Collet <remi@remirepo.net> - 9.2.3-2
- use range dependencies on F27+