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