# Contributor: Matt Smith # Contributor: Leonardo Arena # Maintainer: Natanael Copa pkgname=nsd pkgver=4.1.1 pkgrel=0 pkgdesc="NSD is an authoritative only, high performance, simple and open source name server." url="http://www.nlnetlabs.nl/projects/nsd/" arch="all" license="BSD" depends= depends_dev= makedepends="$depends_dev openssl-dev libevent-dev" install="$pkgname.pre-install $pkgname.pre-upgrade $pkgname.post-deinstall" subpackages="$pkgname-doc $pkgname-dbg" pkgusers="nsd" pkggroups="nsd" source="http://www.nlnetlabs.nl/downloads/$pkgname/$pkgname-$pkgver.tar.gz nsd.initd " _builddir="$srcdir/$pkgname-$pkgver" prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --sbindir=/usr/sbin \ --mandir=/usr/share/man \ --with-user=nsd \ --with-pidfile=/var/run/nsd/nsd.pid \ --with-xfrdir=/var/db/nsd \ || return 1 make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 install -m755 -D "$srcdir"/$pkgname.initd \ "$pkgdir"/etc/init.d/nsd || return 1 chown nsd.nsd "$pkgdir"/var/db/nsd || return 1 chown nsd.nsd "$pkgdir"/var/run/nsd || return 1 } doc() { arch="noarch" mkdir -p "$subpkgdir"/usr/share/doc/$pkgname || return 1 cp -a "$_builddir"/doc/* \ "$subpkgdir"/usr/share/doc/$pkgname/ || return 1 cp -a "$_builddir"/contrib/ \ "$subpkgdir"/usr/share/doc/$pkgname/ || return 1 mv "$pkgdir"/usr/share/man \ "$subpkgdir"/usr/share/man || return 1 } md5sums="7deeb625d4336367b088705be53f701b nsd-4.1.1.tar.gz 86c343e8d2976dd120e7436e8d1d1717 nsd.initd" sha256sums="b0c3fab40ac7a8b5ffca642bc9e1b424aa72aebd03adf13a1f24ab4874734640 nsd-4.1.1.tar.gz 947ef0ebeaa6ed97de6cb5bca0be95facffbc8d382366c583de06015d33b8157 nsd.initd" sha512sums="1a3a0269695c540862afdf6e6dad7df83834b1f630bb1331085ac36fd5fea3c3caaf03f52ab2d70a2c9964dccba3482f9469ee6a5ee58be6538c4bea5a7c4084 nsd-4.1.1.tar.gz b2f2e0d4c6e1f3bcca0f46021ca71d19e924e576c6dd4390b1c15329a00e9249b9c001fed49ebe8aafa9428a671edb7664addf3e382a9bf5bdd05c82f3b5e54a nsd.initd"