1 |
commit: 9abd5417cc4e665885a352eb1eb15ae0b1652af9 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 28 15:37:35 2022 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 28 15:46:26 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9abd5417 |
7 |
|
8 |
net-dns/nsd: Add live ebuild |
9 |
|
10 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
11 |
|
12 |
net-dns/nsd/nsd-9999.ebuild | 119 ++++++++++++++++++++++++++++++++++++++++++++ |
13 |
1 file changed, 119 insertions(+) |
14 |
|
15 |
diff --git a/net-dns/nsd/nsd-9999.ebuild b/net-dns/nsd/nsd-9999.ebuild |
16 |
new file mode 100644 |
17 |
index 000000000000..a41057e6300d |
18 |
--- /dev/null |
19 |
+++ b/net-dns/nsd/nsd-9999.ebuild |
20 |
@@ -0,0 +1,119 @@ |
21 |
+# Copyright 1999-2022 Gentoo Authors |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=8 |
25 |
+ |
26 |
+inherit autotools systemd |
27 |
+ |
28 |
+DESCRIPTION="An authoritative only, high performance, open source name server" |
29 |
+HOMEPAGE="http://www.nlnetlabs.nl/projects/nsd" |
30 |
+LICENSE="BSD" |
31 |
+SLOT="0" |
32 |
+if [[ "${PV}" == *9999 ]] ; then |
33 |
+ inherit git-r3 |
34 |
+ EGIT_REPO_URI="https://github.com/NLnetLabs/nsd.git" |
35 |
+else |
36 |
+ # version voodoo needed only for non-release tarballs: 4.0.0_rc1 => 4.0.0rc1 |
37 |
+ MY_PV="${PV/_beta/b}" |
38 |
+ MY_PV="${MY_PV/_rc/rc}" |
39 |
+ MY_P="${PN}-${MY_PV}" |
40 |
+ |
41 |
+ [[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \ |
42 |
+ KEYWORDS="~amd64 ~x86" |
43 |
+ SRC_URI="http://www.nlnetlabs.nl/downloads/${PN}/${MY_P}.tar.gz" |
44 |
+ S="${WORKDIR}/${MY_P}" |
45 |
+fi |
46 |
+IUSE="bind8-stats dnstap ipv6 libevent minimal-responses mmap munin +nsec3 ratelimit root-server runtime-checks ssl systemd" |
47 |
+ |
48 |
+RDEPEND=" |
49 |
+ acct-group/nsd |
50 |
+ acct-user/nsd |
51 |
+ dnstap? ( |
52 |
+ dev-libs/fstrm |
53 |
+ dev-libs/protobuf-c |
54 |
+ ) |
55 |
+ libevent? ( dev-libs/libevent ) |
56 |
+ munin? ( net-analyzer/munin ) |
57 |
+ ssl? ( dev-libs/openssl:0= ) |
58 |
+ systemd? ( sys-apps/systemd ) |
59 |
+" |
60 |
+DEPEND="${RDEPEND}" |
61 |
+BDEPEND=" |
62 |
+ sys-devel/flex |
63 |
+ virtual/yacc |
64 |
+ systemd? ( virtual/pkgconfig ) |
65 |
+" |
66 |
+ |
67 |
+PATCHES=( |
68 |
+ # Fix the paths in the munin plugin to match our install |
69 |
+ "${FILESDIR}"/nsd_munin_.patch |
70 |
+) |
71 |
+ |
72 |
+src_prepare() { |
73 |
+ default |
74 |
+ # Required to get correct pkg-config macros with USE="systemd" |
75 |
+ # see bugs #663618 and #758050 |
76 |
+ eautoreconf |
77 |
+} |
78 |
+ |
79 |
+src_configure() { |
80 |
+ local myeconfargs=( |
81 |
+ --enable-largefile |
82 |
+ --enable-pie |
83 |
+ --enable-relro-now |
84 |
+ --enable-tcp-fastopen |
85 |
+ --with-dbfile="${EPREFIX}"/var/db/nsd/nsd.db |
86 |
+ --with-logfile="${EPREFIX}"/var/log/nsd.log |
87 |
+ --with-pidfile="${EPREFIX}"/run/nsd/nsd.pid |
88 |
+ --with-xfrdfile="${EPREFIX}"/var/db/nsd/xfrd.state |
89 |
+ --with-xfrdir="${EPREFIX}"/var/db/nsd |
90 |
+ --with-zonelistfile="${EPREFIX}"/var/db/nsd/zone.list |
91 |
+ --with-zonesdir="${EPREFIX}"/var/lib/nsd |
92 |
+ $(use_enable bind8-stats) |
93 |
+ $(use_enable bind8-stats zone-stats) |
94 |
+ $(use_enable dnstap) |
95 |
+ $(use_enable ipv6) |
96 |
+ $(use_enable minimal-responses) |
97 |
+ $(use_enable mmap) |
98 |
+ $(use_enable nsec3) |
99 |
+ $(use_enable ratelimit) |
100 |
+ $(use_enable root-server) |
101 |
+ $(use_enable runtime-checks checking) |
102 |
+ $(use_enable systemd) |
103 |
+ $(use_with libevent) |
104 |
+ $(use_with ssl) |
105 |
+ ) |
106 |
+ econf "${myeconfargs[@]}" |
107 |
+} |
108 |
+ |
109 |
+src_install() { |
110 |
+ emake DESTDIR="${D}" install |
111 |
+ |
112 |
+ dodoc doc/{ChangeLog,CREDITS,NSD-4-features,NSD-FOR-BIND-USERS,README,RELNOTES,REQUIREMENTS} |
113 |
+ |
114 |
+ newinitd "${FILESDIR}"/nsd.initd-r1 nsd |
115 |
+ |
116 |
+ # install munin plugin and config |
117 |
+ if use munin ; then |
118 |
+ exeinto /usr/libexec/munin/plugins |
119 |
+ doexe contrib/nsd_munin_ |
120 |
+ insinto /etc/munin/plugin-conf.d |
121 |
+ newins "${FILESDIR}"/nsd.munin-conf nsd_munin |
122 |
+ fi |
123 |
+ |
124 |
+ systemd_dounit "${FILESDIR}"/nsd.service |
125 |
+ |
126 |
+ # remove the /run directory that usually resides on tmpfs and is |
127 |
+ # being taken care of by the nsd init script anyway (checkpath) |
128 |
+ rm -r "${ED}"/run || die "Failed to remove /run" |
129 |
+ |
130 |
+ keepdir /var/db/${PN} |
131 |
+} |
132 |
+ |
133 |
+pkg_postinst() { |
134 |
+ # database directory, writable by nsd for database updates and zone transfers |
135 |
+ install -d -m 750 -o nsd -g nsd "${EROOT}"/var/db/nsd |
136 |
+ |
137 |
+ # zones directory, writable by nsd for zone file updates (nsd-control write) |
138 |
+ install -d -m 750 -o nsd -g nsd "${EROOT}"/var/lib/nsd |
139 |
+} |