pkgname=dnsutils pkgver=9.5.0 _pkgver=9.5.0-P1 pkgrel=4 pkgdesc="Various DNS utilities - dig host nslookup nsupdate" arch=(i686 x86_64) url="http://www.isc.org/index.pl?/sw/bind/" license=('custom:ISC') depends=('libcap' 'openssl>=0.9.8e') replaces=('bind-tools') source=(ftp://ftp.isc.org/isc/bind9/${_pkgver}/bind-${_pkgver}.tar.gz bind.so_bsdcompat.diff tools-only.patch) md5sums=('a4f9dd6d205d24ec89fa4e44d8188197' '447d58721cfee0e1e377b46f7d50b327' '329f7e15b8c45d3efefdf5b559bb878a') build() { export MAKEFLAGS="-j1" cd ${startdir}/src/bind-${_pkgver} patch -Np0 -i ${startdir}/src/bind.so_bsdcompat.diff || return 1 patch -Np1 -i ${startdir}/src/tools-only.patch || return 1 # This is a brute-force linux-only hack. The Gentoo patch did not work at all. find -type f -exec sed -i s/'\(#include \)'/'#define __USE_GNU'"\n"'\1'"\n"'#undef __USE_GNU'/ '{}' ';' ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --with-openssl=yes --enable-linux-caps --enable-threads --without-libxml2 make || return 1 cd bin make DESTDIR=${startdir}/pkg install || return 1 install -D -m644 ../COPYRIGHT $startdir/pkg/usr/share/licenses/$pkgname/LICENSE }