dcron: added systemd build option; use make_dirs.
This commit is contained in:
parent
dcdb7921a4
commit
6a7efe218b
srcpkgs/dcron
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'dcron'
|
# Template file for 'dcron'
|
||||||
pkgname=dcron
|
pkgname=dcron
|
||||||
version=4.5
|
version=4.5
|
||||||
revision=22
|
revision=23
|
||||||
conf_files="/var/spool/cron/root"
|
conf_files="/var/spool/cron/root"
|
||||||
replaces="cron-daemon>=0"
|
replaces="cron-daemon>=0"
|
||||||
provides="cron-daemon-1_1"
|
provides="cron-daemon-1_1"
|
||||||
|
@ -17,6 +17,16 @@ checksum=9e50edb6f5bd8153b16bad05087d985e5153ce45cc01ae77e7f842213fb4a824
|
||||||
CFLAGS="-fPIE"
|
CFLAGS="-fPIE"
|
||||||
LDFLAGS="-pie"
|
LDFLAGS="-pie"
|
||||||
|
|
||||||
|
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"
|
||||||
|
|
||||||
do_build() {
|
do_build() {
|
||||||
make PREFIX=/usr CRONTAB_GROUP=users CRONTABS=/var/spool/cron \
|
make PREFIX=/usr CRONTAB_GROUP=users CRONTABS=/var/spool/cron \
|
||||||
CRONSTAMPS=/var/spool/cronstamps ${makejobs}
|
CRONSTAMPS=/var/spool/cronstamps ${makejobs}
|
||||||
|
@ -25,16 +35,13 @@ do_build() {
|
||||||
do_install() {
|
do_install() {
|
||||||
make DESTDIR=${DESTDIR} install
|
make DESTDIR=${DESTDIR} install
|
||||||
|
|
||||||
for f in etc/cron.d etc/cron.hourly etc/cron.weekly etc/cron.monthly \
|
|
||||||
var/spool/cronstamps; do
|
|
||||||
vmkdir ${f}
|
|
||||||
touch ${DESTDIR}/${f}/.owned
|
|
||||||
done
|
|
||||||
|
|
||||||
install -Dm755 extra/run-cron ${DESTDIR}/usr/sbin/run-cron
|
install -Dm755 extra/run-cron ${DESTDIR}/usr/sbin/run-cron
|
||||||
install -Dm600 extra/root.crontab ${DESTDIR}/var/spool/cron/root
|
install -Dm600 extra/root.crontab ${DESTDIR}/var/spool/cron/root
|
||||||
|
|
||||||
vinstall ${FILESDIR}/dcron.service 644 usr/lib/systemd/system
|
|
||||||
# crontab must be setuid for all users to work!
|
# crontab must be setuid for all users to work!
|
||||||
chmod 4755 ${DESTDIR}/usr/bin/crontab
|
chmod 4755 ${DESTDIR}/usr/bin/crontab
|
||||||
|
|
||||||
|
if [ "$build_option_systemd" ]; then
|
||||||
|
vinstall ${FILESDIR}/dcron.service 644 usr/lib/systemd/system
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue