diff --git a/tftp.spec b/tftp.spec index d8ccaa2..2f44f02 100644 --- a/tftp.spec +++ b/tftp.spec @@ -3,7 +3,7 @@ Summary: The client for the Trivial File Transfer Protocol (TFTP) Name: tftp Version: 5.2 -Release: 5%{?dist} +Release: 6%{?dist} License: BSD Group: Applications/Internet URL: http://www.kernel.org/pub/software/network/tftp/ @@ -78,24 +78,13 @@ install -p -m 644 %SOURCE1 ${RPM_BUILD_ROOT}%{_unitdir} install -p -m 644 %SOURCE2 ${RPM_BUILD_ROOT}%{_unitdir} %post server -if [ $1 -eq 1 ] ; then - # Initial installation - %{systemctl_bin} daemon-reload >/dev/null 2>&1 || : -fi +%systemd_post tftp.service %preun server -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - %{systemctl_bin} --no-reload disable tftp.service > /dev/null 2>&1 || : - %{systemctl_bin} stop tftp.service > /dev/null 2>&1 || : -fi +%systemd_preun tftp.service %postun server -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - %{systemctl_bin} try-restart tftp.service >/dev/null 2>&1 || : -fi +%systemd_postun_with_restart tftp.service %clean @@ -115,6 +104,10 @@ rm -rf ${RPM_BUILD_ROOT} %{_unitdir}/* %changelog +* Wed Aug 22 2012 Jan Synáček - 5.2-6 +- add systemd-rpm macros +- Resolves: #850338 + * Sat Jul 21 2012 Fedora Release Engineering - 5.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild