2 # - teach mcron to use /etc/cron.d
3 # - mcron.{init,crontab} not in git
5 Summary(fr.UTF-8): Démon cron
6 Summary(pl.UTF-8): Demon cron
12 Source0: https://ftp.gnu.org/gnu/mcron/%{name}-%{version}.tar.gz
13 # Source0-md5: 6fa2659cb026502e6be800a29214662b
14 #Source1: %{name}.init
15 Source2: cron.logrotate
16 Source3: cron.sysconfig
17 #Source4: %{name}.crontab
18 Patch0: %{name}-info.patch
19 URL: http://www.gnu.org/software/mcron/
20 BuildRequires: autoconf >= 2.69
21 BuildRequires: automake >= 1:1.11
22 BuildRequires: guile-devel >= 5:2.0
23 BuildRequires: guile-devel < 5:3.2
24 BuildRequires: help2man
25 BuildRequires: pkgconfig
26 BuildRequires: rpmbuild(macros) >= 1.268
27 BuildRequires: sed >= 4.0
28 BuildRequires: texinfo
29 Requires(post,preun): /sbin/chkconfig
30 Requires(postun): /usr/sbin/groupdel
31 Requires(postun): /usr/sbin/userdel
32 Requires(pre): /usr/bin/getgid
33 Requires(pre): /usr/sbin/groupadd
34 Requires: /bin/run-parts
37 Provides: crontabs = 1.7
38 Provides: group(crontab)
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 The GNU package mcron (Mellor's cron) is a 100% compatible replacement
45 for Vixie cron. It is written in pure Guile, and allows configuration
46 files to be written in scheme (as well as Vixie's original format) for
47 infinite flexibility in specifying when jobs should be run.
49 %description -l pl.UTF-8
50 Pakiet GNU mcron (Mellor's cron) jest w 100% kompatybilnym
51 zamiennikiem Vixie crona. Jest napisany w czystym Guile i pozwala na
52 pisanie plików konfiguracyjnych w scheme (a także w oryginalnym
53 formacie Vixie), co daje nieskończoną elastyczność w określaniu zadań
60 # XXX: this is wrong, /etc/cron.d _directory_ should be processed instead of single file!
61 %{__sed} -i -e 's#/etc/crontab#/etc/cron.d/crontab#g' \
62 src/mcron/scripts/cron.scm \
64 src/mcron/vixie-specification.scm \
73 --disable-silent-rules \
74 --with-allow-file=/etc/cron/cron.allow \
75 --with-deny-file=/etc/cron/cron.deny \
76 --with-sendmail="/usr/lib/sendmail -t" \
77 --with-socket-file=/var/run/mcron.sock \
78 --with-spool-dir=/var/spool/cron
82 rm -rf $RPM_BUILD_ROOT
83 install -d $RPM_BUILD_ROOT/var/{log,spool/cron} \
84 $RPM_BUILD_ROOT/etc/{cron,cron.{d,hourly,daily,weekly,monthly},rc.d/init.d,logrotate.d,sysconfig} \
87 DESTDIR=$RPM_BUILD_ROOT
89 #install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/crond
90 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/cron
91 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/cron
92 #install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/crontab
94 cat > $RPM_BUILD_ROOT/etc/cron/cron.allow << 'EOF'
95 # cron.allow This file describes the names of the users which are
96 # allowed to use the local cron daemon
100 cat > $RPM_BUILD_ROOT/etc/cron/cron.deny << 'EOF'
101 # cron.deny This file describes the names of the users which are
102 # NOT allowed to use the local cron daemon
106 rm -rf $RPM_BUILD_ROOT
109 %groupadd -g 117 -r -f crontab
112 /sbin/chkconfig --add crond
113 %service crond restart "cron daemon"
116 chgrp crontab /var/log/cron
117 chmod 660 /var/log/cron
118 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
121 if [ "$1" = "0" ]; then
123 /sbin/chkconfig --del crond
127 if [ "$1" = "0" ]; then
130 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
133 %defattr(644,root,root,755)
134 %doc AUTHORS ChangeLog NEWS README TODO
136 %attr(640,root,crontab) %config(noreplace,missingok) %verify(not md5 mtime size) /etc/cron/cron.allow
137 %attr(640,root,crontab) %config(noreplace,missingok) %verify(not md5 mtime size) /etc/cron/cron.deny
138 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/cron
139 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cron
140 %attr(755,root,root) %{_bindir}/crontab
141 %attr(755,root,root) %{_bindir}/mcron
142 %attr(755,root,root) %{_sbindir}/cron
143 %{_libdir}/guile/2.*/site-ccache/mcron
144 %{_datadir}/guile/site/2.*/mcron
145 %dir %attr(1730,root,root) /var/spool/cron
146 %{_mandir}/man1/crontab.1*
147 %{_mandir}/man1/mcron.1*
148 %{_mandir}/man8/cron.8*
149 %{_infodir}/mcron.info*