]> git.pld-linux.org Git - packages/mcron.git/blob - mcron.spec
- up to 1.2.1
[packages/mcron.git] / mcron.spec
1 # TODO
2 # - teach mcron to use /etc/cron.d
3 # - mcron.{init,crontab} not in git
4 Summary:        Cron daemon
5 Summary(fr.UTF-8):      Démon cron
6 Summary(pl.UTF-8):      Demon cron
7 Name:           mcron
8 Version:        1.2.1
9 Release:        0.1
10 License:        GPL v3+
11 Group:          Daemons
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
35 Requires:       rc-scripts
36 Provides:       crondaemon
37 Provides:       crontabs = 1.7
38 Provides:       group(crontab)
39 Obsoletes:      crondaemon
40 Obsoletes:      crontabs
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %description
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.
48
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ń
54 do uruchomienia.
55
56 %prep
57 %setup -q
58 %patch0 -p1
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
67
68 %build
69 %{__aclocal}
70 %{__autoconf}
71 %{__automake}
72 %configure \
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
79 %{__make}
80
81 %install
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} \
85
86 %{__make} install \
87         DESTDIR=$RPM_BUILD_ROOT
88
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
93
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
97 root
98 EOF
99
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
103 EOF
104
105 %clean
106 rm -rf $RPM_BUILD_ROOT
107
108 %pre
109 %groupadd -g 117 -r -f crontab
110
111 %post
112 /sbin/chkconfig --add crond
113 %service crond restart "cron daemon"
114 umask 027
115 touch /var/log/cron
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
119
120 %preun
121 if [ "$1" = "0" ]; then
122         %service crond stop
123         /sbin/chkconfig --del crond
124 fi
125
126 %postun
127 if [ "$1" = "0" ]; then
128         %groupremove crontab
129 fi
130 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
131
132 %files
133 %defattr(644,root,root,755)
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
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*
This page took 0.058019 seconds and 3 git commands to generate.