%define name fcron %define version 2.0.1 %define release 1mdk Summary: Fcron is a task scheduler. Name: %{name} Version: %{version} Release: %{release} Source0: %{name}-%{version}.src.tar.bz2 Source1: %{name}-2.0.0-extra.tar.bz2 BuildRoot: %{_tmppath}/%{name}-root Prefix: %{_prefix} License: GPL Group: System/Configuration/Other URL: http://fcron.free.fr/ Patch0: %{name}-2.0.0-Makefile.in.patch.bz2 Patch1: fcron-2.0.1-gcc3_4.patch.bz2 Buildrequires: MailTransportAgent Requires: MailTransportAgent PreReq: rpm-helper %description Fcron is a scheduler. It aims at replacing Vixie Cron, so it implements most of its functionalities. But contrary to Vixie Cron, fcron does not need your system to be up 7 days a week, 24 hours a day : it also works well with systems which are not running neither all the time nor regularly (contrary to anacrontab). In other words, fcron does both the job of Vixie Cron and anacron, but does even more and better :)) ... %prep %setup -T -b 0 -n %{name}-%{version} %setup -T -D -a 1 mv %{name}-2.0.0-extra/fcrontab.example ./ %patch0 -p2 %patch1 -p1 -b .gcc3_4 %configure \ --prefix=%{prefix} \ --mandir=%{_mandir} \ --with-sendmail=/bin/false perl -p -i -e "s|^#define SENDMAIL .*|#define SENDMAIL \"%{_libdir}/sendmail\"|g" config.h %build make OPTIM="%{optflags}" %install install -d %{buildroot}%{_prefix}/bin install -d %{buildroot}%{_docdir} install -d %{buildroot}%{_sbindir} install -d %{buildroot}%{_mandir}/man{1,3,5,8} install -d %{buildroot}%{_initrddir} install -d %{buildroot}/var/spool/fcron make install \ ETC=%{buildroot}%{_sysconfdir} \ DESTBIN=%{buildroot}%{_prefix}/bin \ DESTSBIN=%{buildroot}%{_sbindir} \ DESTMAN=%{buildroot}%{_mandir} \ DESTDOC=%{buildroot}%{_docdir} \ FCRONTABS=%{buildroot}/var/spool/fcron install -c -m 755 script/sysVinit-launcher %{buildroot}%{_initrddir}/fcron install -c -m 755 convert-fcrontab %{buildroot}%{_bindir} sed "s|SBIN=@@DESTSBIN@|SBIN=%{_sbindir}|" < %{buildroot}%{_initrddir}/fcron > %{buildroot}%{_initrddir}/fcron.tmp mv %{buildroot}%{_initrddir}/fcron.tmp %{buildroot}%{_initrddir}/fcron # chmod 755 %{buildroot}%{_initrddir}/fcron %pre # Check now if there is an old ( < 1.1.x ) version of fcrontab on the system. echo `fcron -V 2>&1 | grep "^fcron "` > /tmp/PREVIOUS_VERSION if [ "$1" = "1" ]; then %_pre_useradd fcron /var/spool/fcron /bin/true fi %post if [ "$1" = "2" ]; then killall -TERM fcron FCRONTABS=/var/spool/fcron find ${FCRONTABS} -type f \( -name "*.orig" -a ! -name "root.orig" \) \ -exec chown fcron:fcron {} \; -exec chmod 640 {} \; find ${FCRONTABS} -type f -name "root.orig" -exec chown root:fcron {} \; -exec chmod 600 {} \; find ${FCRONTABS} -type f ! -name "*.orig" -exec chown root:root {} \; -exec chmod 600 {} \; [ -f %{_sysconfdir}/fcron.deny ] && chown root:fcron %{_sysconfdir}/fcron.deny [ -f %{_sysconfdir}/fcron.allow ] && chown root:fcron %{_sysconfdir}/fcron.allow if test -r "/tmp/PREVIOUS_VERSION"; then MAJOR=`cat /tmp/PREVIOUS_VERSION | awk '{print $2}' | awk -F '.' '{print $1}'` MINOR=`cat /tmp/PREVIOUS_VERSION | awk '{print $2}' | awk -F '.' '{print $2}'` fi if test \( "$MAJOR" -lt 1 \) -o \( \( "$MINOR" -lt 1 \) -a "$MAJOR" -eq 1 \); then for FILE in $FCRONTABS/* ; do \ if test "$FILE" != "$FCRONTABS/*"; then BASENAME=`basename $FILE` ; \ FCRONTAB=`echo "$BASENAME" | \ sed "s|.*orig|| ; s|fcrontab.sig|| ; s|rm.*||"` ; \ ( test ! -z "$FCRONTAB" && convert-fcrontab $FCRONTAB ) \ || echo -n ""; \ fi done fi fi %{_initrddir}/fcron start %_post_service %{name} %postun if [ "$1" = "0" ]; then # Remove user fcron %_postun_userdel fcron fi %preun %_preun_service %{name} %clean [ -n "%{buildroot}" -a "%{buildroot}" != / ] \ && rm -rf %{buildroot} %files %defattr(-,root,root,755) %doc doc/CHANGES doc/FAQ doc/INSTALL doc/LICENSE doc/README doc/THANKS doc/*html fcrontab.example %attr(640,root,fcron) %config(noreplace) %{_sysconfdir}/fcron.conf %attr(640,root,fcron) %config(noreplace) %{_sysconfdir}/fcron.allow %attr(640,root,fcron) %config(noreplace) %{_sysconfdir}/fcron.deny %attr(755,root,root) %config(noreplace) %{_initrddir}/fcron %{_mandir}/man8/fcron.8* %{_mandir}/man1/fcrontab.1* %{_mandir}/man5/fcrontab.5* %{_mandir}/man5/fcron.conf.5* %{_mandir}/man3/bitstring.3* %attr(6111,root,root) %{_bindir}/convert-fcrontab %attr(6111,root,root) %{_bindir}/fcronsighup %attr(6111,fcron,fcron) %{_bindir}/fcrontab %attr(110,root,root) %{_sbindir}/fcron %attr(770,fcron,fcron) /var/spool/fcron %changelog * Sat Oct 30 2004 Christiaan Welvaart <cjw@daneel.dyndns.org> 2.0.1-1mdk - 2.0.1 - patch1: fix build with gcc 3.4 * Fri May 09 2003 Marcel Pol <mpol@gmx.net> 2.0.0-9mdk - rebuild * Mon Apr 28 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.0-8mdk - make it build without %{_libdir}/sendmail present * Mon Jan 27 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.0-7mdk - build release - misc spec file fixes * Thu Dec 26 2002 Olivier Thauvin <thauvin@aerov.jussieu.fr> 2.0.0-6mdk - removing buggy and unused menu entry - macroize user add/del, service add/remove - prereq rpm-helper * Sat Dec 21 2002 Olivier Thauvin <thauvin@aerov.jussieu.fr> 2.0.0-5mdk - Requires: MailTransportAgent * Tue Aug 06 2002 Olivier Thauvin <thauvin@aerov.jussieu.fr> 2.0.0-4mdk - From Maxim Heijndijk <cchq@wanadoo.nl> 2.0.0-2 Add icons in menu entry * Thu Jun 13 2002 Olivier Thauvin <thauvin@aerov.jussieu.fr> 2.0.0-3mdk - png icons (out xpm!) - remove requires and buildrequires to /usr/lib/sendmail, actually not provide by postfix or sendmail, it is a link * Tue Jun 11 2002 Lenny Cartier <lenny@mandrakesoft.com> 2.0.0-2mdk - Buildrequires & requires on /usr/lib/sendmail * Mon May 27 2002 Lenny Cartier <lenny@mandrakesoft.com> 2.0.0-1mdk - from Max Heijndijk <cchq@wanadoo.nl> : - Upgrade to 2.0.0 - %pre: add group fcron. - %postun: Remove user fcron. * Thu Jul 12 2001 Max Heijndijk <cchq@wanadoo.nl> 1.1.1-1 - Upgrade to 1.1.1 - Fixed ownership permissions. * Fri May 11 2001 Daouda Lo <daouda@mandrakesoft.com> 1.0.3-1mdk - 1.0.3 - fix group * Sun Apr 8 2001 Daouda Lo <daouda@mandrakesoft.com> 1.0.2-1mdk - first mandrake build (spec from Max) - add-ons (add build servers macros, icons ...) - request for testing ... * Mon Mar 12 2001 Max Heijndijk <cchq@wanadoo.nl> 1.0.2-1 - Upgrade to 1.0.2 - Moved fcrontab.example to %doc * Mon Feb 26 2001 Max Heijndijk <cchq@wanadoo.nl> 1.0.0-1 - Upgrade to 1.0.0 * Tue Feb 6 2001 Max Heijndijk <cchq@wanadoo.nl> 0.9.5-2 - Fixed permissions in postinstall-script * Tue Feb 6 2001 Max Heijndijk <cchq@wanadoo.nl> 0.9.5-1 - Upgrade to 0.9.5 * Sat Feb 3 2001 Max Heijndijk <cchq@wanadoo.nl> 0.9.4-1 - Upgrade to 0.9.4 * Tue Nov 7 2000 Max Heijndijk <cchq@wanadoo.nl> 0.9.3-1 - Fixed exit status in postinstall script - Upgrade to 0.9.3 * Fri Nov 3 2000 Max Heijndijk <cchq@wanadoo.nl> 0.9.2.1-3 - Fixed bug in postinstall script * Thu Oct 26 2000 Max Heijndijk <cchq@wanadoo.nl> 0.9.2.1-2 - Added postinstall script to update fcrontabs * Fri Sep 22 2000 Max Heijndijk <cchq@wanadoo.nl> 0.9.2.1-1 - Upgrade to 0.9.2.1 * Fri Sep 22 2000 Max Heijndijk <cchq@wanadoo.nl> 0.9.1-1 - Upgrade to 0.9.1 * Fri Aug 18 2000 Max Heijndijk <cchq@wanadoo.nl> 0.9.0-5 - Added menu entryfile * Wed Aug 16 2000 Max Heijndijk <cchq@wanadoo.nl> 0.9.0-4 - Bzipped man pages * Mon Aug 7 2000 Max Heijndijk <cchq@wanadoo.nl> 0.9.0-3 - Added example config-file. * Sun Aug 6 2000 Max Heijndijk <cchq@wanadoo.nl> 0.9.0-2 - Added patch for initscript. - Removed fcron-launcher patch. - Added post and preun scripts. * Sun Aug 6 2000 Max Heijndijk <cchq@wanadoo.nl> 0.9.0-1 - Initial wrap.