]>
Commit | Line | Data |
---|---|---|
9bf8388c | 1 | Summary: A cron-like program that can run jobs lost during downtime |
993f53a9 ER |
2 | Summary(pl.UTF-8): Wersja crona z możliwością uruchamiania zapomnianych procesów |
3 | Summary(pt_BR.UTF-8): Auxiliar do cron para máquinas que não ficam ligadas o tempo todo | |
f5ff248a | 4 | Name: anacron |
9553d481 | 5 | Version: 2.3 |
438e8d9b | 6 | Release: 27 |
f5ff248a | 7 | License: GPL |
23ea5e36 | 8 | Group: Daemons |
0c2f2724 | 9 | Source0: http://dl.sourceforge.net/anacron/%{name}-%{version}.tar.gz |
55acf6aa | 10 | # Source0-md5: 865cc1dfe1ed75c470d3e6de13763f03 |
7e8ef6b1 | 11 | Source1: %{name}tab |
9553d481 | 12 | Source2: %{name}.init |
17ba7b79 | 13 | Patch0: %{name}-SIGTERM.patch |
29a0946b | 14 | Patch1: %{name}-sendmail.patch |
86768a8b | 15 | Patch2: %{name}-content-type.patch |
d2ac05bd | 16 | Patch3: %{name}-mailto.patch |
17 | Patch4: %{name}-noconst.patch | |
521f1145 | 18 | URL: http://anacron.sourceforge.net/ |
0c2f2724 | 19 | BuildRequires: rpmbuild(macros) >= 1.268 |
b04e7513 | 20 | Requires(post,preun): /sbin/chkconfig |
02ce48e5 | 21 | Requires: /usr/lib/sendmail |
b04e7513 | 22 | Requires: rc-scripts |
438e8d9b | 23 | Suggests: crondaemon |
f5ff248a | 24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
26 | %description | |
27 | Anacron (like `anac(h)ronistic') is a periodic command scheduler. It | |
9bf8388c | 28 | executes commands at intervals specified in days. Unlike cron, it does |
29 | not assume that the system is running continuously. It can therefore | |
30 | be used to control the execution of daily, weekly and monthly jobs (or | |
31 | anything with a period of n days), on systems that don't run 24 hours | |
32 | a day. When installed and configured properly, Anacron will make sure | |
33 | that the commands are run at the specified intervals as closely as | |
34 | machine-uptime permits. | |
35 | ||
29a0946b | 36 | This package is pre-configured to execute the daily jobs of the PLD |
37 | Linux system. You should install this program if your system isn't | |
38 | powered on 24 hours a day to make sure the maintenance jobs of other | |
8c7ef352 | 39 | PLD Linux packages are executed each day. |
f5ff248a | 40 | |
c34282e4 JR |
41 | %description -l pl.UTF-8 |
42 | Anacron (od ,,anac(h)ronistic'') zajmuje się okresowym wykonywaniem | |
43 | poleceń. Wykonuje je w odstępach będących wielokrotnością dni. W | |
44 | przeciwieństwie do crona nie zakłada, że system działa 24 godziny na | |
45 | dobę. Dzięki temu może być używany do wykonywania codziennych, | |
46 | cotygodniowych i comiesięcznych (lub innych powtarzających się co ileś | |
47 | dni) zadań w systemach, które nie są włączone non-stop. Zainstalowany | |
48 | i poprawnie skonfigurowany Anacron zapewni wykonywanie zleconych zadań | |
49 | tak blisko wyznaczonych terminów, jak tylko możliwe. | |
17ba7b79 | 50 | |
c34282e4 JR |
51 | Ten pakiet został wstępnie skonfigurowany do działania w systemie PLD |
52 | Linux. Powinieneś zainstalować ten program na systemach, które nie są | |
53 | włączone non-stop aby zapewnić uruchamianie różnych zadań | |
54 | utrzymujących system we właściwych odstępach czasu. | |
29a0946b | 55 | |
c34282e4 JR |
56 | %description -l pt_BR.UTF-8 |
57 | Anacron é uma agenda para marcar a execução de comandos em horários | |
58 | programados. Ao contrário do cron, o anacron não requer que o sistema | |
29a0946b | 59 | esteja rodando continuamente, podendo ser executado em sistemas que |
c34282e4 | 60 | não estão ligados 24 horas por dia. |
f5ff248a | 61 | |
62 | %prep | |
63 | %setup -q | |
17ba7b79 | 64 | %patch0 -p1 |
29a0946b | 65 | %patch1 -p1 |
d2ac05bd | 66 | %patch2 -p1 |
67 | %patch3 -p1 | |
68 | %patch4 -p1 | |
f5ff248a | 69 | |
70 | %build | |
b40ecc78 | 71 | %{__make} \ |
2d9feb48 ER |
72 | CC="%{__cc}" \ |
73 | CFLAGS="%{rpmcflags}" | |
f5ff248a | 74 | |
75 | %install | |
9bf8388c | 76 | rm -rf $RPM_BUILD_ROOT |
9553d481 | 77 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},%{_mandir}/man{5,8}} \ |
9bf8388c | 78 | $RPM_BUILD_ROOT/{var/spool/anacron,etc/rc.d/init.d} |
f5ff248a | 79 | |
7e8ef6b1 | 80 | install anacron $RPM_BUILD_ROOT%{_sbindir} |
f5ff248a | 81 | install anacron.8 $RPM_BUILD_ROOT%{_mandir}/man8/ |
82 | install anacrontab.5 $RPM_BUILD_ROOT%{_mandir}/man5/ | |
9bf8388c | 83 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir} |
9553d481 | 84 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
f5ff248a | 85 | |
9bf8388c | 86 | for i in cron.daily cron.weekly cron.monthly; do |
0c2f2724 | 87 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/$i/ |
f5ff248a | 88 | cat << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/$i/0anacron |
89 | #!/bin/sh | |
90 | # | |
91 | # anacron's cron script | |
92 | # | |
93 | # This script updates anacron time stamps. It is called through run-parts | |
94 | # either by anacron itself or by cron. | |
95 | # | |
96 | # The script is called "0anacron" to assure that it will be executed | |
97 | # _before_ all other scripts. | |
98 | ||
99 | anacron -u $i | |
100 | ||
101 | EOF | |
102 | done | |
103 | ||
f57ac8d7 | 104 | %clean |
751a7edd JB |
105 | rm -rf $RPM_BUILD_ROOT |
106 | ||
f5ff248a | 107 | %post |
20cc6eb5 | 108 | /sbin/chkconfig --add anacron |
0c2f2724 | 109 | %service anacron restart "Anacron daemon" |
f5ff248a | 110 | |
111 | %preun | |
20cc6eb5 | 112 | if [ "$1" = "0" ];then |
0c2f2724 | 113 | %service anacron stop |
20cc6eb5 | 114 | /sbin/chkconfig --del anacron |
115 | fi | |
f5ff248a | 116 | |
f5ff248a | 117 | %files |
118 | %defattr(644,root,root,755) | |
123fb7a1 | 119 | %doc ChangeLog README TODO |
9bf8388c | 120 | %attr(755,root,root) %{_sbindir}/anacron |
121 | %attr(754,root,root) /etc/rc.d/init.d/* | |
f5ff248a | 122 | %config %{_sysconfdir}/anacrontab |
123 | %dir /var/spool/anacron/ | |
b04e7513 | 124 | %attr(755,root,root) /etc/cron.daily/0anacron |
2d9feb48 ER |
125 | %attr(755,root,root) %{_sysconfdir}/cron.monthly/0anacron |
126 | %attr(755,root,root) %{_sysconfdir}/cron.weekly/0anacron | |
9bf8388c | 127 | %{_mandir}/man[58]/* |