[zvbi/f18] new systemd-rpm macros drop sysv migration scripts

Dmitry Butskoy buc at fedoraproject.org
Mon Sep 24 14:18:10 UTC 2012


commit c65b199ea2052defd454638e655657fa72f568c9
Author: Dmitry Butskoy <Dmitry at Butskoy.name>
Date:   Mon Sep 24 18:17:59 2012 +0400

    new systemd-rpm macros
    drop sysv migration scripts

 zvbi.spec |   39 ++++++++++-----------------------------
 1 files changed, 10 insertions(+), 29 deletions(-)
---
diff --git a/zvbi.spec b/zvbi.spec
index ce37927..ab55739 100644
--- a/zvbi.spec
+++ b/zvbi.spec
@@ -3,7 +3,7 @@
 
 Name:               zvbi
 Version:            0.2.33
-Release:            13%{?dist}
+Release:            14%{?dist}
 Summary:            Raw VBI, Teletext and Closed Caption decoding library
 Group:              System Environment/Libraries
 # See NEWS for a full breakdown of licensing.
@@ -22,7 +22,6 @@ BuildRequires:      libICE-devel
 BuildRequires:      xorg-x11-font-utils
 BuildRequires:      systemd-units
 
-Requires(post):     systemd-sysv
 Requires(post):     systemd-units
 Requires(preun):    systemd-units
 Requires(postun):   systemd-units
@@ -136,38 +135,16 @@ ln -sf %{fontdir} %{buildroot}%{catalogue}/%{name}
 
 %post
 /sbin/ldconfig
-
-if [ $1 = 1 ]; then
-    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
-
-
-%postun
-/sbin/ldconfig
-
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 != 0 ]; then
-    /bin/systemctl try-restart zvbid.service >/dev/null 2>&1 || :
-fi
+%systemd_post zvbid.service
 
 
 %preun
+%systemd_preun zvbid.service
 
-if [ $1 = 0 ]; then
-    /bin/systemctl --no-reload disable zvbid.service >/dev/null 2>&1 || :
-    /bin/systemctl stop zvbid.service >/dev/null 2>&1 || :
-fi
-
-%triggerun -- zvbi < 0.2.33-9
-# Save the current service runlevel info
-# User must manually run systemd-sysv-convert --apply zvbid
-# to migrate them to systemd targets
-/usr/bin/systemd-sysv-convert --save zvbid >/dev/null 2>&1 ||:
-
-# Run these because the SysV package being removed won't do them
-/sbin/chkconfig --del zvbid >/dev/null 2>&1 || :
-/bin/systemctl try-restart zvbid.service >/dev/null 2>&1 || :
 
+%postun
+/sbin/ldconfig
+%systemd_postun_with_restart zvbid.service
 
 
 %post fonts
@@ -208,6 +185,10 @@ fi
 
 
 %changelog
+* Mon Sep 24 2012 Dmitry Butskoy <Dmitry at Butskoy.name> - 0.2.33-14
+- new systemd-rpm macros (#850382)
+- drop sysv triggerun migration
+
 * Sun Jul 22 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.2.33-13
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list