|
|
|
##
|
|
|
|
## dcron.spec -- OpenPKG RPM Specification
|
|
|
|
## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
|
|
|
|
## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
|
|
|
|
## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
|
|
|
|
##
|
|
|
|
## Permission to use, copy, modify, and distribute this software for
|
|
|
|
## any purpose with or without fee is hereby granted, provided that
|
|
|
|
## the above copyright notice and this permission notice appear in all
|
|
|
|
## copies.
|
|
|
|
##
|
|
|
|
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
|
|
|
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
|
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
|
|
|
|
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
|
|
|
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
|
|
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
|
|
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
## SUCH DAMAGE.
|
|
|
|
##
|
|
|
|
|
|
|
|
# package version
|
|
|
|
%define V_major 2
|
|
|
|
%define V_minor 9
|
|
|
|
|
|
|
|
# package information
|
|
|
|
Name: dcron
|
|
|
|
Summary: Dillon's Cron Daemon
|
|
|
|
URL: http://apollo.backplane.com/FreeSrc/
|
|
|
|
Vendor: Matthew Dillon
|
|
|
|
Packager: The OpenPKG Project
|
|
|
|
Distribution: OpenPKG
|
|
|
|
Class: EVAL
|
|
|
|
Group: System
|
|
|
|
License: GPL
|
|
|
|
Version: %{V_major}.%{V_minor}
|
|
|
|
Release: 20040203
|
|
|
|
|
|
|
|
# list of sources
|
|
|
|
Source0: http://apollo.backplane.com/FreeSrc/dcron%{V_major}%{V_minor}.tgz
|
|
|
|
Source1: rc.dcron
|
|
|
|
Patch0: dcron.patch
|
|
|
|
|
|
|
|
# build information
|
|
|
|
Prefix: %{l_prefix}
|
|
|
|
BuildRoot: %{l_buildroot}
|
|
|
|
BuildPreReq: OpenPKG, openpkg >= 20040130
|
|
|
|
PreReq: OpenPKG, openpkg >= 20040130, MTA, vim
|
|
|
|
AutoReq: no
|
|
|
|
AutoReqProv: no
|
|
|
|
|
|
|
|
%description
|
|
|
|
A multiuser cron written from scratch, dcron is follows concepts of
|
|
|
|
vixie-cron but has significant differences. Less attention is paid
|
|
|
|
to feature development in favor of usability and reliability.
|
|
|
|
|
|
|
|
%track
|
|
|
|
prog dcron = {
|
|
|
|
version = 2.3.3
|
|
|
|
url = http://www.ibiblio.org/pub/Linux/system/daemons/cron/
|
|
|
|
regex = dcron-(__VER__)\.tar\.gz
|
|
|
|
}
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n dcron
|
|
|
|
%patch -p0
|
|
|
|
|
|
|
|
%build
|
|
|
|
%{l_shtool} subst \
|
|
|
|
-e 's;/var/spool/cron/crontabs;%{l_prefix}/var/dcron/crontabs;' \
|
|
|
|
-e 's;/usr/lib/sendmail;%{l_prefix}/sbin/sendmail;' \
|
|
|
|
-e 's;/usr/bin/vi;%{l_prefix}/bin/vim;' \
|
|
|
|
-e 's;/var/run/dcron.pid;%{l_prefix}/var/dcron/dcron.pid;' \
|
|
|
|
defs.h
|
|
|
|
%{l_make} %{l_mflags -O} \
|
|
|
|
CC="%{l_cc}" \
|
|
|
|
CFLAGS="%{l_cflags}"
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%{l_shtool} mkdir -f -p -m 755 \
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/bin \
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/man/man1 \
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/man/man8 \
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/sbin \
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/var/dcron/crontabs
|
|
|
|
%{l_shtool} install -c -s -m 755 crontab $RPM_BUILD_ROOT%{l_prefix}/bin/
|
|
|
|
%{l_shtool} install -c -s -m 755 crond $RPM_BUILD_ROOT%{l_prefix}/sbin/
|
|
|
|
%{l_shtool} install -c -m 644 crontab.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
|
|
|
|
%{l_shtool} install -c -m 644 crond.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
|
|
|
|
%{l_shtool} install -c -m 755 %{l_value -s -a} \
|
|
|
|
%{SOURCE rc.dcron} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
|
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
|
|
|
|
%{l_files_std} \
|
|
|
|
'%attr(4755,%{l_susr},%{l_mgrp}) %{l_prefix}/bin/crontab'
|
|
|
|
|
|
|
|
%files -f files
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%post
|
|
|
|
# after upgrade, restart service
|
|
|
|
[ $1 -eq 2 ] || exit 0
|
|
|
|
eval `%{l_rc} dcron status 2>/dev/null`
|
|
|
|
[ ".$dcron_active" = .yes ] && %{l_rc} dcron restart
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
%preun
|
|
|
|
# before erase, stop service
|
|
|
|
[ $1 -eq 0 ] || exit 0
|
|
|
|
%{l_rc} dcron stop 2>/dev/null
|
|
|
|
exit 0
|
|
|
|
|