]> git.pld-linux.org Git - packages/anacron.git/blob - anacron.spec
- this is not a cron daemon, so don't P: one, even S: using (!) - otherwise
[packages/anacron.git] / anacron.spec
1 Summary:        A cron-like program that can run jobs lost during downtime
2 Summary(pl.UTF-8):      Wersja crona z możliwością uruchamiania zapomnianych procesów
3 Summary(pt_BR.UTF-8):   Auxiliar do cron para máquinas que não ficam ligadas o tempo todo
4 Name:           anacron
5 Version:        2.3
6 Release:        27
7 License:        GPL
8 Group:          Daemons
9 Source0:        http://dl.sourceforge.net/anacron/%{name}-%{version}.tar.gz
10 # Source0-md5:  865cc1dfe1ed75c470d3e6de13763f03
11 Source1:        %{name}tab
12 Source2:        %{name}.init
13 Patch0:         %{name}-SIGTERM.patch
14 Patch1:         %{name}-sendmail.patch
15 Patch2:         %{name}-content-type.patch
16 Patch3:         %{name}-mailto.patch
17 Patch4:         %{name}-noconst.patch
18 URL:            http://anacron.sourceforge.net/
19 BuildRequires:  rpmbuild(macros) >= 1.268
20 Requires(post,preun):   /sbin/chkconfig
21 Requires:       /usr/lib/sendmail
22 Requires:       rc-scripts
23 Suggests:       crondaemon
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
27 Anacron (like `anac(h)ronistic') is a periodic command scheduler. It
28 executes commands at intervals specified in days. Unlike cron, it does
29 not assume that the system is running continuously. It can therefore
30 be used to control the execution of daily, weekly and monthly jobs (or
31 anything with a period of n days), on systems that don't run 24 hours
32 a day. When installed and configured properly, Anacron will make sure
33 that the commands are run at the specified intervals as closely as
34 machine-uptime permits.
35
36 This package is pre-configured to execute the daily jobs of the PLD
37 Linux system. You should install this program if your system isn't
38 powered on 24 hours a day to make sure the maintenance jobs of other
39 PLD Linux packages are executed each day.
40
41 %description -l pl.UTF-8
42 Anacron (od ,,anac(h)ronistic'') zajmuje się okresowym wykonywaniem
43 poleceń. Wykonuje je w odstępach będących wielokrotnością dni. W
44 przeciwieństwie do crona nie zakłada, że system działa 24 godziny na
45 dobę. Dzięki temu może być używany do wykonywania codziennych,
46 cotygodniowych i comiesięcznych (lub innych powtarzających się co ileś
47 dni) zadań w systemach, które nie są włączone non-stop. Zainstalowany
48 i poprawnie skonfigurowany Anacron zapewni wykonywanie zleconych zadań
49 tak blisko wyznaczonych terminów, jak tylko możliwe.
50
51 Ten pakiet został wstępnie skonfigurowany do działania w systemie PLD
52 Linux. Powinieneś zainstalować ten program na systemach, które nie są
53 włączone non-stop aby zapewnić uruchamianie różnych zadań
54 utrzymujących system we właściwych odstępach czasu.
55
56 %description -l pt_BR.UTF-8
57 Anacron é uma agenda para marcar a execução de comandos em horários
58 programados. Ao contrário do cron, o anacron não requer que o sistema
59 esteja rodando continuamente, podendo ser executado em sistemas que
60 não estão ligados 24 horas por dia.
61
62 %prep
63 %setup -q
64 %patch0 -p1
65 %patch1 -p1
66 %patch2 -p1
67 %patch3 -p1
68 %patch4 -p1
69
70 %build
71 %{__make} \
72         CC="%{__cc}" \
73         CFLAGS="%{rpmcflags}"
74
75 %install
76 rm -rf $RPM_BUILD_ROOT
77 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},%{_mandir}/man{5,8}} \
78         $RPM_BUILD_ROOT/{var/spool/anacron,etc/rc.d/init.d}
79
80 install anacron $RPM_BUILD_ROOT%{_sbindir}
81 install anacron.8 $RPM_BUILD_ROOT%{_mandir}/man8/
82 install anacrontab.5 $RPM_BUILD_ROOT%{_mandir}/man5/
83 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
84 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
85
86 for i in cron.daily cron.weekly cron.monthly; do
87 install -d $RPM_BUILD_ROOT%{_sysconfdir}/$i/
88 cat << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/$i/0anacron
89 #!/bin/sh
90 #
91 # anacron's cron script
92 #
93 # This script updates anacron time stamps. It is called through run-parts
94 # either by anacron itself or by cron.
95 #
96 # The script is called "0anacron" to assure that it will be executed
97 # _before_ all other scripts.
98
99 anacron -u $i
100
101 EOF
102 done
103
104 %clean
105 rm -rf $RPM_BUILD_ROOT
106
107 %post
108 /sbin/chkconfig --add anacron
109 %service anacron restart "Anacron daemon"
110
111 %preun
112 if [ "$1" = "0" ];then
113         %service anacron stop
114         /sbin/chkconfig --del anacron
115 fi
116
117 %files
118 %defattr(644,root,root,755)
119 %doc ChangeLog README TODO
120 %attr(755,root,root) %{_sbindir}/anacron
121 %attr(754,root,root) /etc/rc.d/init.d/*
122 %config %{_sysconfdir}/anacrontab
123 %dir /var/spool/anacron/
124 %attr(755,root,root) /etc/cron.daily/0anacron
125 %attr(755,root,root) %{_sysconfdir}/cron.monthly/0anacron
126 %attr(755,root,root) %{_sysconfdir}/cron.weekly/0anacron
127 %{_mandir}/man[58]/*
This page took 0.570219 seconds and 4 git commands to generate.