# Contributor: Sören Tempel # Contributor: Carlo Landmeter # Maintainer: Natanael Copa pkgname=unbound pkgver=1.5.6 pkgrel=3 pkgdesc="Unbound is a validating, recursive, and caching DNS resolver" pkgusers="unbound" pkggroups="unbound" url="http://unbound.net/" arch="all" license="BSD" depends="dnssec-root" depends_dev="openssl-dev expat-dev ldns-dev libevent-dev" makedepends="$depends_dev python-dev swig linux-headers" install="$pkgname.pre-install" subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-dbg py-unbound:py $pkgname-migrate" source="http://unbound.net/downloads/unbound-$pkgver.tar.gz conf.patch swig.patch update-unbound-root-hints migrate-dnscache-to-unbound root.hints unbound.initd" _builddir="$srcdir"/unbound-$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 \ --prefix=/usr \ --sysconfdir=/etc \ --with-pidfile=/var/run/unbound/unbound.pid \ --with-username=unbound \ --with-libevent \ --with-ldns \ --with-pthreads \ --with-rootkey-file=/usr/share/dnssec-root/trusted-key.key \ --disable-static \ --disable-rpath \ --with-ssl \ --without-pythonmodule \ --with-pyunbound \ || return 1 # do not link to libpython sed -i -e '/^LIBS=/s/-lpython.*[[:space:]]/ /' Makefile make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 install -D contrib/update-anchor.sh \ "$pkgdir"/usr/share/$pkgname/update-anchor.sh \ || return 1 install -m755 -D "$srcdir"/unbound.initd \ "$pkgdir"/etc/init.d/unbound || return 1 install -d -o unbound -g unbound "$pkgdir"/var/run/unbound || return 1 install -m644 "$srcdir"/root.hints "$pkgdir"/etc/unbound/ || return 1 install -Dm755 "$srcdir"/update-unbound-root-hints \ "$pkgdir"/etc/periodic/monthly/update-unbound-root-hints \ || return 1 } 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" arch="noarch" mkdir -p "$subpkgdir"/usr/bin/ install -m755 "$srcdir"/migrate-dnscache-to-unbound \ "$subpkgdir"/usr/bin/ } md5sums="691a34abd8e9257dd65b70f28326c1f0 unbound-1.5.6.tar.gz d354705e7a468b7fad5e19ff5bd1bceb conf.patch deb0a18f2250caa53750ee2cecac71e9 swig.patch c1c71cd0e7f9630536a2abf2513c675d update-unbound-root-hints 5340681e5ec1a1fd47a0de27f5c03c21 migrate-dnscache-to-unbound b2afc34d106e104730b63876c9a07caf root.hints b98eded68339fc605ec7e6cbb50e5aa3 unbound.initd" sha256sums="ad3823f5895f59da9e408ea273fcf81d8a76914c18864fba256d7f140b83e404 unbound-1.5.6.tar.gz d95a6b37cce224ab37dadb6dae973992f718c229740bd72ab0edc72cc8e23d84 conf.patch d131e19129744f7014167d8701cb39c8358269a89b317b8a74dacfd267e1f516 swig.patch 0db3ca197b62901fab984cb2559925adbf3307ccd1dca3e1dd69cd1642ff0a36 update-unbound-root-hints 582851b4017044d8642c42c5df09b27494c963e1eebb8be3373b2dbd168d0ac0 migrate-dnscache-to-unbound 9de827bda7ddb3b8d3fac2db56c0fe65a67772a12a874c75091ae8e3f2b31c73 root.hints d9997000449179dc16f5084bf061453faf09094f843acb1d163757f8000c0cd7 unbound.initd" sha512sums="2477e3f00b8f5a3a4661ff20b0bc0d1d56c8a65cc6ab9f1308ae86f41c67a998af68d3ac5ba6c9c22a25a251f0410eaf9fee82911bcb3a3e82ffb6383e28dcf7 unbound-1.5.6.tar.gz 3c611842fa022f2d3c68293d14a683d92d81d124b78561a27818d761684496d9d97551aeca5582709f5ff2cd717b626d6bf4864d58de10e23ce3a07d4129af6c conf.patch 7d2666363be7156b26fd857459492f6e78fbc24bd6923dd51477e09df938d8c617035e4aa8bf91ffcde384e2dff8225eced14d7aaa7690e3a95b34c5f21eaf7d swig.patch 0f80b507a8f71b0c00729501d861657ce91a57024cd1963c150d0630c71eccceba370d6e732ff39bb807713672550d87a8c8ecdb9fce6b8b4386c12689603700 update-unbound-root-hints b26a13c1c88da9611a65705dc59f7233c5e0f6aced0d7d66c18536a969a2de627ca5d4bb55eedd81f2f040fa11bde48eaaeca2850f376e72e7a531678a259131 migrate-dnscache-to-unbound e4a5ac121dd2ef989cf2daed1f8735c215419503e35a322cc3195ee8bbc0810bfb2867d82444263afe378b589ba8b145e3e495aa6ab5c6a0ec91811b1a736efc root.hints 540e7a11fa5421e2d103c42d69faf1ba005adcadfac2f65091795a2f00e5b5acd1436b4d2adfe2bb0fdfcbfb44d0967d6bce87620c618549fcd7e32019040f29 unbound.initd"