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