summaryrefslogtreecommitdiff
path: root/community/nsd
diff options
context:
space:
mode:
Diffstat (limited to 'community/nsd')
-rw-r--r--community/nsd/PKGBUILD26
-rw-r--r--community/nsd/install19
2 files changed, 32 insertions, 13 deletions
diff --git a/community/nsd/PKGBUILD b/community/nsd/PKGBUILD
index 557d160aa..09df8c6d1 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' 'mips64el')
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' 'mips64el')
+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
+}