From aa78a53b611ebea051a0d367ef981651726b04e6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Thu, 23 Mar 2006 19:27:26 +0000 Subject: [PATCH] - use %service Changed files: Zope-TimerService.spec -> 1.12 --- Zope-TimerService.spec | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/Zope-TimerService.spec b/Zope-TimerService.spec index b892c1a..a960429 100644 --- a/Zope-TimerService.spec +++ b/Zope-TimerService.spec @@ -13,10 +13,11 @@ Source0: http://dev.legco.biz/downloads/%{zope_subname}-%{version}.tar.gz Source1: Zope-timerserver_remover URL: http://dev.legco.biz/products/timerservice/ BuildRequires: python +BuildRequires: rpmbuild(macros) >= 1.268 %pyrequires_eq python-modules +Requires(post,postun): /usr/sbin/installzopeproduct Requires: Zope Requires: perl-modules -Requires(post,postun): /usr/sbin/installzopeproduct BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -57,25 +58,22 @@ rm -rf $RPM_BUILD_ROOT %post /usr/sbin/installzopeproduct %{_datadir}/%{name} %{zope_subname} -# ln -s %{py_sitedir}/%{module} /usr/lib/zope/lib/python/timerserver - -echo "%import timerserver" >> /etc/zope/main/zope.conf -echo "" >> /etc/zope/main/zope.conf -echo "" >> /etc/zope/main/zope.conf - -if [ -f /var/lock/subsys/zope ]; then - /etc/rc.d/init.d/zope restart >&2 +# ln -s %{py_sitedir}/%{module} %{_prefix}/lib/zope/lib/python/timerserver +if [ "$1" = 1 ]; then + echo "%import timerserver" >> /etc/zope/main/zope.conf + echo "" >> /etc/zope/main/zope.conf + echo "" >> /etc/zope/main/zope.conf fi +%service -q zope restart + %preun /usr/sbin/Zope-timerserver_remover %postun if [ "$1" = "0" ]; then /usr/sbin/installzopeproduct -d %{zope_subname} - if [ -f /var/lock/subsys/zope ]; then - /etc/rc.d/init.d/zope restart >&2 - fi + %service -q zope restart fi %files -- 2.43.0