1 # Maintainer: Jim Pryor <profjim@jimpryor.net>
7 pkgdesc="dillon's lightweight cron daemon"
10 url="http://www.jimpryor.net/linux/dcron"
11 backup=('var/spool/cron/root' 'etc/conf.d/crond')
13 provides=('cron' "dcron=$_lastver")
14 conflicts=('cron' 'dcron' 'cronnie')
15 # to update the manpages, you need pandoc or haskell-pandoc
18 optdepends=('smtp-server: sending cron job output via email')
20 _gitroot="git://git.jimpryor.net/dcron.git"
26 if [[ -d "$_gitname" ]]; then
27 msg "Updating Git repository"
28 (cd "$_gitname"; git checkout master; git pull origin)
30 msg "Checking out fresh Git repository"
31 git clone "$_gitroot" "$_gitname"
34 rsync -a --exclude='.git' --delete "$_gitname/" "${_gitname}-build"
35 cd "${_gitname}-build"
36 msg "Starting build..."
39 sed -i -e 's=/var/spool/cron/crontabs=/var/spool/cron=; s=/var/spool/cron/cronstamps=/var/spool/cronstamps=' crond.8
40 sed -i -e 's=/var/spool/cron/crontabs=/var/spool/cron=; s=/var/spool/cron/cronstamps=/var/spool/cronstamps=' crontab.1
42 # by default, any member of group "users" can edit their own crontab
45 VERSION="$_lastver git-$(cd ../${_gitname}; git rev-parse HEAD | cut -c-7)" \
47 CRONTABS=/var/spool/cron \
48 CRONSTAMPS=/var/spool/cronstamps
49 make man || true # this is allowed to fail, we just use existing manpages
53 cd "$srcdir/${_gitname}-build"
54 make DESTDIR="$pkgdir" install
56 # install standard configuration and scripts
57 install -d -m755 "$pkgdir/etc/cron."{hourly,daily,weekly,monthly}
59 install -D -m755 extra/run-cron "$pkgdir/usr/sbin/run-cron"
60 install -D -m0600 extra/root.crontab "$pkgdir/var/spool/cron/root"
61 install -D -m755 extra/crond.rc "$pkgdir/etc/rc.d/crond"
62 install -D -m0644 extra/crond.conf "$pkgdir/etc/conf.d/crond"
63 install -D -m644 extra/crontab.vim "$pkgdir/usr/share/vim/vimfiles/ftplugin/crontab.vim"
64 sed -i -e 's=/var/spool/cron/cronstamps=/var/spool/cronstamps=' extra/prune-cronstamps
65 install -D -m755 extra/prune-cronstamps "$pkgdir/etc/cron.d/prune-cronstamps"