2 # - missing /etc/cron.hourly processing!!!!
3 # - doesn't obsolete other crondaemons like other Provides: crondaemons do.
4 Summary: A cron-like program that can run jobs lost during downtime
5 Summary(pl.UTF-8): Wersja crona z możliwością uruchamiania zapomnianych procesów
6 Summary(pt_BR.UTF-8): Auxiliar do cron para máquinas que não ficam ligadas o tempo todo
12 Source0: http://dl.sourceforge.net/anacron/%{name}-%{version}.tar.gz
13 # Source0-md5: 865cc1dfe1ed75c470d3e6de13763f03
16 Patch0: %{name}-SIGTERM.patch
17 Patch1: %{name}-sendmail.patch
18 Patch2: %{name}-content-type.patch
19 Patch3: %{name}-mailto.patch
20 Patch4: %{name}-noconst.patch
21 URL: http://anacron.sourceforge.net/
22 BuildRequires: rpmbuild(macros) >= 1.268
23 Requires(post,preun): /sbin/chkconfig
24 Requires: /usr/lib/sendmail
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 Anacron (like `anac(h)ronistic') is a periodic command scheduler. It
31 executes commands at intervals specified in days. Unlike cron, it does
32 not assume that the system is running continuously. It can therefore
33 be used to control the execution of daily, weekly and monthly jobs (or
34 anything with a period of n days), on systems that don't run 24 hours
35 a day. When installed and configured properly, Anacron will make sure
36 that the commands are run at the specified intervals as closely as
37 machine-uptime permits.
39 This package is pre-configured to execute the daily jobs of the PLD
40 Linux system. You should install this program if your system isn't
41 powered on 24 hours a day to make sure the maintenance jobs of other
42 PLD Linux packages are executed each day.
44 %description -l pl.UTF-8
45 Anacron (od ,,anac(h)ronistic'') zajmuje się okresowym wykonywaniem
46 poleceń. Wykonuje je w odstępach będących wielokrotnością dni. W
47 przeciwieństwie do crona nie zakłada, że system działa 24 godziny na
48 dobę. Dzięki temu może być używany do wykonywania codziennych,
49 cotygodniowych i comiesięcznych (lub innych powtarzających się co ileś
50 dni) zadań w systemach, które nie są włączone non-stop. Zainstalowany
51 i poprawnie skonfigurowany Anacron zapewni wykonywanie zleconych zadań
52 tak blisko wyznaczonych terminów, jak tylko możliwe.
54 Ten pakiet został wstępnie skonfigurowany do działania w systemie PLD
55 Linux. Powinieneś zainstalować ten program na systemach, które nie są
56 włączone non-stop aby zapewnić uruchamianie różnych zadań
57 utrzymujących system we właściwych odstępach czasu.
59 %description -l pt_BR.UTF-8
60 Anacron é uma agenda para marcar a execução de comandos em horários
61 programados. Ao contrário do cron, o anacron não requer que o sistema
62 esteja rodando continuamente, podendo ser executado em sistemas que
63 não estão ligados 24 horas por dia.
79 rm -rf $RPM_BUILD_ROOT
80 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},%{_mandir}/man{5,8}} \
81 $RPM_BUILD_ROOT/{var/spool/anacron,etc/rc.d/init.d}
83 install anacron $RPM_BUILD_ROOT%{_sbindir}
84 install anacron.8 $RPM_BUILD_ROOT%{_mandir}/man8/
85 install anacrontab.5 $RPM_BUILD_ROOT%{_mandir}/man5/
86 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
87 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
89 for i in cron.daily cron.weekly cron.monthly; do
90 install -d $RPM_BUILD_ROOT%{_sysconfdir}/$i/
91 cat << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/$i/0anacron
94 # anacron's cron script
96 # This script updates anacron time stamps. It is called through run-parts
97 # either by anacron itself or by cron.
99 # The script is called "0anacron" to assure that it will be executed
100 # _before_ all other scripts.
108 rm -rf $RPM_BUILD_ROOT
111 /sbin/chkconfig --add anacron
112 %service anacron restart "Anacron daemon"
115 if [ "$1" = "0" ];then
116 %service anacron stop
117 /sbin/chkconfig --del anacron
121 %defattr(644,root,root,755)
122 %doc ChangeLog README TODO
123 %attr(755,root,root) %{_sbindir}/anacron
124 %attr(754,root,root) /etc/rc.d/init.d/*
125 %config %{_sysconfdir}/anacrontab
126 %dir /var/spool/anacron/
127 %attr(750,root,root) %dir %{_sysconfdir}/cron.*
128 %attr(755,root,root) /etc/cron.daily/0anacron
129 %attr(755,root,root) %{_sysconfdir}/cron.monthly/0anacron
130 %attr(755,root,root) %{_sysconfdir}/cron.weekly/0anacron