]> git.pld-linux.org Git - packages/anacron.git/blob - anacron.spec
9f43461e93b74c956a5c8b11f2704d32f982f15e
[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:        1
6 License:        GPL
7 Group:          Daemons
8 Source0:        %{name}-%{version}.tar.gz
9 Source1:        anacrontab
10 Source2:        %{name}.init
11 Requires:       /bin/sh
12 Prereq:         /sbin/chkconfig
13 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
14
15 %description
16 Anacron (like `anac(h)ronistic') is a periodic command scheduler. It
17 executes commands at intervals specified in days. Unlike cron, it does
18 not assume that the system is running continuously. It can therefore
19 be used to control the execution of daily, weekly and monthly jobs (or
20 anything with a period of n days), on systems that don't run 24 hours
21 a day. When installed and configured properly, Anacron will make sure
22 that the commands are run at the specified intervals as closely as
23 machine-uptime permits.
24
25 This package is pre-configured to execute the daily jobs of the Red
26 Hat Linux system. You should install this program if your system isn't
27 powered on 24 hours a day to make sure the maintenance jobs of other
28 Red Hat Linux packages are executed each day.
29
30 %description -l pl
31 cron to standardowy unixowy program, okresowo uruchamiaj±cy zadane
32 przez u¿ytkowników programy. anacron jest wersj± crona umo¿liwiaj±c±
33 uruchamianie procesów które normalnie by siê nie wykona³y na przyk³ad
34 z powodu wy³±czenia maszyny. Jest to doskona³e rozwi±zanie dla
35 komputerów domowych które nie s± w³±czone 24h na dobê. Uwaga - anacron
36 nie zastêpuje crona a jedynie go wspomaga! Nie ma na przyk³ad
37 mo¿liwo¶ci uruchamiania procesów np co godzinê.
38
39 %prep
40 %setup -q
41
42 %build
43 %{__make} CFLAGS="$RPM_OPT_FLAGS"
44
45 %install
46 rm -rf $RPM_BUILD_ROOT
47 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},%{_mandir}/man{5,8}} \
48         $RPM_BUILD_ROOT/{var/spool/anacron,etc/rc.d/init.d}
49
50 install -s anacron $RPM_BUILD_ROOT%{_sbindir}
51 install anacron.8 $RPM_BUILD_ROOT%{_mandir}/man8/
52 install anacrontab.5 $RPM_BUILD_ROOT%{_mandir}/man5/
53 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
54 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
55
56 for i in cron.daily cron.weekly cron.monthly; do
57 install  -d $RPM_BUILD_ROOT%{_sysconfdir}/$i/
58 cat << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/$i/0anacron
59 #!/bin/sh
60 #
61 # anacron's cron script
62 #
63 # This script updates anacron time stamps. It is called through run-parts
64 # either by anacron itself or by cron.
65 #
66 # The script is called "0anacron" to assure that it will be executed
67 # _before_ all other scripts.
68
69 anacron -u $i
70
71 EOF
72 done
73
74 gzip -9nf ChangeLog COPYING README TODO
75
76 %post
77 /sbin/chkconfig --add anacron
78
79 %preun
80 /sbin/chkconfig --del anacron
81
82 %clean 
83 rm -rf $RPM_BUILD_ROOT
84
85 %files
86 %defattr(644,root,root,755)
87 %doc ChangeLog* COPYING* README* TODO*
88 %attr(755,root,root) %{_sbindir}/anacron
89 %attr(754,root,root) /etc/rc.d/init.d/*
90 %config %{_sysconfdir}/anacrontab
91 %dir /var/spool/anacron/
92 %config %{_sysconfdir}/cron.daily/0anacron
93 %config %{_sysconfdir}/cron.monthly/0anacron
94 %config %{_sysconfdir}/cron.weekly/0anacron
95 %{_mandir}/man[58]/*
This page took 0.022237 seconds and 2 git commands to generate.