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