archrelease: copy trunk to community-any
[ArchLinux/community.git] / fcron / trunk / PKGBUILD
blob0c48ebea9f15a280a0421f26c2d1451106c64eee
1 # Contributor: Giorgio Lando <lando at imap dot cc>
2 # Contributor: Sergej Pupykin
3 # Contributor: Thomas Bächler
4 # Contributor: Sébastien Luttringer
5 # Maintainer: Thorsten Töpper <atsutane-tu@freethoughts.de>
7 pkgname=fcron
8 pkgver=3.3.1
9 pkgrel=1
10 pkgdesc='Feature-rich cron implementation'
11 arch=(x86_64)
12 url='http://fcron.free.fr'
13 license=('GPL')
14 depends=('pam' 'run-parts')
15 makedepends=('smtp-forwarder' 'vim' 'fcron' 'systemd')
16 # use fcron as recursive deps to have user fcron installed during installation
17 # else add the following in build chroot
18 # groupadd -g 23 fcron
19 # useradd -r -d /var/spool/fcron -u 23 -g 23 fcron
20 optdepends=('smtp-forwarder: to send mails from cron jobs'
21             'vim: default editor for fcrontab')
22 provides=('cron')
23 conflicts=('dcron')
24 backup=('etc/fcron/fcron.conf'
25         'etc/fcron/fcron.allow'
26         'etc/fcron/fcron.deny'
27         'var/spool/fcron/systab.orig')
28 options=('emptydirs' '!makeflags')
29 install=$pkgname.install
30 source=("http://fcron.free.fr/archives/$pkgname-$pkgver.src.tar.gz"
31         "http://fcron.free.fr/archives/$pkgname-$pkgver.src.tar.gz.sign"
32         "fcron.sysusers"
33         'systab.orig')
34 sha512sums=('b9c5066bdf8588a6b8d811ccc0d49f1d41a17dabf898a280997a8136dc449c2a505c46868abf732f86184ff0720d51f17442691909acae8fb26edcd180cff281'
35             'SKIP'
36             '91a373073015b44839c85e180a5721eaf49717e5dcfca862ab6d857fa70f05a7bacfa7709553db94c8ab5e30fb7e9431a97103bfe927ef326c3bcdbfa6f3ee28'
37             '5ed83bcba95f28bceb716ccbc735284d7317f18d99506959abb24fa0f4a846435e23b4ab88ed64f71b89c89b1b02b182f708c3418a6095135ed75b9bb0ef446e')
38 validpgpkeys=('7733B98B987784DF27707D41F8E544EC485EE7BC')
40 build() {
41   cd $pkgname-$pkgver
42   # Don't use --username=root and --groupname=root, this completly break
43   # fcron security and allow local root escalation.
44   # Thanks to Anh K. Huynh <kyanh@theslinux.org> for reporting it.
45   ./configure --prefix=/usr \
46               --sbindir=/usr/bin \
47               --sysconfdir=/etc/fcron \
48               --with-answer-all=no \
49               --with-boot-install=no \
50               --datarootdir=/usr/share \
51               --datadir=/usr/share \
52               --with-docdir=/usr/share/doc \
53               --localstatedir=/var \
54               --with-systemdsystemunitdir=/usr/lib/systemd/system \
55               --with-piddir=/run \
56               --with-editor=/usr/bin/vim \
57               --with-sendmail=/usr/bin/sendmail
58   make
61 package() {
62   cd $pkgname-$pkgver
63   sed -e '/systemctl daemon-reload/d' -i Makefile
64   make DESTDIR="$pkgdir/" install
65   install -Dm644 files/fcron.pam "$pkgdir/etc/pam.d/fcron"
66   install -Dm644 files/fcrontab.pam "$pkgdir/etc/pam.d/fcrontab"
67   install -Dm644 "$srcdir/fcron.sysusers" "$pkgdir/usr/lib/sysusers.d/fcron.conf"
69   # Install a default fcrontab so that fcron can completely replace dcron
70   # We don't use binary format which is incompatible between arch and may cause crash
71   # We regenerate the binary format at each update
72   install -Dm640 "$srcdir/systab.orig" "$pkgdir/var/spool/fcron/systab.orig"
74   # Add cron.* directories
75   install -d -m755 "$pkgdir/etc/cron.daily"
76   install -d -m755 "$pkgdir/etc/cron.hourly"
77   install -d -m755 "$pkgdir/etc/cron.monthly"
78   install -d -m755 "$pkgdir/etc/cron.weekly"
80   # remove docs
81   rm -r "$pkgdir/usr/share/doc"
83   # avoid conflict with filesystem>=2012.06
84   rmdir "$pkgdir"/{var/,}run
86   # avoid conflict with libbsd - #31259
87   rm "$pkgdir/usr/share/man/man3/bitstring.3" \
88     "$pkgdir/usr/share/man/fr/man3/bitstring.3"
89   rmdir --ignore-fail-on-non-empty "$pkgdir/usr/share/man/man3" \
90     "$pkgdir/usr/share/man/fr/man3"
93 # vim:set ts=2 sw=2 et: