summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-06-20 15:53:04 +0200
committerRemi Collet <remi@remirepo.net>2018-06-20 15:53:04 +0200
commit17865ab7987809d429ccdc38a2eea112f2b340a0 (patch)
treed7689eeb0f3bee2fcaf2b4d13d0c6c101453ba62
parent691f2980f0dd4d82cb0b2b43df81d7f19ff0cba7 (diff)
drop dependency on initscripts #1592356
-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