diff --git a/apg.spec b/apg.spec index d45551c..cfe1d86 100644 --- a/apg.spec +++ b/apg.spec @@ -2,7 +2,7 @@ Summary: Automated Password Generator for random password generation Name: apg Version: 2.3.0b -Release: 17%{?dist} +Release: 18%{?dist} License: BSD Group: System Environment/Base URL: http://www.adel.nursat.kz/%{name}/ @@ -59,24 +59,36 @@ install -p -m 755 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}@.service if [ $? == 1 ]; then echo -e 'pwdgen\t\t129/tcp\t\t\t# PWDGEN service' >> /etc/services fi +%if 0%{?fedora} > 17 + %systemd_post apg@.service +%else if [ $1 -eq 1 ]; then # Initial installation /bin/systemctl daemon-reload >/dev/null 2>&1 || : fi +%endif %preun +%if 0%{?fedora} > 17 + %systemd_preun apg@.service +%else if [ $1 -eq 0 ]; then # Package removal, not upgrade /bin/systemctl --no-reload disable apg@.service > /dev/null 2>&1 || : /bin/systemctl stop apg@.service > /dev/null 2>&1 || : fi +%endif %postun +%if 0%{?fedora} > 17 + %systemd_postun apg@.service +%else /bin/systemctl daemon-reload >/dev/null 2>&1 || : if [ $1 -ge 1 ]; then # Package upgrade, not uninstall /bin/systemctl try-restart apg@.service >/dev/null 2>&1 || : fi +%endif %files %defattr(-, root, root) @@ -89,6 +101,9 @@ fi %{_unitdir}/%{name}.socket %changelog +* Sat Aug 25 2012 Kevin Fenzi 2.3.0b-18 +- Add systemd preset macros. Fixes bug #850026 + * Wed Jul 18 2012 Fedora Release Engineering - 2.3.0b-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild