1 # $Id: PKGBUILD 56223 2011-10-03 14:27:18Z arodseth $
2 # Contributor: Giorgio Lando <lando at imap dot cc>
3 # Contributor: Sergej Pupykin
4 # Contributor: Thomas Bächler
5 # Maintainer: Thorsten Töpper <atsutane-tu@freethoughts.de>
10 pkgdesc="feature-rich cron implementation"
12 url="http://fcron.free.fr"
15 makedepends=('smtp-server')
16 optdepends=('smtp-server: to receive mails from cron jobs')
19 backup=(etc/fcron/fcron.conf etc/fcron/fcron.allow etc/fcron/fcron.deny \
20 var/spool/fcron/systab var/spool/fcron/systab.orig)
22 options=('emptydirs' '!makeflags')
23 source=(http://fcron.free.fr/archives/$pkgname-$pkgver.src.tar.gz fcron.rc \
24 systab systab.orig run-cron)
25 md5sums=('69ebcb41921e2a282f41ebecb3a27053'
26 'e0c3f0bdc3c98fbbe46eff19001c18f2'
27 '938722c6654ef7b07f4aa10001905ba1'
28 'bfb7daa22ebe22b9917e455c1ca4a382'
29 '5ff0cdcb9ec99778938ac6ef26800327')
32 cd "$srcdir/$pkgname-$pkgver"
33 ./configure --prefix=/usr \
34 --sysconfdir=/etc/fcron \
35 --with-answer-all=no \
36 --with-boot-install=no \
37 --with-username=cron \
38 --with-groupname=cron \
39 --datarootdir=/usr/share \
40 --datadir=/usr/share \
41 --with-docdir=/usr/share/doc \
42 --localstatedir=/var \
43 --with-editor=/usr/bin/vi \
44 --with-sendmail=/usr/sbin/sendmail
49 # Create necessary user and group
50 getent group cron || /usr/sbin/groupadd -g 22 cron
51 getent passwd cron || /usr/sbin/useradd -d / -g cron -u 22 -s /bin/false cron
53 cd "$srcdir/$pkgname-$pkgver"
54 mkdir -p "$pkgdir/var/spool"
55 make DESTDIR="$pkgdir/" install
56 install -D -m755 "$srcdir/fcron.rc" "$pkgdir/etc/rc.d/fcron"
57 install -D -m644 "$srcdir/$pkgname-$pkgver/files/fcron.pam" "$pkgdir/etc/pam.d/fcron"
58 install -D -m644 "$srcdir/$pkgname-$pkgver/files/fcrontab.pam" "$pkgdir/etc/pam.d/fcrontab"
59 # Install default fcrontab so that fcron can completely replace dcron
60 install -D -m600 "$srcdir/systab" "$pkgdir/var/spool/fcron/systab"
61 # In order to preserve the systab crontab in any case it is better to have
62 # it in non-binary form too
63 install -D -m600 "$srcdir/systab.orig" "$pkgdir/var/spool/fcron/systab.orig"
64 # Add cron.* directories
65 install -d -m755 "$pkgdir/etc/cron.daily"
66 install -d -m755 "$pkgdir/etc/cron.hourly"
67 install -d -m755 "$pkgdir/etc/cron.monthly"
68 install -d -m755 "$pkgdir/etc/cron.weekly"
69 # Install run-cron script to make fcron run without dcron
70 install -D -m755 "$srcdir/run-cron" "$pkgdir/usr/sbin/run-cron"
73 # vim:set ts=2 sw=2 et: