[sendmail] Switched to systemd-rpm macros
Jaroslav Škarvada
jskarvad at fedoraproject.org
Tue Feb 26 11:01:14 UTC 2013
commit fe9120e1eeed939d0b37746bd0dc9c77ae847202
Author: Jaroslav Škarvada <jskarvad at redhat.com>
Date: Tue Feb 26 12:01:08 2013 +0100
Switched to systemd-rpm macros
Resolves: rhbz#850310
sendmail.spec | 30 ++++++++++++------------------
1 files changed, 12 insertions(+), 18 deletions(-)
---
diff --git a/sendmail.spec b/sendmail.spec
index 551e24c..ffcb5e6 100644
--- a/sendmail.spec
+++ b/sendmail.spec
@@ -23,7 +23,7 @@
Summary: A widely used Mail Transport Agent (MTA)
Name: sendmail
Version: 8.14.6
-Release: 3%{?dist}
+Release: 4%{?dist}
License: Sendmail
Group: System Environment/Daemons
URL: http://www.sendmail.org/
@@ -106,11 +106,11 @@ BuildRequires: hesiod-devel
BuildRequires: groff
BuildRequires: ghostscript
BuildRequires: m4
-BuildRequires: systemd-units
+BuildRequires: systemd
Provides: MTA smtpdaemon server(smtp)
-Requires(post): systemd-units systemd-sysv coreutils %{_sbindir}/alternatives
-Requires(preun): systemd-units %{_sbindir}/alternatives
-Requires(postun): systemd-units coreutils %{_sbindir}/alternatives
+Requires(post): systemd systemd-sysv coreutils %{_sbindir}/alternatives
+Requires(preun): systemd %{_sbindir}/alternatives
+Requires(postun): systemd coreutils %{_sbindir}/alternatives
Requires(pre): shadow-utils
Requires: initscripts
Requires: procmail
@@ -500,10 +500,8 @@ getent passwd smmsp >/dev/null || \
exit 0
%postun
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+%systemd_postun_with_restart sendmail.service sm-client.service
if [ $1 -ge 1 ] ; then
- /bin/systemctl try-restart sendmail.service >/dev/null 2>&1 || :
- /bin/systemctl try-restart sm-client.service >/dev/null 2>&1 || :
mta=`readlink %{_sysconfdir}/alternatives/mta`
if [ "$mta" == "%{_sbindir}/sendmail.sendmail" ]; then
%{_sbindir}/alternatives --set mta %{_sbindir}/sendmail.sendmail
@@ -512,12 +510,7 @@ fi
exit 0
%post
-if [ $1 -eq 1 ] ; then
-# Initial installation
- /bin/systemctl enable sendmail.service >/dev/null 2>&1 || :
- /bin/systemctl enable sm-client.service >/dev/null 2>&1 || :
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%systemd_post sendmail.service sm-client.service
# Set up the alternatives files for MTAs.
%{_sbindir}/alternatives --install %{_sbindir}/sendmail mta %{_sbindir}/sendmail.sendmail 90 \
@@ -551,11 +544,8 @@ fi
exit 0
%preun
+%systemd_preun sendmail.service sm-client.service
if [ $1 = 0 ]; then
- /bin/systemctl --no-reload disable sendmail.service > /dev/null 2>&1 || :
- /bin/systemctl stop sendmail.service > /dev/null 2>&1 || :
- /bin/systemctl --no-reload disable sm-client.service > /dev/null 2>&1 || :
- /bin/systemctl stop sm-client.service > /dev/null 2>&1 || :
%{_sbindir}/alternatives --remove mta %{_sbindir}/sendmail.sendmail
fi
exit 0
@@ -719,6 +709,10 @@ fi
%{_initrddir}/sendmail
%changelog
+* Mon Feb 25 2013 Jaroslav Škarvada <jskarvad at redhat.com> - 8.14.6-4
+- Switched to systemd-rpm macros
+ Resolves: rhbz#850310
+
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 8.14.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
More information about the scm-commits
mailing list