diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-08-01 22:03:23 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-08-01 22:03:23 +0100 |
commit | 590b9b7b03bf4651e099949e318755af7cfa81b8 (patch) | |
tree | 54c184b7d26c25f1922bfeaf19a1dd45a2e3b1eb /net-dns/getdns/getdns-1.7.0-r1.ebuild | |
parent | f4fc10428424904caf2035cffc442195cb088b2c (diff) |
gentoo resync : 01.08.2021
Diffstat (limited to 'net-dns/getdns/getdns-1.7.0-r1.ebuild')
-rw-r--r-- | net-dns/getdns/getdns-1.7.0-r1.ebuild | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/net-dns/getdns/getdns-1.7.0-r1.ebuild b/net-dns/getdns/getdns-1.7.0-r1.ebuild new file mode 100644 index 000000000000..98248f10308a --- /dev/null +++ b/net-dns/getdns/getdns-1.7.0-r1.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +_SRCURI_P="${P/%_beta1/-beta.1}" + +inherit cmake fcaps systemd tmpfiles + +DESCRIPTION="Modern asynchronous DNS API" +HOMEPAGE="https://getdnsapi.net/" +SRC_URI="https://getdnsapi.net/releases/${_SRCURI_P//./-}/${_SRCURI_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ~x86" +IUSE="doc examples +getdns-query +getdns-server-mon gnutls +idn libev libevent libuv static-libs stubby test +unbound" + +S="${WORKDIR}/${_SRCURI_P}" + +# https://bugs.gentoo.org/661760 +# https://github.com/getdnsapi/getdns/issues/407 +# (As of 1.7.0, seems to need network) +RESTRICT="test" +#RESTRICT="!test? ( test )" + +DEPEND=" + dev-libs/libbsd + dev-libs/libyaml + dev-libs/openssl:= + idn? ( net-dns/libidn2:= ) + gnutls? ( + net-libs/gnutls:0=[dane,openssl] + dev-libs/nettle:0= + ) + libev? ( dev-libs/libev:= ) + libevent? ( dev-libs/libevent:= ) + libuv? ( dev-libs/libuv:= ) + test? ( dev-libs/check ) + >=net-dns/unbound-1.5.9:= +" +RDEPEND=" + ${DEPEND} + stubby? ( + acct-group/stubby + acct-user/stubby + sys-libs/libcap + ) +" +BDEPEND=" + doc? ( app-doc/doxygen ) +" + +PATCHES=( + "${FILESDIR}/${PN}-1.4.2-stubby.service.patch" + "${FILESDIR}/${PN}-1.7.0-docdir.patch" +) + +src_configure() { + local mycmakeargs=( + -DCMAKE_INSTALL_RUNSTATEDIR=/var/run/stubby + -DBUILD_DOXYGEN=$(usex doc) + -DBUILD_GETDNS_QUERY=$(usex getdns-query) + -DBUILD_GETDNS_SERVER_MON=$(usex getdns-server-mon) + -DBUILD_STUBBY=$(usex stubby) + -DENABLE_STATIC=$(usex static-libs) + -DBUILD_TESTING:BOOL=$(usex test) + -DENABLE_UNBOUND_EVENT_API=$(usex unbound) + -DUSE_GNUTLS=$(usex gnutls) + -DUSE_LIBEV=$(usex libev) + -DUSE_LIBEVENT2=$(usex libevent) + -DUSE_LIBIDN2=$(usex idn) + -DUSE_LIBUV=$(usex libuv) + ) + cmake_src_configure +} + +src_install() { + cmake_src_install + if use stubby; then + newinitd "${FILESDIR}"/stubby.initd-r2 stubby + newconfd "${FILESDIR}"/stubby.confd-r1 stubby + insinto /etc/logrotate.d + newins "${FILESDIR}"/stubby.logrotate stubby + systemd_dounit "${S}"/stubby/systemd/stubby.service + dotmpfiles "${S}"/stubby/systemd/stubby.conf + fi +} + +pkg_postinst() { + if use stubby; then + fcaps cap_net_bind_service=ei /usr/bin/stubby + tmpfiles_process stubby.conf + fi +} |