Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37865946
en ru br
Репозитории ALT
S:2.3-alt7
5.1: 2.3-alt2
4.1: 2.3-alt1
4.0: 2.3-ipl9mdk
3.0: 2.3-ipl9mdk
www.altlinux.org/Changes

Группа :: Система/Серверы
Пакет: anacron

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Name: anacron
Version: 2.3
Release: ipl9mdk

Summary: A cron-like program that doesn't go by time
Copyright: GPL
Group: System/Servers
Url: http://anacron.sourceforge.net/

Source: http://download.sourceforge.net/%name/%name-%version.orig.tar.bz2
Source1: %{name}tab
Source2: %name.init

Patch: %name-2.3-re.patch
Patch1: %name-2.3-alt-lock-file.patch

PreReq: /sbin/chkconfig

%define lockfile %_lockdir/subsys/%name

%description
Anacron (like `anac(h)ronistic') is a periodic command scheduler.  It
executes commands at intervals specified in days.  Unlike cron, it
does not assume that the system is running continuously.  It can
therefore be used to control the execution of daily, weekly and
monthly jobs (or anything with a period of n days), on systems that
don't run 24 hours a day.  When installed and configured properly,
Anacron will make sure that the commands are run at the specified
intervals as closely as machine-uptime permits.

This package is pre-configured to execute the daily jobs of the Mandrake
system. You should install this program if your system isn't powered on
24 hours a day to make sure the maintenance jobs of other Mandrake packages
are executed each day.

%prep
%setup -q
%patch -p1
%patch1 -p1
rm -f gregor.*

%build
%add_optflags -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -DLOCKFILE=\\\"%lockfile\\\"
%make_build

%install
install -p -m755 -D %name $RPM_BUILD_ROOT%_sbindir/%name
install -p -m644 -D %name.8 $RPM_BUILD_ROOT%_mandir/man8/%name.8
install -p -m644 -D %{name}tab.5 $RPM_BUILD_ROOT%_mandir/man5/%{name}tab.5
install -p -m644 -D %SOURCE1 $RPM_BUILD_ROOT%_sysconfdir/%{name}tab
install -p -m755 -D %SOURCE2 $RPM_BUILD_ROOT%_initdir/%name
mkdir -p $RPM_BUILD_ROOT/var/{run,spool}/%name

for f in cron.{dai,week,month}ly; do
mkdir -p "$RPM_BUILD_ROOT%_sysconfdir/$f"
cat << EOF >"$RPM_BUILD_ROOT%_sysconfdir/$f/000%name"
#!/bin/sh
#
# %name's cron script
#
# This script updates %name time stamps. It is called through run-parts
# either by %name itself or by cron.
#
# The script is called "000%name" to assure that it will be executed
# _before_ all other scripts.

exec %_sbindir/%name -u $f
EOF
chmod 750 "$RPM_BUILD_ROOT%_sysconfdir/$f/000%name"
done

%__subst s,RPM_LOCKFILE,%lockfile, $RPM_BUILD_ROOT%_initdir/%name

%post
%post_service %name

%preun
%preun_service %name

%files
%_sbindir/%name
%config(noreplace) %_initdir/%name
%config(noreplace) %attr(640,root,adm) %_sysconfdir/%{name}tab
%config(noreplace) %_sysconfdir/cron.*/*
%_mandir/man?/*
%attr(700,root,root) /var/*/%name
%doc ChangeLog README TODO

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin