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