# $Id: PKGBUILD 111045 2014-05-12 10:09:29Z seblu $ # Contributor: Giorgio Lando # Contributor: Sergej Pupykin # Contributor: Thomas Bächler # Contributor: Sébastien Luttringer # Maintainer: Thorsten Töpper pkgname=fcron pkgver=3.1.3 pkgrel=1 pkgdesc='Feature-rich cron implementation' arch=(i686 x86_64) url='http://fcron.free.fr' license=('GPL') depends=('pam' 'run-parts') makedepends=('smtp-forwarder' 'vi' 'fcron') # use fcron as recursive deps to have user fcron installed during installation # else add the following in build chroot # groupadd -g 23 fcron # useradd -r -d /var/spool/fcron -u 23 -g 23 fcron optdepends=('smtp-forwarder: to send mails from cron jobs' 'vi: default editor for fcrontab') provides=('cron') conflicts=('dcron') backup=('etc/fcron/fcron.conf' 'etc/fcron/fcron.allow' 'etc/fcron/fcron.deny') options=('emptydirs' '!makeflags') install=$pkgname.install source=("http://fcron.free.fr/archives/$pkgname-$pkgver.src.tar.gz" 'systab.orig') md5sums=('b58ce88344eb4c80a353066547d20a24' 'afecbfd98caa49e8e4aa239fa1b19255') build() { cd $pkgname-$pkgver # Don't use --username=root and --groupname=root, this completly break # fcron security and allow local root escalation. # Thanks to Anh K. Huynh for reporting it. ./configure --prefix=/usr \ --sbindir=/usr/bin \ --sysconfdir=/etc/fcron \ --with-answer-all=no \ --with-boot-install=no \ --datarootdir=/usr/share \ --datadir=/usr/share \ --with-docdir=/usr/share/doc \ --localstatedir=/var \ --with-systemdsystemunitdir=/usr/lib/systemd/system \ --with-piddir=/run \ --with-editor=/usr/bin/vi \ --with-sendmail=/usr/bin/sendmail make } package() { cd $pkgname-$pkgver make DESTDIR="$pkgdir/" install install -Dm644 files/fcron.pam "$pkgdir/etc/pam.d/fcron" install -Dm644 files/fcrontab.pam "$pkgdir/etc/pam.d/fcrontab" # Install a default fcrontab so that fcron can completely replace dcron # We doesn't use binary format which is incompatible between arch and may cause crash # We regenerate the binary format at each update install -Dm640 "$srcdir/systab.orig" "$pkgdir/var/spool/fcron/systab.orig" # Add cron.* directories install -d -m755 "$pkgdir/etc/cron.daily" install -d -m755 "$pkgdir/etc/cron.hourly" install -d -m755 "$pkgdir/etc/cron.monthly" install -d -m755 "$pkgdir/etc/cron.weekly" # remove docs rm -r "$pkgdir/usr/share/doc" # avoid conflict with filesystem>=2012.06 rmdir "$pkgdir"/{var/,}run # avoid conflict with libbsd - #31259 rm "$pkgdir/usr/share/man/man3/bitstring.3" \ "$pkgdir/usr/share/man/fr/man3/bitstring.3" rmdir --ignore-fail-on-non-empty "$pkgdir/usr/share/man/man3" \ "$pkgdir/usr/share/man/fr/man3" } # vim:set ts=2 sw=2 et: