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