]> git.pld-linux.org Git - packages/Zope-TimerService.git/commitdiff
- use %service
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 23 Mar 2006 19:27:26 +0000 (19:27 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    Zope-TimerService.spec -> 1.12

Zope-TimerService.spec

index b892c1a3565b9916448fa1b1b8c6f069475cc0a2..a9604294bfca10d959337e3138283712769f5ada 100644 (file)
@@ -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 "<timer-server>" >> /etc/zope/main/zope.conf
-echo "</timer-server>" >> /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 "<timer-server>" >> /etc/zope/main/zope.conf
+       echo "</timer-server>" >> /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
This page took 0.142834 seconds and 4 git commands to generate.