summaryrefslogtreecommitdiffstats
path: root/abs/core/dcron/PKGBUILD
blob: 61999c950604bc8b0155d149d1e9225a5ae03e40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Maintainer: Paul Mattal <paul.archlinux.org>

pkgname=dcron
pkgver=4.4
pkgrel=2
pkgdesc="dillon's lightweight cron daemon"
arch=(i686 x86_64)
license=('GPL')
url="http://www.jimpryor.net/linux/dcron"
backup=(var/spool/cron/root etc/conf.d/crond)
depends=('glibc')
provides=('cron')
groups=('base')
source=("http://www.jimpryor.net/linux/releases/${pkgname}-${pkgver}.tar.gz"
	'dcron-logname.patch'
	'dcron.rc.d'
	'dcron.conf.d')
md5sums=('02d848ba043a9df5bf2102a9f4bc04bd'
	 'c6054421b48100f7a2a7a36e2d33c92a'
	 '73693cdd59df526e729cdec99c5ed8fb'
	 '5bfa07beb54d0beaf3f38225e4d5a9fa')
optdepends=('smtp-server: sending cron job output via email')
install=$pkgname.install

build() {
	cd "$srcdir/${pkgname}-${pkgver}" || return 1

	# patch to add LOGNAME environment variable
	patch -p1 -i $srcdir/dcron-logname.patch || return 1

	# by default, any member of group "users" can edit their own crontab
	make \
		PREFIX=/usr \
		CRONTAB_GROUP=users \
		CRONTABS=/var/spool/cron \
		CRONSTAMPS=/var/spool/cronstamps \
		|| return 1
	make DESTDIR="$pkgdir" install || return 1

	# install standard configuration and scripts
	install -d -m755 "$pkgdir/etc/cron."{hourly,daily,weekly,monthly} \
		|| return 1
	install -D -m755 extra/run-cron "$pkgdir/usr/sbin/run-cron" || return 1
	install -D -m0600 extra/root.crontab "$pkgdir/var/spool/cron/root" \
		|| return 1

	# install Arch configuration and launch scripts
	install -D -m755 "$srcdir/dcron.rc.d" "$pkgdir/etc/rc.d/crond" || return 1
	install -D -m0644 "$srcdir/dcron.conf.d" "$pkgdir/etc/conf.d/crond" || return 1
}