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