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 b7b085b..083d9ff 100644
--- a/glpi.spec
+++ b/glpi.spec
@@ -39,12 +39,19 @@
# 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}
%global upstream_version 9.3
%global upstream_prever RC2
# use 9.3.0~RC2 < 9.3 (for plugin compatibility check)
Version: %{upstream_version}.0%{?upstream_prever:~%{upstream_prever}}
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Free IT asset management software
Summary(fr): Gestion Libre de Parc Informatique
@@ -241,8 +248,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
@@ -504,7 +518,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
@@ -519,7 +539,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
@@ -563,6 +589,9 @@ fi
%changelog
+* Wed Jun 20 2018 Remi Collet <remi@remirepo.net> - 9.3.0~RC2-4
+- drop dependency on initscripts #1592356
+
* Wed Jun 20 2018 Remi Collet <remi@remirepo.net> - 9.3.0~RC2-3
- improve configuration to simply multi-glpi installation