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