1 |
commit: 87c56c0224faf0748bdb0d5931ee7bce12452268 |
2 |
Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com> |
3 |
AuthorDate: Thu Oct 18 21:37:09 2018 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Oct 18 21:40:03 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87c56c02 |
7 |
|
8 |
net-dns/dnsmasq: Version bump to 2.80 |
9 |
|
10 |
Port to EAPI 7 |
11 |
|
12 |
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> |
13 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
14 |
|
15 |
net-dns/dnsmasq/Manifest | 1 + |
16 |
net-dns/dnsmasq/dnsmasq-2.80.ebuild | 209 ++++++++++++++++++++++++++++++++++++ |
17 |
net-dns/dnsmasq/metadata.xml | 1 + |
18 |
3 files changed, 211 insertions(+) |
19 |
|
20 |
diff --git a/net-dns/dnsmasq/Manifest b/net-dns/dnsmasq/Manifest |
21 |
index f33cc77e8a8..328fffce268 100644 |
22 |
--- a/net-dns/dnsmasq/Manifest |
23 |
+++ b/net-dns/dnsmasq/Manifest |
24 |
@@ -1 +1,2 @@ |
25 |
DIST dnsmasq-2.79.tar.xz 493036 BLAKE2B 91152c52aef06def74151f6fbae9153d25261ba5e6a728cbab503c074967963e40dce39d93a0fbe4c5497c9313ac24d495cc8233934c00d4ab82aefe83b01ccd SHA512 2c06212696ab55e1584f6133872f5b196013509e4b1822d0457787b456e14341afdde887749e370a2e512124cb4138f012f4601b08690707be4acc7cf2f2876f |
26 |
+DIST dnsmasq-2.80.tar.xz 501072 BLAKE2B 39c9808df43a22e32286105c9e001b2f817a4f68b92b84282eeb8cfeaa61404d64275bbb3f944bec6fac1b015987fba6aeab7a88201446c0cff67f02c8d88d8c SHA512 58e56beb553fc41311e5dc16d8b0eb3b6801e2bdfbcd0e7a6659703f08960b6ad10d48b0b14a4d727636faf35483e01597cff2ae49e7fe9fa9e214f437b1c068 |
27 |
|
28 |
diff --git a/net-dns/dnsmasq/dnsmasq-2.80.ebuild b/net-dns/dnsmasq/dnsmasq-2.80.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..5976927532a |
31 |
--- /dev/null |
32 |
+++ b/net-dns/dnsmasq/dnsmasq-2.80.ebuild |
33 |
@@ -0,0 +1,209 @@ |
34 |
+# Copyright 1999-2018 Gentoo Authors |
35 |
+# Copyright 2017-2018 Sony Interactive Entertainment Inc. |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+ |
38 |
+EAPI=7 |
39 |
+ |
40 |
+inherit toolchain-funcs flag-o-matic user systemd |
41 |
+ |
42 |
+DESCRIPTION="Small forwarding DNS server" |
43 |
+HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html" |
44 |
+SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz" |
45 |
+ |
46 |
+LICENSE="|| ( GPL-2 GPL-3 )" |
47 |
+SLOT="0" |
48 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" |
49 |
+ |
50 |
+IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec +dumpfile id idn libidn2" |
51 |
+IUSE+=" +inotify ipv6 lua nls script selinux static tftp" |
52 |
+ |
53 |
+DM_LINGUAS=(de es fi fr id it no pl pt_BR ro) |
54 |
+ |
55 |
+BDEPEND="app-arch/xz-utils |
56 |
+ virtual/pkgconfig |
57 |
+ nls? ( sys-devel/gettext ) |
58 |
+" |
59 |
+ |
60 |
+COMMON_DEPEND="dbus? ( sys-apps/dbus:= ) |
61 |
+ idn? ( |
62 |
+ !libidn2? ( net-dns/libidn:0= ) |
63 |
+ libidn2? ( >=net-dns/libidn2-2.0:= ) |
64 |
+ ) |
65 |
+ lua? ( dev-lang/lua:* ) |
66 |
+ conntrack? ( net-libs/libnetfilter_conntrack:= ) |
67 |
+ nls? ( sys-devel/gettext ) |
68 |
+" |
69 |
+ |
70 |
+DEPEND="${COMMON_DEPEND} |
71 |
+ dnssec? ( |
72 |
+ dev-libs/nettle:=[gmp] |
73 |
+ static? ( dev-libs/nettle[static-libs(+)] ) |
74 |
+ ) |
75 |
+" |
76 |
+ |
77 |
+RDEPEND="${COMMON_DEPEND} |
78 |
+ dnssec? ( |
79 |
+ !static? ( |
80 |
+ dev-libs/nettle:=[gmp] |
81 |
+ ) |
82 |
+ ) |
83 |
+ selinux? ( sec-policy/selinux-dnsmasq ) |
84 |
+" |
85 |
+ |
86 |
+REQUIRED_USE="dhcp-tools? ( dhcp ) |
87 |
+ lua? ( script ) |
88 |
+ libidn2? ( idn )" |
89 |
+ |
90 |
+use_have() { |
91 |
+ local useflag no_only uword |
92 |
+ if [[ ${1} == '-n' ]]; then |
93 |
+ no_only=1 |
94 |
+ shift |
95 |
+ fi |
96 |
+ useflag="${1}" |
97 |
+ shift |
98 |
+ |
99 |
+ uword="${1:-${useflag}}" |
100 |
+ shift |
101 |
+ |
102 |
+ while [[ ${uword} ]]; do |
103 |
+ uword="${uword^^}" |
104 |
+ |
105 |
+ if ! use "${useflag}"; then |
106 |
+ printf -- " -DNO_%s" "${uword}" |
107 |
+ elif [[ -z "${no_only}" ]]; then |
108 |
+ printf -- " -DHAVE_%s" "${uword}" |
109 |
+ fi |
110 |
+ uword="${1}" |
111 |
+ shift |
112 |
+ done |
113 |
+} |
114 |
+ |
115 |
+pkg_pretend() { |
116 |
+ if use static; then |
117 |
+ einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked." |
118 |
+ use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense;" \ |
119 |
+ "the static USE flag is ignored." |
120 |
+ fi |
121 |
+} |
122 |
+ |
123 |
+pkg_setup() { |
124 |
+ enewgroup dnsmasq |
125 |
+ enewuser dnsmasq -1 -1 /dev/null dnsmasq |
126 |
+} |
127 |
+ |
128 |
+src_prepare() { |
129 |
+ default |
130 |
+ |
131 |
+ sed -i -r 's:lua5.[0-9]+:lua:' Makefile |
132 |
+ sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" dnsmasq.conf.example |
133 |
+} |
134 |
+ |
135 |
+src_configure() { |
136 |
+ COPTS=( |
137 |
+ "$(use_have -n auth-dns auth)" |
138 |
+ "$(use_have conntrack)" |
139 |
+ "$(use_have dbus)" |
140 |
+ "$(use libidn2 || use_have idn)" |
141 |
+ "$(use_have libidn2)" |
142 |
+ "$(use_have -n inotify)" |
143 |
+ "$(use_have -n dhcp dhcp dhcp6)" |
144 |
+ "$(use_have -n ipv6 ipv6 dhcp6)" |
145 |
+ "$(use_have -n id id)" |
146 |
+ "$(use_have lua luascript)" |
147 |
+ "$(use_have -n script)" |
148 |
+ "$(use_have -n tftp)" |
149 |
+ "$(use_have dnssec)" |
150 |
+ "$(use_have static dnssec_static)" |
151 |
+ "$(use_have -n dumpfile)" |
152 |
+ ) |
153 |
+} |
154 |
+ |
155 |
+src_compile() { |
156 |
+ emake \ |
157 |
+ PREFIX=/usr \ |
158 |
+ MANDIR=/usr/share/man \ |
159 |
+ CC="$(tc-getCC)" \ |
160 |
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \ |
161 |
+ CFLAGS="${CFLAGS}" \ |
162 |
+ LDFLAGS="${LDFLAGS}" \ |
163 |
+ COPTS="${COPTS[*]}" \ |
164 |
+ CONFFILE="/etc/${PN}.conf" \ |
165 |
+ all$(use nls && printf -- "-i18n\n") |
166 |
+ |
167 |
+ use dhcp-tools && emake -C contrib/lease-tools \ |
168 |
+ PREFIX=/usr \ |
169 |
+ MANDIR=/usr/share/man \ |
170 |
+ CC="$(tc-getCC)" \ |
171 |
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \ |
172 |
+ CFLAGS="${CFLAGS}" \ |
173 |
+ LDFLAGS="${LDFLAGS}" \ |
174 |
+ all |
175 |
+} |
176 |
+ |
177 |
+src_install() { |
178 |
+ local lingua puid |
179 |
+ emake \ |
180 |
+ PREFIX=/usr \ |
181 |
+ MANDIR=/usr/share/man \ |
182 |
+ COPTS="${COPTS[*]}" \ |
183 |
+ DESTDIR="${ED}" \ |
184 |
+ install$(use nls && printf -- "-i18n\n") |
185 |
+ |
186 |
+ for lingua in "${DM_LINGUAS[@]}"; do |
187 |
+ has ${lingua} ${LINGUAS-${lingua}} \ |
188 |
+ || rm -rf "${ED}"/usr/share/locale/${lingua} |
189 |
+ done |
190 |
+ [[ -d "${D}"/usr/share/locale/ ]] && \ |
191 |
+ rmdir --ignore-fail-on-non-empty "${ED}"/usr/share/locale/ |
192 |
+ |
193 |
+ dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example |
194 |
+ dodoc -r logo |
195 |
+ |
196 |
+ docinto html/ |
197 |
+ dodoc *.html |
198 |
+ |
199 |
+ newinitd "${FILESDIR}"/dnsmasq-init-r4 ${PN} |
200 |
+ newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN} |
201 |
+ |
202 |
+ insinto /etc/logrotate.d |
203 |
+ newins "${FILESDIR}"/dnsmasq.logrotate ${PN} |
204 |
+ |
205 |
+ insinto /etc |
206 |
+ newins dnsmasq.conf.example dnsmasq.conf |
207 |
+ |
208 |
+ insinto /usr/share/dnsmasq |
209 |
+ doins trust-anchors.conf |
210 |
+ |
211 |
+ if use dhcp; then |
212 |
+ keepdir /var/lib/misc |
213 |
+ newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r3 ${PN} |
214 |
+ fi |
215 |
+ if use dbus; then |
216 |
+ insinto /etc/dbus-1/system.d |
217 |
+ doins dbus/dnsmasq.conf |
218 |
+ fi |
219 |
+ |
220 |
+ if use dhcp-tools; then |
221 |
+ dosbin contrib/lease-tools/{dhcp_release,dhcp_lease_time} |
222 |
+ doman contrib/lease-tools/{dhcp_release,dhcp_lease_time}.1 |
223 |
+ if use ipv6; then |
224 |
+ dosbin contrib/lease-tools/dhcp_release6 |
225 |
+ doman contrib/lease-tools/dhcp_release6.1 |
226 |
+ fi |
227 |
+ fi |
228 |
+ |
229 |
+ systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service |
230 |
+} |
231 |
+ |
232 |
+pkg_preinst() { |
233 |
+ # temporary workaround to (hopefully) prevent leases file from being removed |
234 |
+ [[ -f /var/lib/misc/dnsmasq.leases ]] && \ |
235 |
+ cp /var/lib/misc/dnsmasq.leases "${T}" |
236 |
+} |
237 |
+ |
238 |
+pkg_postinst() { |
239 |
+ # temporary workaround to (hopefully) prevent leases file from being removed |
240 |
+ [[ -f "${T}"/dnsmasq.leases ]] && \ |
241 |
+ cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases |
242 |
+} |
243 |
|
244 |
diff --git a/net-dns/dnsmasq/metadata.xml b/net-dns/dnsmasq/metadata.xml |
245 |
index dd1a2a161c6..9a597f9b11b 100644 |
246 |
--- a/net-dns/dnsmasq/metadata.xml |
247 |
+++ b/net-dns/dnsmasq/metadata.xml |
248 |
@@ -11,6 +11,7 @@ |
249 |
<flag name="dhcp-tools">Install extra command line tools for manually managing DHCP leases.</flag> |
250 |
<flag name="dhcp">Enable support for acting as a DHCP server.</flag> |
251 |
<flag name="dnssec">Enable support DNSSEC validation and caching.</flag> |
252 |
+ <flag name="dumpfile">Include code to dump packets to a libpcap-format file for debugging</flag> |
253 |
<flag name="id">Whether report *.bind CHAOS info to clients, otherwise forward such requests upstream instead</flag> |
254 |
<flag name="libidn2">Enable support for Internationalized Domain Names, via net-dns/libidn2 rather than net-dns/libidn</flag> |
255 |
<flag name="script">Enable support for calling scripts when leases change.</flag> |