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