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