name=bind-tools
version=9.22.4
release=1
desc="dig, host and nslookup"
url="https://www.isc.org/bind/"
license="MPL-2.0"
depend="glibc libressl libuv json-c"
makedepend=""
source="https://downloads.isc.org/isc/bind9/9.22.4/bind-9.22.4.tar.xz"
sha256="SKIP"

build() {
	cd "bind-9.22.4"
	[ -x ./configure ] || autoreconf -fi
	_opts="--prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib"
	_help=$(./configure --help 2>/dev/null)
	case "$_help" in *--disable-static*)  _opts="$_opts --disable-static" ;; esac
	case "$_help" in *--disable-nls*)     _opts="$_opts --disable-nls" ;; esac
	case "$_help" in *--disable-dependency-tracking*) _opts="$_opts --disable-dependency-tracking" ;; esac
	./configure $_opts
	gmake -j"$JOBS"
}

package() {
	cd "bind-9.22.4"
	gmake DESTDIR="$pkgdir" install
}
