[MySQL-zrm] Use new systemd macros (bug 850223)
Orion Poplawski
orion at fedoraproject.org
Wed Oct 17 04:07:51 UTC 2012
commit 9836e2cd37cf3d87057bc8a837f7156393748722
Author: Orion Poplawski <orion at cora.nwra.com>
Date: Tue Oct 16 22:07:49 2012 -0600
Use new systemd macros (bug 850223)
MySQL-zrm.spec | 29 ++++++++++-------------------
1 files changed, 10 insertions(+), 19 deletions(-)
---
diff --git a/MySQL-zrm.spec b/MySQL-zrm.spec
index 10a34ed..af6b718 100644
--- a/MySQL-zrm.spec
+++ b/MySQL-zrm.spec
@@ -1,6 +1,6 @@
Name: MySQL-zrm
Version: 2.2.0
-Release: 10%{?dist}
+Release: 11%{?dist}
Summary: MySQL backup manager
Group: Applications/System
@@ -13,7 +13,6 @@ Patch0: MySQL-zrm-2.2.0-quiet.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch: noarch
-BuildRequires: systemd-units
Requires: logrotate
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
@@ -22,9 +21,9 @@ Requires: perl(XML::Parser)
Requires: perl(Data::Report) >= 0.05
Requires: perl(Data::Report::Plugin::Html)
Requires: perl(Data::Report::Plugin::Text)
-Requires(post): systemd-units
-Requires(preun): systemd-units
-Requires(postun): systemd-units
+Requires(post): systemd
+Requires(preun): systemd
+Requires(postun): systemd
%description
@@ -81,24 +80,13 @@ rm -rf %{buildroot}
%post
-if [ $1 -eq 1 ] ; then
- # Initial installation
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%systemd_post MySQL-zrm.service
%preun
-if [ $1 -eq 0 ] ; then
- # Package removal, not upgrade
- /bin/systemctl --no-reload disable MySQL-zrm.service > /dev/null 2>&1 || :
- /bin/systemctl stop MySQL-zrm.service > /dev/null 2>&1 || :
-fi
+%systemd_preun MySQL-zrm.service
%postun
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
- # Package upgrade, not uninstall
- /bin/systemctl try-restart MySQL-zrm.service >/dev/null 2>&1 || :
-fi
+%systemd_postun_with_restart MySQL-zrm.service
%files
@@ -119,6 +107,9 @@ fi
%changelog
+* Tue Oct 16 2012 Orion Poplawski <orion at cora.nwra.com> - 2.2.0-11
+- Use new systemd macros (bug 850223)
+
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.2.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
More information about the scm-commits
mailing list