commit:     3e0d34ac1f1e91da2a43220e487c03cca69af569
Author:     Sven Wegener <swegener <AT> gentoo <DOT> org>
AuthorDate: Sat Jul  1 16:36:15 2023 +0000
Commit:     Sven Wegener <swegener <AT> gentoo <DOT> org>
CommitDate: Sat Jul  1 16:56:55 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e0d34ac

net-dns/pdns-recursor: add 4.9.0

Signed-off-by: Sven Wegener <swegener <AT> gentoo.org>

 net-dns/pdns-recursor/Manifest                   |  1 +
 net-dns/pdns-recursor/pdns-recursor-4.9.0.ebuild | 91 ++++++++++++++++++++++++
 2 files changed, 92 insertions(+)

diff --git a/net-dns/pdns-recursor/Manifest b/net-dns/pdns-recursor/Manifest
index bfb3294a86ca..31475a29bd0c 100644
--- a/net-dns/pdns-recursor/Manifest
+++ b/net-dns/pdns-recursor/Manifest
@@ -1 +1,2 @@
 DIST pdns-recursor-4.8.4.tar.bz2 1528092 BLAKE2B 
d4cacbb6451ee4b835684855e6e6bcbb0eb6425840bce980ee5b2049a4eed3fe5c6be3d62133234adc3944f85d548ce9ee50885d65b2104c0eda91b4e46ca024
 SHA512 
1cfdf94bc10d01ebfae00780304f0d46b3388d824158195e1db2b04a08143cc8f36c4861a05ac8cbc05948349aafe1c9e822a27b15b470ef89a81e8bd584a5f2
+DIST pdns-recursor-4.9.0.tar.bz2 1551436 BLAKE2B 
6e0dbaa6c666599b1d4246c544d8933d9b476b55f946c8a9d67c5983e3f2745947e3a225bd198d11566dd97a45e47022bba56f53a1a1b9b70b71b80656118f04
 SHA512 
c9694fe7c852441d55c9e89e7d212e7d5a3a4e81742adc5240f673f9bc91205a36a6071e5992baec078806e8ae73f390dfc0b5ed795365a35040284372f8e6ad

diff --git a/net-dns/pdns-recursor/pdns-recursor-4.9.0.ebuild 
b/net-dns/pdns-recursor/pdns-recursor-4.9.0.ebuild
new file mode 100644
index 000000000000..08de25898f64
--- /dev/null
+++ b/net-dns/pdns-recursor/pdns-recursor-4.9.0.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+LUA_COMPAT=( lua5-{1..4} luajit )
+
+inherit flag-o-matic lua-single
+
+DESCRIPTION="The PowerDNS Recursor"
+HOMEPAGE="https://www.powerdns.com/";
+SRC_URI="https://downloads.powerdns.com/releases/${P/_/-}.tar.bz2";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="debug dnstap snmp sodium systemd test valgrind"
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
+DEPEND="${LUA_DEPS}
+       dnstap? ( dev-libs/fstrm )
+       systemd? ( sys-apps/systemd:0= )
+       snmp? ( net-analyzer/net-snmp )
+       sodium? ( dev-libs/libsodium:= )
+       elibc_glibc? (
+               arm? ( >=sys-libs/glibc-2.34 )
+               x86? ( >=sys-libs/glibc-2.34 )
+       )
+       dev-libs/openssl:=
+       dev-libs/boost:=[context]"
+RDEPEND="${DEPEND}
+       !<net-dns/pdns-2.9.20-r1
+       acct-user/pdns
+       acct-group/pdns"
+DEPEND="${DEPEND}
+       valgrind? ( dev-util/valgrind )"
+BDEPEND="virtual/pkgconfig"
+
+S="${WORKDIR}"/${P/_/-}
+
+pkg_setup() {
+       lua-single_pkg_setup
+       filter-flags -ftree-vectorize
+       append-lfs-flags
+       append-cppflags -D_TIME_BITS=64
+}
+
+src_configure() {
+       econf \
+               --sysconfdir=/etc/powerdns \
+               --with-nod-cache-dir=/var/lib/powerdns \
+               --with-service-user=pdns \
+               --with-service-group=pdns \
+               --with-lua="${ELUA}" \
+               $(use_enable debug verbose-logging) \
+               $(use_enable systemd) \
+               $(use_enable dnstap dnstap) \
+               $(use_enable test unit-tests) \
+               $(use_enable valgrind) \
+               $(use_with sodium libsodium) \
+               $(use_with snmp net-snmp)
+}
+
+src_install() {
+       default
+
+       mv "${D}"/etc/powerdns/recursor.conf{-dist,}
+
+       # set defaults: setuid=nobody, setgid=nobody
+       sed -i \
+               -e 's/^# set\([ug]\)id=$/set\1id=pdns/' \
+               -e 's/^# quiet=$/quiet=on/' \
+               -e 's/^# chroot=$/chroot=\/var\/lib\/powerdns/' \
+               "${D}"/etc/powerdns/recursor.conf
+
+       newinitd "${FILESDIR}"/pdns-recursor-r2 pdns-recursor
+}
+
+pkg_postinst() {
+       local old
+
+       for old in ${REPLACING_VERSIONS}; do
+               ver_test ${old} -lt 4.0.0-r1 || continue
+
+               ewarn "Starting with 4.0.0-r1 the init script has been renamed 
from precursor"
+               ewarn "to pdns-recursor, please update your runlevels 
accordingly."
+
+               break
+       done
+}

Reply via email to