]> git.pld-linux.org Git - packages/mcron.git/blame - mcron.spec
- up to 1.2.1
[packages/mcron.git] / mcron.spec
CommitLineData
b9ccfa6e 1# TODO
ebec51bb
JB
2# - teach mcron to use /etc/cron.d
3# - mcron.{init,crontab} not in git
4f18be8c 4Summary: Cron daemon
f9ea83cf
ER
5Summary(fr.UTF-8): Démon cron
6Summary(pl.UTF-8): Demon cron
4f18be8c 7Name: mcron
9ebe5bfa 8Version: 1.2.1
ebec51bb
JB
9Release: 0.1
10License: GPL v3+
4f18be8c 11Group: Daemons
ebec51bb 12Source0: https://ftp.gnu.org/gnu/mcron/%{name}-%{version}.tar.gz
9ebe5bfa 13# Source0-md5: 6fa2659cb026502e6be800a29214662b
b9ccfa6e 14#Source1: %{name}.init
14362280 15Source2: cron.logrotate
16Source3: cron.sysconfig
b9ccfa6e 17#Source4: %{name}.crontab
71d44836 18Patch0: %{name}-info.patch
10b2d950 19URL: http://www.gnu.org/software/mcron/
9ebe5bfa 20BuildRequires: autoconf >= 2.69
ebec51bb
JB
21BuildRequires: automake >= 1:1.11
22BuildRequires: guile-devel >= 5:2.0
9ebe5bfa 23BuildRequires: guile-devel < 5:3.2
ebec51bb
JB
24BuildRequires: help2man
25BuildRequires: pkgconfig
0324753f 26BuildRequires: rpmbuild(macros) >= 1.268
53ae6170 27BuildRequires: sed >= 4.0
10b2d950 28BuildRequires: texinfo
0324753f 29Requires(post,preun): /sbin/chkconfig
6a55b46c
ER
30Requires(postun): /usr/sbin/groupdel
31Requires(postun): /usr/sbin/userdel
0324753f
ER
32Requires(pre): /usr/bin/getgid
33Requires(pre): /usr/sbin/groupadd
53ae6170 34Requires: /bin/run-parts
0324753f 35Requires: rc-scripts
4f18be8c 36Provides: crondaemon
506dd566 37Provides: crontabs = 1.7
92d09d05 38Provides: group(crontab)
506dd566 39Obsoletes: crondaemon
4f18be8c 40Obsoletes: crontabs
53ae6170 41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
4f18be8c 42
43%description
4f18be8c 44The GNU package mcron (Mellor's cron) is a 100% compatible replacement
45for Vixie cron. It is written in pure Guile, and allows configuration
46files to be written in scheme (as well as Vixie's original format) for
47infinite flexibility in specifying when jobs should be run.
48
cce4b411 49%description -l pl.UTF-8
53ae6170
JB
50Pakiet GNU mcron (Mellor's cron) jest w 100% kompatybilnym
51zamiennikiem Vixie crona. Jest napisany w czystym Guile i pozwala na
cce4b411 52pisanie plików konfiguracyjnych w scheme (a także w oryginalnym
ebec51bb
JB
53formacie Vixie), co daje nieskończoną elastyczność w określaniu zadań
54do uruchomienia.
53ae6170 55
4f18be8c 56%prep
53ae6170 57%setup -q
ebec51bb 58%patch0 -p1
ebec51bb
JB
59
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 \
63 src/mcron/utils.scm \
64 src/mcron/vixie-specification.scm \
65 doc/cron.8 \
66 doc/mcron.texi
4f18be8c 67
68%build
01970520 69%{__aclocal}
70%{__autoconf}
71%{__automake}
10b2d950 72%configure \
ebec51bb 73 --disable-silent-rules \
10b2d950 74 --with-allow-file=/etc/cron/cron.allow \
ebec51bb
JB
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
4f18be8c 79%{__make}
80
81%install
82rm -rf $RPM_BUILD_ROOT
10b2d950 83install -d $RPM_BUILD_ROOT/var/{log,spool/cron} \
ebec51bb
JB
84 $RPM_BUILD_ROOT/etc/{cron,cron.{d,hourly,daily,weekly,monthly},rc.d/init.d,logrotate.d,sysconfig} \
85
86%{__make} install \
87 DESTDIR=$RPM_BUILD_ROOT
10b2d950 88
b7b67b62 89#install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/crond
ebec51bb
JB
90cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/cron
91cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/cron
b7b67b62 92#install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/crontab
10b2d950 93
ebec51bb 94cat > $RPM_BUILD_ROOT/etc/cron/cron.allow << 'EOF'
14362280 95# cron.allow This file describes the names of the users which are
96# allowed to use the local cron daemon
10b2d950
AM
97root
98EOF
4f18be8c 99
ebec51bb 100cat > $RPM_BUILD_ROOT/etc/cron/cron.deny << 'EOF'
14362280 101# cron.deny This file describes the names of the users which are
102# NOT allowed to use the local cron daemon
0324753f 103EOF
4f18be8c 104
53ae6170
JB
105%clean
106rm -rf $RPM_BUILD_ROOT
107
10b2d950 108%pre
6a55b46c 109%groupadd -g 117 -r -f crontab
10b2d950
AM
110
111%post
112/sbin/chkconfig --add crond
0324753f 113%service crond restart "cron daemon"
10b2d950
AM
114umask 027
115touch /var/log/cron
116chgrp crontab /var/log/cron
117chmod 660 /var/log/cron
118[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
119
120%preun
121if [ "$1" = "0" ]; then
0324753f 122 %service crond stop
14362280 123 /sbin/chkconfig --del crond
10b2d950
AM
124fi
125
126%postun
127if [ "$1" = "0" ]; then
92d09d05 128 %groupremove crontab
10b2d950
AM
129fi
130[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
4f18be8c 131
4f18be8c 132%files
133%defattr(644,root,root,755)
ebec51bb
JB
134%doc AUTHORS ChangeLog NEWS README TODO
135%dir /etc/cron
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
c146f683
ER
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
ebec51bb
JB
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
c146f683 145%dir %attr(1730,root,root) /var/spool/cron
ebec51bb
JB
146%{_mandir}/man1/crontab.1*
147%{_mandir}/man1/mcron.1*
148%{_mandir}/man8/cron.8*
ab222db7 149%{_infodir}/mcron.info*
This page took 0.236211 seconds and 4 git commands to generate.