# Contributor: Matt Smith # Contributor: Leonardo Arena # Maintainer: Natanael Copa pkgname=nsd pkgver=4.1.3 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="91eaed0ef1834b8ff728aba9d68c87f7 nsd-4.1.3.tar.gz 62301a021d2b2e1972625e56ea8138d1 nsd.initd" sha256sums="097cb295cdd3e8a73a8afac343caf0fca11b72b2214b022689ddc423312d17e5 nsd-4.1.3.tar.gz 8f9ca311a60e2a3db3fcc64b66cce2d6ff84b5600f47d5ece349d90926e90f27 nsd.initd" sha512sums="9dc479cd2fa3bb3b7a93d9a2771fc547499bcbf371dbccfc7cbdaa95c3d07c2bea909439f0c3ae711ca3da145189357fcd0f7de00d6306553e0a949a8a867ffa nsd-4.1.3.tar.gz 402142ad1bb422a9a29ee8c7606bd513defa41563d47fb547812d4682862da5646022aa8c4577ed2d2a151388a12ec2f7b472e6a6091406859c0eb1f7f00c5b6 nsd.initd"