summaryrefslogtreecommitdiff
path: root/community-testing/dcron
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-06-18 00:01:40 +0000
committerroot <root@rshg054.dnsready.net>2012-06-18 00:01:40 +0000
commit0838a7ed482f29ddf71cf05e7ec6cf7c2728ce34 (patch)
treec7eab7aecb6ae497d23cfa7074bffd060d5eb8fe /community-testing/dcron
parent61f450a3578b7e51c337e1a687c0cef2bc07ff35 (diff)
Mon Jun 18 00:01:40 UTC 2012
Diffstat (limited to 'community-testing/dcron')
-rw-r--r--community-testing/dcron/PKGBUILD49
-rw-r--r--community-testing/dcron/dcron.install6
-rw-r--r--community-testing/dcron/service10
3 files changed, 65 insertions, 0 deletions
diff --git a/community-testing/dcron/PKGBUILD b/community-testing/dcron/PKGBUILD
new file mode 100644
index 000000000..709124059
--- /dev/null
+++ b/community-testing/dcron/PKGBUILD
@@ -0,0 +1,49 @@
+# $Id: PKGBUILD 72550 2012-06-16 17:08:55Z dreisner $
+# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
+# Contributor: Paul Mattal <paul.archlinux.org>
+
+pkgname=dcron
+pkgver=4.5
+pkgrel=3
+pkgdesc="dillon's lightweight cron daemon"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://www.jimpryor.net/linux/dcron.html"
+backup=('var/spool/cron/root' 'etc/conf.d/crond')
+depends=('bash')
+provides=('cron')
+conflicts=('cron')
+optdepends=('smtp-server: sending cron job output via email')
+install=$pkgname.install
+source=(http://www.jimpryor.net/linux/releases/${pkgname}-${pkgver}.tar.gz
+ service)
+md5sums=('078833f3281f96944fc30392b1888326'
+ '5a68a7aee883738e7f7f8549481bb297')
+
+build() {
+ cd "$srcdir/${pkgname}-${pkgver}"
+
+ # 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
+}
+
+package() {
+ cd "$srcdir/${pkgname}-${pkgver}"
+ make DESTDIR="$pkgdir" install
+
+ # install standard configuration and scripts
+ install -d -m755 "$pkgdir/etc/cron."{hourly,daily,weekly,monthly}
+
+ install -D -m755 extra/run-cron "$pkgdir/usr/sbin/run-cron"
+ install -D -m0600 extra/root.crontab "$pkgdir/var/spool/cron/root"
+ install -D -m755 extra/crond.rc "$pkgdir/etc/rc.d/crond"
+ install -D -m0644 extra/crond.conf "$pkgdir/etc/conf.d/crond"
+ install -D -m644 extra/crontab.vim "$pkgdir/usr/share/vim/vimfiles/ftplugin/crontab.vim"
+ sed -i -e 's=/var/spool/cron/cronstamps=/var/spool/cronstamps=' extra/prune-cronstamps
+ install -D -m755 extra/prune-cronstamps "$pkgdir/etc/cron.d/prune-cronstamps"
+ install -Dm644 $srcdir/service $pkgdir/usr/lib/systemd/system/dcron.service
+}
diff --git a/community-testing/dcron/dcron.install b/community-testing/dcron/dcron.install
new file mode 100644
index 000000000..df23d0224
--- /dev/null
+++ b/community-testing/dcron/dcron.install
@@ -0,0 +1,6 @@
+post_upgrade() {
+ if [ $(vercmp $2 4.0) -lt 0 ]
+ then
+ echo "Restart crond, since you're upgrading to the dcron 4.x series."
+ fi
+}
diff --git a/community-testing/dcron/service b/community-testing/dcron/service
new file mode 100644
index 000000000..59fc64b80
--- /dev/null
+++ b/community-testing/dcron/service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Periodic Command Scheduler
+
+[Service]
+Type=forking
+EnvironmentFile=/etc/conf.d/crond
+ExecStart=/usr/sbin/crond $CROND_ARGS
+
+[Install]
+WantedBy=multi-user.target