%define product TimerService %define version 5.4.2 %define release 1 %define pyver 2.4 %define py_sitedir /usr/lib/python2.4/site-packages %define rpm_prefix erp5 %define zope_home %{_prefix}/lib/erp5 %define software_home %{zope_home}/lib/python %define configfile /etc/zope-erp5.conf Summary: Timer server for Zope Name: %{rpm_prefix}-%{product} Version: %{version} Release: %mkrel %{release} License: GPL Group: System/Servers URL: http://www.erp5.org Source0: http://www.erp5.org/dists/release/%{version}/%{product}.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-rootdir BuildArch: noarch Conflicts: TimerService Requires: %{rpm_prefix}-zope #---------------------------------------------------------------------- %description TimerService provides to Zope objects the ability to subsribe to timer events. This can be useful for any object which has to process tasks at regular interval in background. TimerService is a low level implementation. It is used by ZopeScheduler. It is also used by ERP5 and CMFActivity for cluster management. #---------------------------------------------------------------------- %prep %setup -q -c %build cd %{product}/timerserver python2.4 setup.py build %install %{__rm} -rf %{buildroot} %{__mkdir_p} %{buildroot}%{software_home}/Products %{__cp} -a * %{buildroot}%{software_home}/Products/ %{__rm} -rf %{buildroot}%{software_home}/Products/%{product}/timerserver %py_compile %{buildroot}%{software_home}/Products cd %{product}/timerserver python2.4 setup.py install --root=%{buildroot} %clean %{__rm} -rf %{buildroot} %post # Configure the zope server to make ot aware of the timerserver grep 'timer-server' %{configfile} 2>&1 > /dev/null || echo " # The Timer Server replace the ERP5 "zope_tic_loop" script %import timerserver interval 5 " >> %{configfile} # Restart zope server if [ "`%{_prefix}/bin/zopectl-erp5 status`" != "daemon manager not running" ] ; then service erp5 restart fi %postun if [ "$1" = "0" ] && [ "`%{_prefix}/bin/zopectl-erp5 status`" != "daemon manager not running" ] ; then service erp5 restart fi %files %defattr(0644, zope, zope, 0755) %doc %{product}/INSTALL.txt %{product}/CREDITS.txt %{product}/VERSION.txt %{py_sitedir}/timerserver* %{software_home}/Products/* #---------------------------------------------------------------------- %changelog * Sat Apr 25 2009 Kazuhiko Shiozaki 5.4.2-1nxd2009.0 - version 5.4.2 * Sat Apr 18 2009 Kazuhiko Shiozaki 5.4.1-1nxd2009.0 - version 5.4.1 * Tue Mar 3 2009 Kazuhiko Shiozaki 5.4-1nxd2009.0 - version 5.4 * Tue Nov 4 2008 Kazuhiko Shiozaki 5.3-1nxd2008.1 - version 5.3 * Mon Oct 6 2008 Kazuhiko Shiozaki 5.1.2-2nxd2008.1 - use setup.py for correct installation * Mon Oct 06 2008 Kazuhiko Shiozaki 5.1.2-1nxd2008.1 - version 5.1.2 * Fri Mar 23 2008 Julien Gormotte 0.3-7mdv2008.0 - New build from SVN repository (SVN rev: 20187) * Fri Dec 14 2007 Julien Gormotte 0.3-6mdv2008.0 - New build from SVN repository (SVN rev: 18325) * Wed Aug 8 2007 Kazuhiko Shiozaki 0.3-5mdv2007.1 - add *.pyc * Mon Jan 22 2007 Kevin Deldycke 0.3-4mdv2007.0 - Rebuild for Mandriva 2007.0 * Tue Jan 09 2007 Kevin Deldycke 0.3-3mdk - New build from the SVN repository (SVN rev: 11944; last changed rev: 11940) * Tue Jan 09 2007 Kevin Deldycke 0.3-2mdk - New build from the SVN repository (SVN rev: 11944; last changed rev: 11940) * Mon Jan 08 2007 Kevin Deldycke 0.3-1mdk - New build from the SVN repository * Tue Nov 14 2006 Kevin Deldycke 0.2-9mdk - Only add timer service config to zope.conf once. * Mon Oct 02 2006 Kevin Deldycke 0.2-8mdk - Add a new patch from Jerome (see http://svn.erp5.org?rev=10468&view=rev for details): - make TimerService.process_timer public to shut up VerboseSecurity messages, - use finally to release the lock in TimerService.process_timer, - reraise all exceptions from suscriber.process_timer. - Fix patch paths. * Wed Aug 16 2006 Kevin Deldycke 0.2-7mdk - Add a new patch. See http://svn.erp5.org/?rev=9230&view=rev for details * Mon Jun 19 2006 Kevin Deldycke 0.2-6mdk - Add a new patch. See http://svn.erp5.org/?rev=8067&view=rev for details * Mon Mar 06 2006 Kevin Deldycke 0.2-5mdk - Integrate new patch (see http://dev.legco.biz/forums/products/zopescheduler/0003/ for more details) * Wed Feb 01 2006 Kevin Deldycke 0.2-4mdk - Give ownership to zope * Mon Jan 30 2006 Kevin Deldycke 0.2-3mdk - Apply Klaus' patch: it seems it make zope starting in a better way * Mon Jan 23 2006 Kevin Deldycke 0.2-2mdk - Update the description - Set the default interval to 5 seconds - Include Klaus' patch in the SRPM archive but don't apply it * Wed Jan 18 2006 Kevin Deldycke 0.2-1mdk - Initial release