void-packages/srcpkgs/dcron/template
2014-10-13 18:42:26 +02:00

50 lines
1.4 KiB
Text

# Template file for 'dcron'
pkgname=dcron
version=4.5
revision=25
conf_files="/var/spool/cron/root"
replaces="cron-daemon>=0 runit-void<20141013_2"
provides="cron-daemon-1_1"
short_desc="Dillon's lightweight cron daemon"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.jimpryor.net/linux/dcron.html"
license="GPL-2"
distfiles="http://www.jimpryor.net/linux/releases/dcron-${version}.tar.gz"
checksum=9e50edb6f5bd8153b16bad05087d985e5153ce45cc01ae77e7f842213fb4a824
make_dirs="
/etc/cron.d 0755 root root
/etc/cron.hourly 0755 root root
/etc/cron.weekly 0755 root root
/etc/cron.monthly 0755 root root
/etc/cron.yearly 0755 root root
/var/spool/cronstamps 0755 root root"
build_options="systemd"
if [ "$build_option_systemd" ]; then
systemd_services="dcron.service on"
fi
do_configure() {
sed -i 's,-[og] root,,g' Makefile
}
do_build() {
make CFLAGS="$CFLAGS -fPIE" LDFLAGS="$LDFLAGS -pie" \
PREFIX=/usr CRONTAB_GROUP=$(whoami) CRONTABS=/var/spool/cron \
CRONSTAMPS=/var/spool/cronstamps ${makejobs}
}
do_install() {
make DESTDIR=${DESTDIR} install
install -Dm755 extra/run-cron ${DESTDIR}/usr/sbin/run-cron
install -Dm600 extra/root.crontab ${DESTDIR}/var/spool/cron/root
# crontab must be setuid for all users to work!
chmod 4755 ${DESTDIR}/usr/bin/crontab
if [ "$build_option_systemd" ]; then
vinstall ${FILESDIR}/dcron.service 644 usr/lib/systemd/system
fi
vsv dcron
}