# $Id: PKGBUILD 113776 2014-06-30 09:17:14Z spupykin $ # Maintainer: Sergej Pupykin # Maintainer: Daniel Micay # Contributor: Bartłomiej Piotrowski # Contributor: Patrick Leslie Polzer # Contributor: cdhotfire # Contributor: Shinlun Hsieh # Contributor: Elisamuel Resto pkgname=chrony pkgver=1.29.1 pkgrel=3 pkgdesc='Lightweight NTP client and server' arch=('i686' 'x86_64') url="http://chrony.tuxfamily.org/" options=(strip emptydirs) license=('GPL') depends=('readline' 'libcap') backup=('etc/chrony.conf') source=(http://download.tuxfamily.org/chrony/${pkgname}-${pkgver}.tar.gz service) install=${pkgname}.install sha256sums=('658c9bb4d8c8d8ec7d0908429aa266e5f8413ba86bd4acbfd2f9669f6065af27' '3c9d05aaba6c0bef43fd1923a6dd7ac5f9b9539d21efbd1fbe592b54dec8d493') build() { cd $pkgname-$pkgver ./configure --prefix=/usr make } package() { cd $pkgname-$pkgver make DESTDIR="$pkgdir" install install -Dm0644 "$srcdir/$pkgname-$pkgver/examples/chrony.conf.example" "$pkgdir/etc/chrony.conf" echo -e "\n# Enable kernel RTC sync\nrtcsync" >> "$pkgdir/etc/chrony.conf" sed -i '/^! rtconutc$/ s/^! //' "$pkgdir/etc/chrony.conf" mv "$pkgdir/usr/sbin/chronyd" "$pkgdir/usr/bin" rmdir "$pkgdir/usr/sbin" 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/10-$pkgname.list" chown 183:183 "$pkgdir/var/lib/chrony" }