1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 DESCRIPTION="Unbound is a validating, recursive and caching DNS resolver."
8 HOMEPAGE="http://unbound.net"
9 SRC_URI="http://unbound.net/downloads/${P}.tar.gz"
13 KEYWORDS="~amd64 ~x86"
14 IUSE="debug libevent static threads"
16 RDEPEND="dev-libs/openssl
18 libevent? ( dev-libs/libevent )"
23 enewuser unbound -1 -1 -1 unbound
28 --with-conf-file=/etc/unbound/unbound.conf \
29 --with-pidfile=/var/run/unbound.pid \
30 --with-run-dir=/etc/unbound \
31 --with-username=unbound \
33 $(use_enable debug lock-checks) \
34 $(use_enable debug alloc-checks) \
35 $(use_enable static static-exe) \
36 $(use_with libevent) \
37 $(use_with threads pthreads)
39 emake || die "emake failed"
43 emake DESTDIR="${D}" install || die "emake install failed"
44 newinitd "${FILESDIR}/unbound.initd" unbound || die "newinitd failed"
45 newconfd "${FILESDIR}/unbound.confd" unbound || die "newconfd failed"
47 dodoc doc/README doc/CREDITS doc/TODO doc/Changelog doc/FEATURES || die "dodoc failed"
48 dodoc "${FILESDIR}/chroot_howto.txt" || die "dodoc failed"
50 # adapt config file to disable the chroot
51 sed -i '/^\t# chroot:/a\\tchroot: ""' "$D/etc/unbound/unbound.conf" || die "sed failed"
55 elog "The gentoo configuration does not enable a chroot environment,"
56 elog "this differs from the default upstream configuration."
57 elog "To use a chroot enviroment, please read:"
58 elog "/usr/share/doc/${PF}/chroot_howto.txt.bz2"