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