summaryrefslogtreecommitdiff
path: root/community/chrony/PKGBUILD
blob: 49ce93a61314d91a24344870584ba64081f94c22 (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
# $Id: PKGBUILD 75385 2012-08-21 18:13:22Z bpiotrowski $
# Maintainer:  Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer:  Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: Patrick Leslie Polzer <leslie.polzer@gmx.net>
# Contributor: cdhotfire <cdhotfire@gmail.com>
# Contributor: Shinlun Hsieh <yngwiexx@yahoo.com.tw>
# Contributor: Elisamuel Resto <ryuji@simplysam.us>

pkgname=chrony
pkgver=1.26
pkgrel=7
pkgdesc='Lightweight NTP client and server'
arch=('i686' 'x86_64')
url="http://chrony.tuxfamily.org/"
options=('strip')
license=('GPL')
depends=('readline' 'libcap')
backup=('etc/chrony.conf')
source=(http://download.tuxfamily.org/chrony/${pkgname}-${pkgver}.tar.gz
        rc.d
        service)
md5sums=('ad6dd619ff1986e4ff780363c64e2246'
         'd8b653c8bcc76cef00aa10fbd3eeb4f7'
         '778d85a6b42ccfab6460ec257b39ca4d')

build() {
  cd $srcdir/$pkgname-$pkgver
  ./configure --prefix=/usr
  make
}

package() {
  cd $srcdir/$pkgname-$pkgver 
  make DESTDIR=$pkgdir install

  install -Dm0644 $srcdir/$pkgname-$pkgver/examples/chrony.conf.example $pkgdir/etc/chrony.conf
  install -Dm0755 $srcdir/rc.d $pkgdir/etc/rc.d/chrony
  install -Dm644  $srcdir/service $pkgdir/usr/lib/systemd/system/chrony.service

  install -dm755 "$pkgdir/usr/lib/systemd/ntp-units.d"
  echo "$pkgname.service" > "$pkgdir/usr/lib/systemd/ntp-units.d/$pkgname.list"
}