diff options
author | root <root@rshg054.dnsready.net> | 2011-12-11 23:15:00 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2011-12-11 23:15:00 +0000 |
commit | 22b0fa480661b6247dabf39059fe629e1d233a9a (patch) | |
tree | 21d577c8083046449768f463eef2a2e1bcebaa92 /community/nsd | |
parent | e37e888e9ecdc23a004eb19d72c64c02c5af3249 (diff) |
Sun Dec 11 23:15:00 UTC 2011
Diffstat (limited to 'community/nsd')
-rw-r--r-- | community/nsd/PKGBUILD | 26 | ||||
-rw-r--r-- | community/nsd/install | 19 |
2 files changed, 32 insertions, 13 deletions
diff --git a/community/nsd/PKGBUILD b/community/nsd/PKGBUILD index ef11a6dc1..abd455dbb 100644 --- a/community/nsd/PKGBUILD +++ b/community/nsd/PKGBUILD @@ -1,34 +1,34 @@ -# $Id: PKGBUILD 43285 2011-03-24 13:35:27Z bisson $ +# $Id: PKGBUILD 60316 2011-12-10 11:25:09Z bisson $ # Maintainer: Kaiting Chen <kaitocracy@gmail.com> # Maintainer: Gaetan Bisson <bisson@archlinux.org> # Contributor: Roberto Alsina <ralsina@kde.org> pkgname=nsd -pkgver=3.2.8 +pkgver=3.2.9 pkgrel=1 pkgdesc='Authoritative only, high performance and simple DNS server' -arch=('i686' 'x86_64') url='http://www.nlnetlabs.nl/nsd/' license=('BSD') depends=('openssl') makedepends=('flex') -source=("http://www.nlnetlabs.nl/downloads/nsd/nsd-$pkgver.tar.gz") -sha1sums=('e8db690a09f53152f0dca6e4fbfabcc89003fced') +arch=('i686' 'x86_64') +source=("http://www.nlnetlabs.nl/downloads/${pkgname}/${pkgname}-${pkgver}.tar.gz") +sha1sums=('66e17e5801e94da1a21f0f2a4dd7a4ab4ffe0dd9') -install=nsd.install +install=install build() { - cd "$srcdir/$pkgname-$pkgver" + cd "${srcdir}/${pkgname}-${pkgver}" ./configure --prefix=/ --exec-prefix=/usr --datarootdir=/usr/share make } package() { - cd "$srcdir/$pkgname-$pkgver" - make DESTDIR="$pkgdir" install - install -d "$pkgdir"/{etc/rc.d,usr/share/{doc,licenses}/"$pkgname"} + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + install -d "${pkgdir}"/{etc/rc.d,usr/share/{doc,licenses}/"${pkgname}"} rm doc/differences.pdf - install -m644 doc/* "$pkgdir"/usr/share/doc/"$pkgname" - ln -s ../../doc/"$pkgname"/LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE - ln -s ../../usr/sbin/nsdc "$pkgdir"/etc/rc.d/nsd + install -m644 doc/* "${pkgdir}"/usr/share/doc/"${pkgname}" + ln -s ../../doc/"${pkgname}"/LICENSE "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE + ln -s ../../usr/sbin/nsdc "${pkgdir}"/etc/rc.d/nsd } diff --git a/community/nsd/install b/community/nsd/install new file mode 100644 index 000000000..d90c83521 --- /dev/null +++ b/community/nsd/install @@ -0,0 +1,19 @@ +post_install() { + getent group nsd &>/dev/null || groupadd -r nsd >/dev/null + getent passwd nsd &>/dev/null || useradd -r -g nsd -d /dev/null -s /bin/false -c nsd nsd >/dev/null + chown nsd:nsd /var/db/nsd + chmod 700 /var/db/nsd + install -o nsd -d /var/run/nsd +} + +post_upgrade() { + [[ `vercmp $2 3.2.9` -lt 0 ]] && cat <<\EOF +==> The database format was updated; please run `nsdc rebuild`. +EOF +} + +post_remove() { + getent passwd nsd &>/dev/null && userdel nsd >/dev/null + getent group nsd &>/dev/null && groupdel nsd >/dev/null + true +} |