1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 DESCRIPTION="The PowerDNS Recursor"
9 HOMEPAGE="https://www.powerdns.com/"
10 SRC_URI="https://downloads.powerdns.com/releases/${P/_/-}.tar.bz2"
14 KEYWORDS="amd64 ~arm x86"
15 IUSE="debug libressl luajit protobuf snmp sodium systemd"
17 DEPEND="!luajit? ( >=dev-lang/lua-5.1:= )
18 luajit? ( dev-lang/luajit:= )
21 >=dev-libs/boost-1.42:=
23 systemd? ( sys-apps/systemd:0= )
24 snmp? ( net-analyzer/net-snmp )
25 sodium? ( dev-libs/libsodium:= )
26 libressl? ( dev-libs/libressl:= )
27 !libressl? ( dev-libs/openssl:= )
28 >=dev-libs/boost-1.35:="
30 !<net-dns/pdns-2.9.20-r1"
31 BDEPEND="virtual/pkgconfig"
33 S="${WORKDIR}"/${P/_/-}
36 filter-flags -ftree-vectorize
41 --sysconfdir=/etc/powerdns \
42 $(use_enable debug verbose-logging) \
43 $(use_enable systemd) \
44 $(use_enable sodium libsodium) \
45 $(use_with !luajit lua) \
46 $(use_with luajit luajit) \
47 $(use_with protobuf) \
48 $(use_with snmp net-snmp)
54 mv "${D}"/etc/powerdns/recursor.conf{-dist,}
56 # set defaults: setuid=nobody, setgid=nobody
58 -e 's/^# set\([ug]\)id=$/set\1id=nobody/' \
59 -e 's/^# quiet=$/quiet=on/' \
60 -e 's/^# chroot=$/chroot=\/var\/lib\/powerdns/' \
61 "${D}"/etc/powerdns/recursor.conf
63 newinitd "${FILESDIR}"/pdns-recursor-r1 pdns-recursor
65 keepdir /var/lib/powerdns
71 for old in ${REPLACING_VERSIONS}; do
72 ver_test ${old} -lt 4.0.0-r1 || continue
74 ewarn "Starting with 4.0.0-r1 the init script has been renamed from precursor"
75 ewarn "to pdns-recursor, please update your runlevels accordingly."