[knot/f18] * use new systemd macros
Paul Wouters
pwouters at fedoraproject.org
Thu Dec 20 18:13:01 UTC 2012
commit 08134e654392cdefc28f01162f28035abfeda4f9
Author: Paul Wouters <pwouters at redhat.com>
Date: Thu Dec 20 13:11:51 2012 -0500
* use new systemd macros
knot.spec | 26 ++++++++++----------------
1 files changed, 10 insertions(+), 16 deletions(-)
---
diff --git a/knot.spec b/knot.spec
index 6663eda..7cb7ac0 100644
--- a/knot.spec
+++ b/knot.spec
@@ -1,7 +1,7 @@
Summary: An authoritative DNS daemon
Name: knot
Version: 1.1.3
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv3+
Group: System Environment/Daemons
URL: http://www.knot-dns.cz
@@ -13,9 +13,9 @@ BuildRequires: flex userspace-rcu-devel openssl-devel
BuildRequires: bison systemd-units libcap-ng-devel
BuildRequires: texinfo
-Requires(post): systemd-units info
-Requires(preun): systemd-units info
-Requires(postun): systemd-units
+Requires(post): systemd info
+Requires(preun): systemd info
+Requires(postun): systemd
%description
KNOT DNS is a high-performance authoritative DNS server implementation.
@@ -48,25 +48,16 @@ exit 0
%post
/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
-if [ $1 -eq 1 ]; then
- # Initial installation
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%systemd_post knot.service
%preun
+%systemd_preun knot.service
if [ $1 -eq 0 ] ; then
- # run before a package is removed
- /bin/systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || :
- /bin/systemctl stop %{name}.service > /dev/null 2>&1 || :
/sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
fi
%postun
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
- # run after a package is removed
- /bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
-fi
+%systemd_postun
%files
%defattr(-,root,root)
@@ -87,6 +78,9 @@ fi
%doc %{_infodir}/knot.info.gz
%changelog
+* Thu Dec 20 2012 Paul Wouters <pwouters at redhat.com> - 1.1.3-2
+- Use new systemd macros
+
* Thu Dec 20 2012 Paul Wouters <pwouters at redhat.com> - 1.1.3-1
- Initial build for Fedora
More information about the scm-commits
mailing list