[rng-tools] Migration to new systemd macros
Jaromír Cápík
jcapik at fedoraproject.org
Tue Sep 25 09:58:03 UTC 2012
commit 27b1912b2d9659b6934fd4c887e46c13958e7e3c
Author: Jaromir Capik <jcapik at redhat.com>
Date: Tue Sep 25 11:57:55 2012 +0200
Migration to new systemd macros
rng-tools.spec | 22 +++++++---------------
1 files changed, 7 insertions(+), 15 deletions(-)
---
diff --git a/rng-tools.spec b/rng-tools.spec
index 490a238..00e8d09 100644
--- a/rng-tools.spec
+++ b/rng-tools.spec
@@ -4,7 +4,7 @@
Summary: Random number generator related utilities
Name: rng-tools
Version: 4
-Release: 1%{?dist}
+Release: 2%{?dist}
Group: System Environment/Base
License: GPLv2+
URL: http://sourceforge.net/projects/gkernel/
@@ -40,24 +40,13 @@ mkdir -p %{buildroot}%{_unitdir}
install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}
%post
-if [ $1 -eq 1 ] ; then
- # Initial installation
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%systemd_post rngd.service
%preun
-if [ $1 -eq 0 ] ; then
- # Package removal, not upgrade
- /bin/systemctl --no-reload disable rngd.service > /dev/null 2>&1 || :
- /bin/systemctl stop rngd.service > /dev/null 2>&1 || :
-fi
+%systemd_preun rngd.service
%postun
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
- # Package upgrade, not uninstall
- /bin/systemctl try-restart rngd.service >/dev/null 2>&1 || :
-fi
+%systemd_postun_with_restart rngd.service
%files
%doc AUTHORS ChangeLog COPYING NEWS README
@@ -68,6 +57,9 @@ fi
%attr(0644,root,root) %{_unitdir}/rngd.service
%changelog
+* Tue Sep 25 2012 Jaromir Capik <jcapik at redhat.com> - 4-2
+- Migration to new systemd macros
+
* Mon Aug 6 2012 Jeff Garzik <jgarzik at redhat.com> - 4-1
- Update to release version 4.
More information about the scm-commits
mailing list