]> git.pld-linux.org Git - packages/anacron.git/blob - anacron.spec
- Anacron isn't standard crond!
[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:        10
6 License:        GPL
7 Group:          Daemons
8 Group(de):      Server
9 Group(pl):      Serwery
10 Source0:        %{name}-%{version}.tar.gz
11 Source1:        %{name}tab
12 Source2:        %{name}.init
13 Requires:       /bin/sh
14 Prereq:         /sbin/chkconfig
15 Provides:       crondaemon
16 Provides:       crontabs
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 Obsoletes:      vixie-cron
19 Obsoletes:      hc-cron
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 Red
32 Hat 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 cron to standardowy unixowy program, okresowo uruchamiaj±cy zadane
38 przez u¿ytkowników programy. anacron jest wersj± crona umo¿liwiaj±c±
39 uruchamianie procesów które normalnie by siê nie wykona³y na przyk³ad
40 z powodu wy³±czenia maszyny. Jest to doskona³e rozwi±zanie dla
41 komputerów domowych które nie s± w³±czone 24h na dobê. Uwaga - anacron
42 nie zastêpuje crona a jedynie go wspomaga! Nie ma na przyk³ad
43 mo¿liwo¶ci uruchamiania procesów np co godzinê.
44
45 %prep
46 %setup -q
47
48 %build
49 %{__make} CFLAGS="%{!?debug:$RPM_OPT_FLAGS}%{?debug:-O -g}"
50
51 %install
52 rm -rf $RPM_BUILD_ROOT
53 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},%{_mandir}/man{5,8}} \
54         $RPM_BUILD_ROOT/{var/spool/anacron,etc/rc.d/init.d}
55
56 install anacron $RPM_BUILD_ROOT%{_sbindir}
57 install anacron.8 $RPM_BUILD_ROOT%{_mandir}/man8/
58 install anacrontab.5 $RPM_BUILD_ROOT%{_mandir}/man5/
59 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
60 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
61
62 for i in cron.daily cron.weekly cron.monthly; do
63 install  -d $RPM_BUILD_ROOT%{_sysconfdir}/$i/
64 cat << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/$i/0anacron
65 #!/bin/sh
66 #
67 # anacron's cron script
68 #
69 # This script updates anacron time stamps. It is called through run-parts
70 # either by anacron itself or by cron.
71 #
72 # The script is called "0anacron" to assure that it will be executed
73 # _before_ all other scripts.
74
75 anacron -u $i
76
77 EOF
78 done
79
80 gzip -9nf ChangeLog COPYING README TODO
81
82 %post
83 /sbin/chkconfig --add cron
84
85 if [ -f /var/lock/subsys/crond ]; then
86         /etc/rc.d/init.d/crond restart >&2
87 else
88         echo "Run \"/etc/rc.d/init.d/crond start\" to start Anacron daemon."
89 fi
90
91 %preun
92 /sbin/chkconfig --del cron
93 if [ "$1" = "0" ];then
94         if [ -f /var/lock/subsys/crond ]; then
95                 /etc/rc.d/init.d/crond stop >&2
96         fi
97         /sbin/chkconfig --del cron
98 fi
99
100 %clean 
101 rm -rf $RPM_BUILD_ROOT
102
103 %files
104 %defattr(644,root,root,755)
105 %doc ChangeLog* COPYING* README* TODO*
106 %attr(755,root,root) %{_sbindir}/anacron
107 %attr(754,root,root) /etc/rc.d/init.d/*
108 %config %{_sysconfdir}/anacrontab
109 %dir /var/spool/anacron/
110 %config %{_sysconfdir}/cron.daily/0anacron
111 %config %{_sysconfdir}/cron.monthly/0anacron
112 %config %{_sysconfdir}/cron.weekly/0anacron
113 %{_mandir}/man[58]/*
This page took 0.059161 seconds and 3 git commands to generate.