[inn/f18] Introduction of systemd rpm macros

Jochen Schmitt s4504kr at fedoraproject.org
Fri Oct 5 18:13:33 UTC 2012


commit 69590344713ba029c124ff5dc42fdf7f3b2899df
Author: Jochen Schmitt <Jochen at herr-schmitt.de>
Date:   Fri Oct 5 19:58:47 2012 +0200

    Introduction of systemd rpm macros

 inn.spec |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/inn.spec b/inn.spec
index 3ac2d1a..ff94a5d 100644
--- a/inn.spec
+++ b/inn.spec
@@ -1,7 +1,7 @@
 Summary: The InterNetNews system, an Usenet news server
 Name: inn
 Version: 2.5.3
-Release: 2%{?dist}
+Release: 4%{?dist}
 #see LICENSE file for details
 License: GPLv2+ and BSD and MIT and Public Domain
 Group: System Environment/Daemons
@@ -220,9 +220,7 @@ touch /var/log/news/news.crit
 touch /var/log/news/news.err
 chown -R news:news /var/log/news*
 
-if [ $1 -eq 1 ]; then
-   /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%systemd_post innd.service
 
 %post libs -p /sbin/ldconfig
 
@@ -275,18 +273,15 @@ if [ -f /etc/syslog.conf ]; then
 fi
 
 %preun
+%systemd_preun innd.service
 if [ $1 = 0 ]; then
-    /bin/systemctl disable innd.service >/dev/null 2>&1 || :
-    /bin/systemctl --no-reload stop innd.service >/dev/null 2>&1 || :
     if [ -f /var/lib/news/history.dir ]; then
        rm -f /var/lib/news/history.*
     fi
 fi
 
 %postun
-if [ "$1" -ge 1 ]; then
-   /bin/systemctl try-restart innd.service >/dev/null 2>&1 || :
-fi
+%systemd_postun_with_restart innd.service
 
 %postun libs -p /sbin/ldconfig
 
@@ -529,6 +524,12 @@ fi
 %{_mandir}/man1/inews*
 
 %changelog
+* Fri Oct  5 2012 Jochen Schmitt <Jochen herr-schmitt de> - 2.5.3-4
+- Introduction of systemd rpm macros
+
+* Tue Sep 11 2012 Jochen Schmitt <Jochen herr-schmitt de> - 2.5.3-3
+- New release is SMP compilant
+
 * Tue Sep 11 2012 Jochen Schmitt <Jochen herr-schmitt de> - 2.5.3-2
 - New release is SMP compilant
 


More information about the scm-commits mailing list