diff options
Diffstat (limited to 'community/chrony')
-rw-r--r-- | community/chrony/PKGBUILD | 6 | ||||
-rw-r--r-- | community/chrony/chrony.install | 24 |
2 files changed, 25 insertions, 5 deletions
diff --git a/community/chrony/PKGBUILD b/community/chrony/PKGBUILD index ff76857b4..0abaf3bf8 100644 --- a/community/chrony/PKGBUILD +++ b/community/chrony/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 114721 2014-07-03 10:46:29Z thestinger $ +# $Id: PKGBUILD 116062 2014-07-21 11:15:13Z spupykin $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> # Maintainer: Daniel Micay <danielmicay@gmail.com> # Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl> @@ -9,7 +9,7 @@ pkgname=chrony pkgver=1.30 -pkgrel=1 +pkgrel=3 pkgdesc='Lightweight NTP client and server' arch=('i686' 'x86_64') url="http://chrony.tuxfamily.org/" @@ -31,7 +31,7 @@ build() { package() { cd $pkgname-$pkgver - make DESTDIR="$pkgdir" install + make DESTDIR="$pkgdir" install install-docs install -Dm0644 "$srcdir/$pkgname-$pkgver/examples/chrony.conf.example" "$pkgdir/etc/chrony.conf" diff --git a/community/chrony/chrony.install b/community/chrony/chrony.install index 2badf6471..b5309d226 100644 --- a/community/chrony/chrony.install +++ b/community/chrony/chrony.install @@ -1,14 +1,27 @@ +infodir=usr/share/info +filelist=(chrony.info) + post_install() { getent group chrony &>/dev/null || groupadd -g 183 chrony >/dev/null getent passwd chrony &>/dev/null || useradd -u 183 -g chrony -d /var/lib/chrony -c 'Network Time Protocol' -s /bin/false chrony >/dev/null - true + + [[ -x usr/bin/install-info ]] || return 0 + for file in "${filelist[@]}"; do + install-info "$infodir/$file.gz" "$infodir/dir" 2> /dev/null + done } post_upgrade() { if [[ $(vercmp $2 1.29.1-2) -le 0 ]]; then - post_install + getent group chrony &>/dev/null || groupadd -g 183 chrony >/dev/null + getent passwd chrony &>/dev/null || useradd -u 183 -g chrony -d /var/lib/chrony -c 'Network Time Protocol' -s /bin/false chrony >/dev/null chown -R 183:183 /var/lib/chrony fi + + [[ -x usr/bin/install-info ]] || return 0 + for file in "${filelist[@]}"; do + install-info "$infodir/$file.gz" "$infodir/dir" 2> /dev/null + done } post_remove() { @@ -16,3 +29,10 @@ post_remove() { getent group chrony &>/dev/null && groupdel chrony >/dev/null true } + +pre_remove() { + [[ -x usr/bin/install-info ]] || return 0 + for file in "${filelist[@]}"; do + install-info --delete "$infodir/$file.gz" "$infodir/dir" 2> /dev/null + done +} |