From 02fc63f14028f15422d39adea6396e88f2b514ce Mon Sep 17 00:00:00 2001 From: Jan Synacek Date: Wed, 22 Aug 2012 09:37:16 +0200 Subject: [PATCH] add systemd-rpm macros Resolves: #850236 --- numad.spec | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/numad.spec b/numad.spec index 547b54b..1ecbe70 100644 --- a/numad.spec +++ b/numad.spec @@ -2,7 +2,7 @@ Name: numad Version: 0.5 -Release: 5.20120522git%{?dist} +Release: 6.20120522git%{?dist} Summary: NUMA user daemon License: LGPLv2 @@ -48,32 +48,19 @@ make install prefix=%{buildroot}/usr %doc %{_mandir}/man8/numad.8.gz %post -if [ $1 -eq 1 ]; then - # initial installation - %{systemctl_bin} daemon-reload &>/dev/null || : -fi - -if [ $1 -eq 2 ]; then - # package upgrade - if %{systemctl_bin} --quiet is-active numad.service; then - %{systemctl_bin} restart numad.service &>/dev/null || : - fi -fi +%systemd_post numad.service %preun -if [ $1 -eq 0 ]; then - # package removal - %{systemctl_bin} --no-reload disable numad.service &>/dev/null || : - %{systemctl_bin} stop numad.service &>/dev/null || : -fi +%systemd_preun numad.service %postun -if [ $1 -eq 0 ]; then - # package removal - %{systemctl_bin} --system daemon-reload &>/dev/null || : -fi +%systemd_postun numad.service %changelog +* Wed Aug 22 2012 Jan Synáček - 0.5-6.20120522git +- add systemd-rpm macros +- Resolves: #850236 + * Fri Jul 20 2012 Fedora Release Engineering - 0.5-5.20120522git - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild