diff --git a/3proxy.spec b/3proxy.spec index 7465f5b..3fd7577 100644 --- a/3proxy.spec +++ b/3proxy.spec @@ -5,7 +5,7 @@ Name: 3proxy Version: 0.6.1 -Release: 16%{?dist} +Release: 17%{?dist} Summary: Tiny but very powerful proxy Summary(ru): Маленький, но крайне мощный прокси-сервер @@ -29,10 +29,10 @@ Patch0: 3proxy-0.6.1-config-path.patch # Systemd compliant: https://fedoraproject.org/wiki/Systemd_Packaging_Draft # https://fedoraproject.org/wiki/Packaging:Systemd # https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd -BuildRequires: systemd-units -Requires(post): systemd-units -Requires(preun): systemd-units -Requires(postun): systemd-units +BuildRequires: systemd +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd # This is actually needed for the %triggerun script but Requires(triggerun) # is not valid. We can use %post because this particular %triggerun script # should fire just after this package is installed. @@ -113,24 +113,13 @@ EOF rm -rf %{buildroot} %post - if [ $1 -eq 1 ]; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : - fi +%systemd_post %{name}.service %preun - if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || : - /bin/systemctl stop %{name}.service > /dev/null 2>&1 || : - fi +%systemd_preun %{name}.service %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : - if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : - fi +%systemd_postun_with_restart %{name}.service %triggerun -- %{name} < 0.6.1-10 # Save the current service runlevel info @@ -157,6 +146,9 @@ rm -rf %{buildroot} %{_initrddir}/%{name} %changelog +* Tue Jan 7 2014 Pavel Alexeev - 0.6.1-17 +- Step to systemd macroses (#850383) + * Fri Apr 26 2013 Pavel Alexeev - 0.6.1-16 - Harden build - bz#955141