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