[lcdproc/f17] Revert "Support systemd macro for lcdproc"
Nicolas Chauvet
kwizart at fedoraproject.org
Mon Dec 31 09:04:00 UTC 2012
commit 4cf2e513c0bbd9161ac5baad20028d9c8f49f06b
Author: Nicolas Chauvet <kwizart at gmail.com>
Date: Mon Dec 31 10:03:47 2012 +0100
Revert "Support systemd macro for lcdproc"
This reverts commit 0b5d2d788732a4be685258848d93f59718888cc0.
lcdproc.spec | 42 ++++++++++++++++++++++++++++++------------
1 files changed, 30 insertions(+), 12 deletions(-)
---
diff --git a/lcdproc.spec b/lcdproc.spec
index 6c6f819..a3b303a 100644
--- a/lcdproc.spec
+++ b/lcdproc.spec
@@ -1,7 +1,7 @@
Summary: LCDproc displays real-time system information on a 20x4 backlit LCD
Name: lcdproc
Version: 0.5.5
-Release: 6%{?dist}
+Release: 5%{?dist}
License: GPLv2
URL: http://lcdproc.omnipotent.net
Group: System Environment/Libraries
@@ -10,7 +10,6 @@ Source1: lcdproc.service
Source2: LCDd.service
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: systemd
BuildRequires: doxygen
BuildRequires: graphviz
@@ -30,7 +29,9 @@ BuildRequires: libftdi-devel
BuildRequires: svgalib-devel
%endif
-%{?systemd_requires}
+Requires(post): systemd-units
+Requires(preun): systemd-units
+Requires(postun): systemd-units
@@ -93,17 +94,37 @@ touch $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/${f}
done
-%post
-%systemd_post LCDd.service lcdproc.service
+%triggerun -- lcdproc < 0.5.5-3
+/usr/bin/systemd-sysv-convert --save LCDd >/dev/null 2>&1 ||:
+/usr/bin/systemd-sysv-convert --save lcdproc >/dev/null 2>&1 ||:
+/sbin/chkconfig --del lcdproc >/dev/null 2>&1 || :
+/sbin/chkconfig --del LCDd >/dev/null 2>&1 || :
+/bin/systemctl try-restart LCDd.service >/dev/null 2>&1 || :
+/bin/systemctl try-restart lcdproc.service >/dev/null 2>&1 || :
-%preun
-%systemd_preun LCDd.service lcdproc.service
+%post
+if [ $1 -eq 1 ] ; then
+ # Initial installation
+ /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
+%preun
+if [ $1 -eq 0 ] ; then
+ # Package removal, not upgrade
+ /bin/systemctl --no-reload disable LCDd.service > /dev/null 2>&1 || :
+ /bin/systemctl --no-reload disable lcdproc.service > /dev/null 2>&1 || :
+ /bin/systemctl stop lcdproc.service > /dev/null 2>&1 || :
+ /bin/systemctl stop LCDd.service > /dev/null 2>&1 || :
+fi
%postun
-%systemd_postun LCDd.service lcdproc.service
-
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+ # Package upgrade, not uninstall
+ /bin/systemctl try-restart LCDd.service >/dev/null 2>&1 || :
+ /bin/systemctl try-restart lcdproc.service >/dev/null 2>&1 || :
+fi
%clean
@@ -126,9 +147,6 @@ rm -rf $RPM_BUILD_ROOT __doc
%changelog
-* Wed Aug 29 2012 Nicolas Chauvet <kwizart at gmail.com> - 0.5.5-6
-- Add systemd macro - rbz#850181
-
* Sun Jul 22 2012 Nicolas Chauvet <kwizart at gmail.com> - 0.5.5-5
- Fix for rhbz#821270
More information about the scm-commits
mailing list