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