summaryrefslogtreecommitdiff
path: root/community-testing/cronie/PKGBUILD
blob: 15b7e1dd09fcf6b37c014dd859807a6aa555ba4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# $Id: PKGBUILD 45295 2011-04-19 04:31:20Z kchen $
# Maintainer: Kaiting Chen <kaiting.chen@kiwilight.com>

pkgname=cronie
pkgver=1.4.7
pkgrel=1
pkgdesc='Fedora fork of vixie-cron with PAM support'
arch=('i686' 'x86_64')
url='https://fedorahosted.org/cronie/'
license=('custom:ISC')
backup=(
  'etc/crontab' 'etc/anacrontab' 'etc/pam.d/crond')
provides=('cron' 'dcron')
depends=('pam')
source=("https://fedorahosted.org/releases/c/r/$pkgname/$pkgname-$pkgver.tar.gz"
  'crontab' 'anacrontab' 'crond.pam.d' 'crond.rc.d' 'run-cron')
md5sums=('dfc26c47756d0c40ee27ae3c7ee98e0d'
         '213994f8404ad2d2da18a9e0ce878a16'
         'b87041532eb123a3194b95dbe7fb284c'
         'd688904def891b8037dc3a06ab047f03'
         '9b415c8a1faa44aa0538dcea88b432ec'
         '00ede56aadf073c839e600033fbd6cb4')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  ./configure --prefix=/usr \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --enable-anacron \
    --without-audit \
    --without-selinux \
    --with-pam --with-inotify
  make; make DESTDIR=$pkgdir install

  # Must set suid bit on file manually
  chmod u+s $pkgdir/usr/bin/crontab

  # Install `run-cron` script
  install -Dm755 $srcdir/run-cron $pkgdir/usr/bin/run-cron

  # Install system crontab and anacrontab and directories
  install -Dm644 $srcdir/crontab $pkgdir/etc/crontab
  install -Dm644 $srcdir/anacrontab $pkgdir/etc/anacrontab
  install -d $pkgdir/etc/cron.d
  install -d $pkgdir/etc/cron.{hour,dai,week,month}ly

  # Replaced Fedora PAM configuration
  install -Dm644 $srcdir/crond.pam.d $pkgdir/etc/pam.d/crond

  # Install crond initscript
  install -Dm755 $srcdir/crond.rc.d $pkgdir/etc/rc.d/crond

  # Install custom:ISC license
  install -Dm644 COPYING $pkgdir/usr/share/licenses/cronie/COPYING
}