# Contributor: Sören Tempel # Contributor: Carlo Landmeter # Maintainer: Natanael Copa pkgname=unbound pkgver=1.6.8 pkgrel=0 pkgdesc="Unbound is a validating, recursive, and caching DNS resolver" url="http://unbound.net/" arch="all" license="BSD-3-Clause" depends="dnssec-root" depends_dev="libressl-dev expat-dev ldns-dev libevent-dev" makedepends="$depends_dev python2-dev swig linux-headers" install="$pkgname.pre-install" options="!check" pkgusers="unbound" pkggroups="unbound" subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-dbg py-unbound:py $pkgname-migrate::noarch" source="http://unbound.net/downloads/$pkgname-$pkgver.tar.gz conf.patch update-unbound-root-hints migrate-dnscache-to-unbound root.hints $pkgname.initd $pkgname.confd " builddir="$srcdir/$pkgname-$pkgver" build() { cd "$builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var \ --with-username=unbound \ --with-run-dir="" \ --with-pidfile="" \ --with-rootkey-file=/usr/share/dnssec-root/trusted-key.key \ --with-libevent \ --with-ldns \ --with-pthreads \ --disable-static \ --disable-rpath \ --with-ssl \ --without-pythonmodule \ --with-pyunbound # do not link to libpython sed -i '/^LIBS=/s/-lpython.*[[:space:]]/ /' Makefile make } package() { cd "$builddir" make DESTDIR="$pkgdir" install install -m755 -D contrib/update-anchor.sh \ "$pkgdir"/usr/share/$pkgname/update-anchor.sh mkdir -p "$pkgdir"/usr/share/doc/$pkgname/ install -m644 doc/CREDITS doc/Changelog doc/FEATURES \ doc/README doc/TODO "$pkgdir"/usr/share/doc/$pkgname/ cd "$pkgdir" install -Dm755 "$srcdir"/update-unbound-root-hints \ ./etc/periodic/monthly/update-unbound-root-hints install -m644 -D "$srcdir"/root.hints ./etc/unbound/root.hints install -m755 -D "$srcdir"/unbound.initd ./etc/init.d/unbound install -m755 -D "$srcdir"/unbound.confd ./etc/conf.d/unbound } libs() { pkgdesc="unbound shared libraries" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/lib*.so.* "$subpkgdir"/usr/lib/ } py() { pkgdesc="Python bindings to libunbound" mkdir -p "$subpkgdir"/usr/lib/ mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/ } migrate() { pkgdesc="Simple tool to migrate from dnscache to unbound" install -m755 -D "$srcdir"/migrate-dnscache-to-unbound \ "$subpkgdir"/usr/bin/migrate-dnscache-to-unbound } sha512sums="653d88d5dbc8cf25f7261e4a9869b6591843c7ff27b5d63f979a94505daafbbb61e05d46bedd2d01230355d5f08dd9fe14ed04c5c7340f3f27581b61ad6edfa3 unbound-1.6.8.tar.gz bd51769e3e2d6035df1abbf220038a56a69795a092b5f31005e1910c6c88e334d7e71fe16d874885ef74c597f3a1d7af50f9ad9736ba7ebb10ae50178828661c conf.patch b16b7b15392c0d560718ee543f1eebc5617085fb30d61cddc20dd948bd8b1634ee5b2de1c9cb172a6c0d1c5bbaf98b6fd39816d39c72a43ff619455449e668ac update-unbound-root-hints b26a13c1c88da9611a65705dc59f7233c5e0f6aced0d7d66c18536a969a2de627ca5d4bb55eedd81f2f040fa11bde48eaaeca2850f376e72e7a531678a259131 migrate-dnscache-to-unbound 0dca3470ed4ca9b76d6f47f5d20e92924e6648f0870d8594fe6735d8f1cdfeeee7296301066c2a8b2b94f7daed86c15efe00c301ca27e435e5dd2c85508dc9c8 root.hints d8392a6d238b46fd207d57eb2d23d0806d070c203ae196a6c2a6a4f7de4c95beecee86640649ff7dcc1cec3d3edcd313e8d91bff4188bdc1133b12fe6eff554e unbound.initd 40c660f275a78f93677761f52bdf7ef151941e8469dd17767a947dbe575880e0d113c320d15c7ea7e12ef636d8ec9453eeae804619678293fa35e3d4c7e75a71 unbound.confd"