1 |
commit: f6596ff246badfd4d320deb12f0844cde32663de |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 30 10:22:54 2016 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 30 10:23:18 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6596ff2 |
7 |
|
8 |
net-misc/dhcp: Removed old. |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
net-misc/dhcp/Manifest | 2 - |
14 |
net-misc/dhcp/dhcp-4.2.5_p1-r2.ebuild | 256 --------------------------------- |
15 |
net-misc/dhcp/dhcp-4.3.3-r1.ebuild | 258 ---------------------------------- |
16 |
3 files changed, 516 deletions(-) |
17 |
|
18 |
diff --git a/net-misc/dhcp/Manifest b/net-misc/dhcp/Manifest |
19 |
index c6a6536..9a8c6c8 100644 |
20 |
--- a/net-misc/dhcp/Manifest |
21 |
+++ b/net-misc/dhcp/Manifest |
22 |
@@ -1,5 +1,3 @@ |
23 |
-DIST dhcp-4.2.5-P1.tar.gz 8255960 SHA256 59b06c9f5d775e46999b422c45b9229402c462b114ce1685617bfb2b8b028250 SHA512 02a811b6e88ce013f7ecff6abf81d4b2aff82fff584521ae03fc3242b6036d0d0ad3afc6283fe8b97d18b8fffd4b6d2253386897ae2297c165240017f5f219ec WHIRLPOOL b8cf91c69ae0e1b234089ce3fae4b9daf5bde7f415d8cbc274ab4d006c8aa25f55807c70ba4c6771e0c9803ec5a99f8cc2088e561cac7d16479f5f022ee5459f |
24 |
DIST dhcp-4.3.1.tar.gz 8980806 SHA256 266cbca8a7a6bb8f9ccc5765da0d2b04099329314a54a4fc1022d510ad3e9af0 SHA512 84ca525fda825bf367a98754f1fb1b8eba5b095c92c25ddaec6e30b31008c7d5c43062ae43cecaa43731a8e78ae406a3123906fd402d2ba4b46b7adbae65aa6a WHIRLPOOL 3fd3720f6883b43856d2169264ee2adfb541b793604728c4e5cc3b647d4a88d6245fb6e53062de4118301cc15f0b4388363eba304bf3623dfb88c91bde94b2b6 |
25 |
DIST dhcp-4.3.3-P1.tar.gz 9204043 SHA256 c11e896dffa1bfbc49462965d3f6dec45534e34068603546d9a236f2aa669921 SHA512 7e14268b4acaa82c807af9d956f76f4327a9a75d36273a244fef74dbd54e7506e8b38ce6035e56f61ab09a19bfc0a40599f76c89dc342514f1048b5ac3b2a0eb WHIRLPOOL a0a6873e2f1625cfa208c328ed2d6ec507e239456d6eba24f5731a83ba16f5fbb36f0d6d99fd33fb9045cbf051116196a57c6c2ded2b36e93964475ad29d2b0e |
26 |
-DIST dhcp-4.3.3.tar.gz 9205539 SHA256 553c4945b09b1c1b904c4780f34f72aaefa2fc8c6556715de0bc9d4e3d255ede SHA512 33671816e21456ffec57e2c9ab2d129377096b4e2e5b4ca8194dcd9495c6a9e18a2a5e79d4f05694f3dc841895aa0adb63afd7bd6fe4641eb5a80d3fd7e715d9 WHIRLPOOL 27e7f2fdd1f1f7b3309b444a67e21d139468317538345cc3599e6a47f20489fa5d07018eabe8e32c429f2f16f03c28b22b29bff2ab08972f541c63603bd3df9a |
27 |
DIST dhcp-4.3.4.tar.gz 9302513 SHA256 f5115aee3dd3e6925de4ba47b80ab732ba48b481c8364b6ebade2d43698d607e SHA512 411c3f0e1effedb2a95f00539d13164530a56b50830008eb78906b3c8bf4070c331cf54a431770aed5d1b6ba214840446964210060674f746781cc97842ad706 WHIRLPOOL ea283592268c8efabd7fec430bd21c45306822b9275c91ee1e604d09e92f9eb3c50941ea11ecd9dcb230caec3b8e6ee94958e8eb6375e0ca0e7a64a8aaf63bce |
28 |
|
29 |
diff --git a/net-misc/dhcp/dhcp-4.2.5_p1-r2.ebuild b/net-misc/dhcp/dhcp-4.2.5_p1-r2.ebuild |
30 |
deleted file mode 100644 |
31 |
index 268df67..0000000 |
32 |
--- a/net-misc/dhcp/dhcp-4.2.5_p1-r2.ebuild |
33 |
+++ /dev/null |
34 |
@@ -1,256 +0,0 @@ |
35 |
-# Copyright 1999-2014 Gentoo Foundation |
36 |
-# Distributed under the terms of the GNU General Public License v2 |
37 |
-# $Id$ |
38 |
- |
39 |
-EAPI="4" |
40 |
- |
41 |
-inherit eutils systemd toolchain-funcs user |
42 |
- |
43 |
-MY_PV="${PV//_alpha/a}" |
44 |
-MY_PV="${MY_PV//_beta/b}" |
45 |
-MY_PV="${MY_PV//_rc/rc}" |
46 |
-MY_PV="${MY_PV//_p/-P}" |
47 |
-MY_P="${PN}-${MY_PV}" |
48 |
-DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server" |
49 |
-HOMEPAGE="http://www.isc.org/products/DHCP" |
50 |
-SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz |
51 |
- ftp://ftp.isc.org/isc/dhcp/${MY_PV}/${MY_P}.tar.gz" |
52 |
- |
53 |
-LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script |
54 |
-SLOT="0" |
55 |
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
56 |
-IUSE="+client ipv6 kernel_linux ldap selinux +server ssl vim-syntax" |
57 |
- |
58 |
-DEPEND=" |
59 |
- client? ( |
60 |
- kernel_linux? ( |
61 |
- ipv6? ( sys-apps/iproute2 ) |
62 |
- sys-apps/net-tools |
63 |
- ) |
64 |
- ) |
65 |
- ldap? ( |
66 |
- net-nds/openldap |
67 |
- ssl? ( dev-libs/openssl ) |
68 |
- )" |
69 |
-RDEPEND="${DEPEND} |
70 |
- selinux? ( sec-policy/selinux-dhcp ) |
71 |
- vim-syntax? ( app-vim/dhcpd-syntax )" |
72 |
- |
73 |
-S="${WORKDIR}/${MY_P}" |
74 |
- |
75 |
-src_unpack() { |
76 |
- unpack ${A} |
77 |
- # handle local bind hell |
78 |
- cd "${S}"/bind |
79 |
- unpack ./bind.tar.gz |
80 |
-} |
81 |
- |
82 |
-src_prepare() { |
83 |
- # Gentoo patches - these will probably never be accepted upstream |
84 |
- # Fix some permission issues |
85 |
- epatch "${FILESDIR}"/${PN}-3.0-fix-perms.patch |
86 |
- # Enable dhclient to equery NTP servers |
87 |
- epatch "${FILESDIR}"/${PN}-4.0-dhclient-ntp.patch |
88 |
- # resolvconf support in dhclient-script |
89 |
- epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-resolvconf.patch |
90 |
- # Stop downing the interface on Linux as that breaks link daemons |
91 |
- # such as wpa_supplicant and netplug |
92 |
- epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-no-down.patch |
93 |
- epatch "${FILESDIR}"/${PN}-4.2.0-errwarn-message.patch |
94 |
- # Enable dhclient to get extra configuration from stdin |
95 |
- epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-stdin-conf.patch |
96 |
- epatch "${FILESDIR}"/${PN}-4.2.2-nogateway.patch #265531 |
97 |
- epatch "${FILESDIR}"/${PN}-4.2.4-quieter-ping.patch #296921 |
98 |
- epatch "${FILESDIR}"/${PN}-4.2.4-always-accept-4.patch #437108 |
99 |
- epatch "${FILESDIR}"/${PN}-4.2.5-iproute2-path.patch #480636 |
100 |
- epatch "${FILESDIR}"/${PN}-4.2.5-bindtodevice-inet6.patch #471142 |
101 |
- |
102 |
- # Brand the version with Gentoo |
103 |
- sed -i \ |
104 |
- -e "/VERSION=/s:'$: Gentoo-${PR}':" \ |
105 |
- configure || die |
106 |
- |
107 |
- # Change the hook script locations of the scripts |
108 |
- sed -i \ |
109 |
- -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ |
110 |
- -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \ |
111 |
- client/scripts/* || die |
112 |
- |
113 |
- # No need for the linux script to force bash #158540 |
114 |
- sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die |
115 |
- |
116 |
- # Quiet the freebsd logger a little |
117 |
- sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die |
118 |
- |
119 |
- # Remove these options from the sample config |
120 |
- sed -i -r \ |
121 |
- -e "/(script|host-name|domain-name) /d" \ |
122 |
- client/dhclient.conf.example || die |
123 |
- |
124 |
- if use client && ! use server ; then |
125 |
- sed -i -r \ |
126 |
- -e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \ |
127 |
- Makefile.in || die |
128 |
- elif ! use client && use server ; then |
129 |
- sed -i -r \ |
130 |
- -e '/^SUBDIRS/s:\<client\>::' \ |
131 |
- Makefile.in || die |
132 |
- fi |
133 |
- |
134 |
- # Only install different man pages if we don't have en |
135 |
- if [[ " ${LINGUAS} " != *" en "* ]]; then |
136 |
- # Install Japanese man pages |
137 |
- if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then |
138 |
- einfo "Installing Japanese documention" |
139 |
- cp doc/ja_JP.eucJP/dhclient* client |
140 |
- cp doc/ja_JP.eucJP/dhcp* common |
141 |
- fi |
142 |
- fi |
143 |
- # Now remove the non-english docs so there are no errors later |
144 |
- rm -rf doc/ja_JP.eucJP |
145 |
- |
146 |
- # make the bind build work |
147 |
- binddir=${S}/bind |
148 |
- cd "${binddir}" || die |
149 |
- cat <<-EOF > bindvar.tmp |
150 |
- binddir=${binddir} |
151 |
- GMAKE=${MAKE:-gmake} |
152 |
- EOF |
153 |
- epatch "${FILESDIR}"/${PN}-4.2.2-bind-disable.patch |
154 |
- cd bind-*/ |
155 |
- epatch "${FILESDIR}"/${PN}-4.2.2-bind-parallel-build.patch #380717 |
156 |
- epatch "${FILESDIR}"/${PN}-4.2.2-bind-build-flags.patch |
157 |
-} |
158 |
- |
159 |
-src_configure() { |
160 |
- # bind defaults to stupid `/usr/bin/ar` |
161 |
- tc-export AR BUILD_CC |
162 |
- export ac_cv_path_AR=${AR} |
163 |
- |
164 |
- # this is tested for by the bind build system, and can cause trouble |
165 |
- # when cross-building; since dhcp itself doesn't make use of libcap, |
166 |
- # simply disable it. |
167 |
- export ac_cv_lib_cap_cap_set_proc=no |
168 |
- |
169 |
- # Use FHS sane paths ... some of these have configure options, |
170 |
- # but not all, so just do it all here. |
171 |
- local e="/etc/dhcp" r="/var/run/dhcp" l="/var/lib/dhcp" |
172 |
- cat <<-EOF >> includes/site.h |
173 |
- #define _PATH_DHCPD_CONF "${e}/dhcpd.conf" |
174 |
- #define _PATH_DHCLIENT_CONF "${e}/dhclient.conf" |
175 |
- #define _PATH_DHCPD_DB "${l}/dhcpd.leases" |
176 |
- #define _PATH_DHCPD6_DB "${l}/dhcpd6.leases" |
177 |
- #define _PATH_DHCLIENT_DB "${l}/dhclient.leases" |
178 |
- #define _PATH_DHCLIENT6_DB "${l}/dhclient6.leases" |
179 |
- #define _PATH_DHCPD_PID "${r}/dhcpd.pid" |
180 |
- #define _PATH_DHCPD6_PID "${r}/dhcpd6.pid" |
181 |
- #define _PATH_DHCLIENT_PID "${r}/dhcpclient.pid" |
182 |
- #define _PATH_DHCLIENT6_PID "${r}/dhcpclient6.pid" |
183 |
- #define _PATH_DHCRELAY_PID "${r}/dhcrelay.pid" |
184 |
- #define _PATH_DHCRELAY6_PID "${r}/dhcrelay6.pid" |
185 |
- EOF |
186 |
- |
187 |
- econf \ |
188 |
- --enable-paranoia \ |
189 |
- --enable-early-chroot \ |
190 |
- --sysconfdir=${e} \ |
191 |
- $(use_enable ipv6 dhcpv6) \ |
192 |
- $(use_with ldap) \ |
193 |
- $(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto) |
194 |
- |
195 |
- # configure local bind cruft. symtable option requires |
196 |
- # perl and we don't want to require that #383837. |
197 |
- cd bind/bind-*/ || die |
198 |
- eval econf \ |
199 |
- $(sed -n '/ [.].configure /{s:^[^-]*::;s:>.*::;p}' ../Makefile) \ |
200 |
- --disable-symtable \ |
201 |
- --without-make-clean |
202 |
-} |
203 |
- |
204 |
-src_compile() { |
205 |
- # build local bind cruft first |
206 |
- emake -C bind/bind-*/lib/export install |
207 |
- # then build standard dhcp code |
208 |
- emake AR="$(tc-getAR)" |
209 |
-} |
210 |
- |
211 |
-src_install() { |
212 |
- default |
213 |
- |
214 |
- dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters} |
215 |
- dohtml doc/References.html |
216 |
- |
217 |
- if [[ -e client/dhclient ]] ; then |
218 |
- # move the client to / |
219 |
- dodir /sbin |
220 |
- mv "${D}"/usr/sbin/dhclient "${D}"/sbin/ || die |
221 |
- |
222 |
- exeinto /sbin |
223 |
- if use kernel_linux ; then |
224 |
- newexe "${S}"/client/scripts/linux dhclient-script |
225 |
- else |
226 |
- newexe "${S}"/client/scripts/freebsd dhclient-script |
227 |
- fi |
228 |
- fi |
229 |
- |
230 |
- if [[ -e server/dhcpd ]] ; then |
231 |
- if use ldap ; then |
232 |
- insinto /etc/openldap/schema |
233 |
- doins contrib/ldap/dhcp.* |
234 |
- dosbin contrib/ldap/dhcpd-conf-to-ldap |
235 |
- fi |
236 |
- |
237 |
- newinitd "${FILESDIR}"/dhcpd.init5 dhcpd |
238 |
- newconfd "${FILESDIR}"/dhcpd.conf2 dhcpd |
239 |
- newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay |
240 |
- newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay |
241 |
- newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay6 |
242 |
- newconfd "${FILESDIR}"/dhcrelay6.conf dhcrelay6 |
243 |
- |
244 |
- systemd_newtmpfilesd "${FILESDIR}"/dhcpd.tmpfiles dhcpd.conf |
245 |
- systemd_dounit "${FILESDIR}"/dhcpd4.service |
246 |
- systemd_dounit "${FILESDIR}"/dhcpd6.service |
247 |
- systemd_dounit "${FILESDIR}"/dhcrelay4.service |
248 |
- systemd_dounit "${FILESDIR}"/dhcrelay6.service |
249 |
- systemd_install_serviced "${FILESDIR}"/dhcrelay4.service.conf |
250 |
- systemd_install_serviced "${FILESDIR}"/dhcrelay6.service.conf |
251 |
- |
252 |
- sed -i "s:#@slapd@:$(usex ldap slapd ''):" "${ED}"/etc/init.d/* || die #442560 |
253 |
- fi |
254 |
- |
255 |
- # the default config files aren't terribly useful #384087 |
256 |
- local f |
257 |
- for f in "${ED}"/etc/dhcp/*.conf.example ; do |
258 |
- mv "${f}" "${f%.example}" || die |
259 |
- done |
260 |
- sed -i '/^[^#]/s:^:#:' "${ED}"/etc/dhcp/*.conf || die |
261 |
-} |
262 |
- |
263 |
-pkg_preinst() { |
264 |
- enewgroup dhcp |
265 |
- enewuser dhcp -1 -1 /var/lib/dhcp dhcp |
266 |
- |
267 |
- # Keep the user files over the sample ones. The |
268 |
- # hashing is to ignore the crappy defaults #384087. |
269 |
- local f h |
270 |
- for f in dhclient:da7c8496a96452190aecf9afceef4510 dhcpd:10979e7b71134bd7f04d2a60bd58f070 ; do |
271 |
- h=${f#*:} |
272 |
- f="/etc/dhcp/${f%:*}.conf" |
273 |
- if [ -e "${EROOT}"${f} ] ; then |
274 |
- case $(md5sum "${EROOT}"${f}) in |
275 |
- ${h}*) ;; |
276 |
- *) cp -p "${EROOT}"${f} "${ED}"${f};; |
277 |
- esac |
278 |
- fi |
279 |
- done |
280 |
-} |
281 |
- |
282 |
-pkg_postinst() { |
283 |
- if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then |
284 |
- ewarn |
285 |
- ewarn "WARNING: The dhcp init script has been renamed to dhcpd" |
286 |
- ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and" |
287 |
- ewarn "and dhcp should be removed from the default runlevel" |
288 |
- ewarn |
289 |
- fi |
290 |
-} |
291 |
|
292 |
diff --git a/net-misc/dhcp/dhcp-4.3.3-r1.ebuild b/net-misc/dhcp/dhcp-4.3.3-r1.ebuild |
293 |
deleted file mode 100644 |
294 |
index 35851c1..0000000 |
295 |
--- a/net-misc/dhcp/dhcp-4.3.3-r1.ebuild |
296 |
+++ /dev/null |
297 |
@@ -1,258 +0,0 @@ |
298 |
-# Copyright 1999-2015 Gentoo Foundation |
299 |
-# Distributed under the terms of the GNU General Public License v2 |
300 |
-# $Id$ |
301 |
- |
302 |
-EAPI="4" |
303 |
- |
304 |
-inherit eutils systemd toolchain-funcs user |
305 |
- |
306 |
-MY_PV="${PV//_alpha/a}" |
307 |
-MY_PV="${MY_PV//_beta/b}" |
308 |
-MY_PV="${MY_PV//_rc/rc}" |
309 |
-MY_PV="${MY_PV//_p/-P}" |
310 |
-MY_P="${PN}-${MY_PV}" |
311 |
-DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server" |
312 |
-HOMEPAGE="http://www.isc.org/products/DHCP" |
313 |
-SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz |
314 |
- ftp://ftp.isc.org/isc/dhcp/${MY_PV}/${MY_P}.tar.gz" |
315 |
- |
316 |
-LICENSE="ISC BSD SSLeay GPL-2" # GPL-2 only for init script |
317 |
-SLOT="0" |
318 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
319 |
-IUSE="+client ipv6 kernel_linux ldap libressl selinux +server ssl vim-syntax" |
320 |
- |
321 |
-DEPEND=" |
322 |
- client? ( |
323 |
- kernel_linux? ( |
324 |
- ipv6? ( sys-apps/iproute2 ) |
325 |
- sys-apps/net-tools |
326 |
- ) |
327 |
- ) |
328 |
- ldap? ( |
329 |
- net-nds/openldap |
330 |
- ssl? ( |
331 |
- !libressl? ( dev-libs/openssl:0 ) |
332 |
- libressl? ( dev-libs/libressl ) |
333 |
- ) |
334 |
- )" |
335 |
-RDEPEND="${DEPEND} |
336 |
- selinux? ( sec-policy/selinux-dhcp ) |
337 |
- vim-syntax? ( app-vim/dhcpd-syntax )" |
338 |
- |
339 |
-S="${WORKDIR}/${MY_P}" |
340 |
- |
341 |
-src_unpack() { |
342 |
- unpack ${A} |
343 |
- # handle local bind hell |
344 |
- cd "${S}"/bind |
345 |
- unpack ./bind.tar.gz |
346 |
-} |
347 |
- |
348 |
-src_prepare() { |
349 |
- # Gentoo patches - these will probably never be accepted upstream |
350 |
- # Fix some permission issues |
351 |
- epatch "${FILESDIR}"/${PN}-3.0-fix-perms.patch |
352 |
- # Enable dhclient to equery NTP servers |
353 |
- epatch "${FILESDIR}"/${PN}-4.0-dhclient-ntp.patch |
354 |
- epatch "${FILESDIR}"/${PN}-4.3.1-dhclient-resolvconf.patch |
355 |
- # Stop downing the interface on Linux as that breaks link daemons |
356 |
- # such as wpa_supplicant and netplug |
357 |
- epatch "${FILESDIR}"/${PN}-3.0.3-dhclient-no-down.patch |
358 |
- # Enable dhclient to get extra configuration from stdin |
359 |
- epatch "${FILESDIR}"/${PN}-4.2.2-dhclient-stdin-conf.patch |
360 |
- epatch "${FILESDIR}"/${PN}-4.2.2-nogateway.patch #265531 |
361 |
- epatch "${FILESDIR}"/${PN}-4.2.4-quieter-ping.patch #296921 |
362 |
- epatch "${FILESDIR}"/${PN}-4.2.4-always-accept-4.patch #437108 |
363 |
- epatch "${FILESDIR}"/${PN}-4.2.5-iproute2-path.patch #480636 |
364 |
- epatch "${FILESDIR}"/${PN}-4.2.5-bindtodevice-inet6.patch #471142 |
365 |
- epatch "${FILESDIR}"/${PN}-4.3.3-ldap-ipv6-client-id.patch #559832 |
366 |
- |
367 |
- # Brand the version with Gentoo |
368 |
- sed -i \ |
369 |
- -e "/VERSION=/s:'$: Gentoo-${PR}':" \ |
370 |
- configure || die |
371 |
- |
372 |
- # Change the hook script locations of the scripts |
373 |
- sed -i \ |
374 |
- -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ |
375 |
- -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \ |
376 |
- client/scripts/* || die |
377 |
- |
378 |
- # No need for the linux script to force bash #158540 |
379 |
- sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die |
380 |
- |
381 |
- # Quiet the freebsd logger a little |
382 |
- sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die |
383 |
- |
384 |
- # Remove these options from the sample config |
385 |
- sed -i -r \ |
386 |
- -e "/(script|host-name|domain-name) /d" \ |
387 |
- client/dhclient.conf.example || die |
388 |
- |
389 |
- if use client && ! use server ; then |
390 |
- sed -i -r \ |
391 |
- -e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \ |
392 |
- Makefile.in || die |
393 |
- elif ! use client && use server ; then |
394 |
- sed -i -r \ |
395 |
- -e '/^SUBDIRS/s:\<client\>::' \ |
396 |
- Makefile.in || die |
397 |
- fi |
398 |
- |
399 |
- # Only install different man pages if we don't have en |
400 |
- if [[ " ${LINGUAS} " != *" en "* ]]; then |
401 |
- # Install Japanese man pages |
402 |
- if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then |
403 |
- einfo "Installing Japanese documention" |
404 |
- cp doc/ja_JP.eucJP/dhclient* client |
405 |
- cp doc/ja_JP.eucJP/dhcp* common |
406 |
- fi |
407 |
- fi |
408 |
- # Now remove the non-english docs so there are no errors later |
409 |
- rm -rf doc/ja_JP.eucJP |
410 |
- |
411 |
- # make the bind build work |
412 |
- binddir=${S}/bind |
413 |
- cd "${binddir}" || die |
414 |
- cat <<-EOF > bindvar.tmp |
415 |
- binddir=${binddir} |
416 |
- GMAKE=${MAKE:-gmake} |
417 |
- EOF |
418 |
- epatch "${FILESDIR}"/${PN}-4.3.3-bind-disable.patch |
419 |
- cd bind-*/ |
420 |
- epatch "${FILESDIR}"/${PN}-4.2.2-bind-parallel-build.patch #380717 |
421 |
- epatch "${FILESDIR}"/${PN}-4.2.2-bind-build-flags.patch |
422 |
-} |
423 |
- |
424 |
-src_configure() { |
425 |
- # bind defaults to stupid `/usr/bin/ar` |
426 |
- tc-export AR BUILD_CC |
427 |
- export ac_cv_path_AR=${AR} |
428 |
- |
429 |
- # this is tested for by the bind build system, and can cause trouble |
430 |
- # when cross-building; since dhcp itself doesn't make use of libcap, |
431 |
- # simply disable it. |
432 |
- export ac_cv_lib_cap_cap_set_proc=no |
433 |
- |
434 |
- # Use FHS sane paths ... some of these have configure options, |
435 |
- # but not all, so just do it all here. |
436 |
- local e="/etc/dhcp" r="/var/run/dhcp" l="/var/lib/dhcp" |
437 |
- cat <<-EOF >> includes/site.h |
438 |
- #define _PATH_DHCPD_CONF "${e}/dhcpd.conf" |
439 |
- #define _PATH_DHCLIENT_CONF "${e}/dhclient.conf" |
440 |
- #define _PATH_DHCPD_DB "${l}/dhcpd.leases" |
441 |
- #define _PATH_DHCPD6_DB "${l}/dhcpd6.leases" |
442 |
- #define _PATH_DHCLIENT_DB "${l}/dhclient.leases" |
443 |
- #define _PATH_DHCLIENT6_DB "${l}/dhclient6.leases" |
444 |
- #define _PATH_DHCPD_PID "${r}/dhcpd.pid" |
445 |
- #define _PATH_DHCPD6_PID "${r}/dhcpd6.pid" |
446 |
- #define _PATH_DHCLIENT_PID "${r}/dhcpclient.pid" |
447 |
- #define _PATH_DHCLIENT6_PID "${r}/dhcpclient6.pid" |
448 |
- #define _PATH_DHCRELAY_PID "${r}/dhcrelay.pid" |
449 |
- #define _PATH_DHCRELAY6_PID "${r}/dhcrelay6.pid" |
450 |
- EOF |
451 |
- |
452 |
- econf \ |
453 |
- --enable-paranoia \ |
454 |
- --enable-early-chroot \ |
455 |
- --sysconfdir=${e} \ |
456 |
- $(use_enable ipv6 dhcpv6) \ |
457 |
- $(use_with ldap) \ |
458 |
- $(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto) |
459 |
- |
460 |
- # configure local bind cruft. symtable option requires |
461 |
- # perl and we don't want to require that #383837. |
462 |
- cd bind/bind-*/ || die |
463 |
- eval econf \ |
464 |
- $(sed -n '/^bindconfig =/,/^$/{:a;N;$!ba;s,^[^-]*,,;s,\\\s*\n\s*--,--,g;s, @[[:upper:]]\+@,,g;P;D}' ../Makefile.in) \ |
465 |
- --disable-symtable \ |
466 |
- --without-make-clean |
467 |
-} |
468 |
- |
469 |
-src_compile() { |
470 |
- # build local bind cruft first |
471 |
- emake -C bind/bind-*/lib/export install |
472 |
- # then build standard dhcp code |
473 |
- emake AR="$(tc-getAR)" |
474 |
-} |
475 |
- |
476 |
-src_install() { |
477 |
- default |
478 |
- |
479 |
- dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters} |
480 |
- dohtml doc/References.html |
481 |
- |
482 |
- if [[ -e client/dhclient ]] ; then |
483 |
- # move the client to / |
484 |
- dodir /sbin |
485 |
- mv "${D}"/usr/sbin/dhclient "${D}"/sbin/ || die |
486 |
- |
487 |
- exeinto /sbin |
488 |
- if use kernel_linux ; then |
489 |
- newexe "${S}"/client/scripts/linux dhclient-script |
490 |
- else |
491 |
- newexe "${S}"/client/scripts/freebsd dhclient-script |
492 |
- fi |
493 |
- fi |
494 |
- |
495 |
- if [[ -e server/dhcpd ]] ; then |
496 |
- if use ldap ; then |
497 |
- insinto /etc/openldap/schema |
498 |
- doins contrib/ldap/dhcp.* |
499 |
- dosbin contrib/ldap/dhcpd-conf-to-ldap |
500 |
- fi |
501 |
- |
502 |
- newinitd "${FILESDIR}"/dhcpd.init5 dhcpd |
503 |
- newconfd "${FILESDIR}"/dhcpd.conf2 dhcpd |
504 |
- newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay |
505 |
- newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay |
506 |
- newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay6 |
507 |
- newconfd "${FILESDIR}"/dhcrelay6.conf dhcrelay6 |
508 |
- |
509 |
- systemd_newtmpfilesd "${FILESDIR}"/dhcpd.tmpfiles dhcpd.conf |
510 |
- systemd_dounit "${FILESDIR}"/dhcpd4.service |
511 |
- systemd_dounit "${FILESDIR}"/dhcpd6.service |
512 |
- systemd_dounit "${FILESDIR}"/dhcrelay4.service |
513 |
- systemd_dounit "${FILESDIR}"/dhcrelay6.service |
514 |
- systemd_install_serviced "${FILESDIR}"/dhcrelay4.service.conf |
515 |
- systemd_install_serviced "${FILESDIR}"/dhcrelay6.service.conf |
516 |
- |
517 |
- sed -i "s:#@slapd@:$(usex ldap slapd ''):" "${ED}"/etc/init.d/* || die #442560 |
518 |
- fi |
519 |
- |
520 |
- # the default config files aren't terribly useful #384087 |
521 |
- local f |
522 |
- for f in "${ED}"/etc/dhcp/*.conf.example ; do |
523 |
- mv "${f}" "${f%.example}" || die |
524 |
- done |
525 |
- sed -i '/^[^#]/s:^:#:' "${ED}"/etc/dhcp/*.conf || die |
526 |
-} |
527 |
- |
528 |
-pkg_preinst() { |
529 |
- enewgroup dhcp |
530 |
- enewuser dhcp -1 -1 /var/lib/dhcp dhcp |
531 |
- |
532 |
- # Keep the user files over the sample ones. The |
533 |
- # hashing is to ignore the crappy defaults #384087. |
534 |
- local f h |
535 |
- for f in dhclient:da7c8496a96452190aecf9afceef4510 dhcpd:10979e7b71134bd7f04d2a60bd58f070 ; do |
536 |
- h=${f#*:} |
537 |
- f="/etc/dhcp/${f%:*}.conf" |
538 |
- if [ -e "${EROOT}"${f} ] ; then |
539 |
- case $(md5sum "${EROOT}"${f}) in |
540 |
- ${h}*) ;; |
541 |
- *) cp -p "${EROOT}"${f} "${ED}"${f};; |
542 |
- esac |
543 |
- fi |
544 |
- done |
545 |
-} |
546 |
- |
547 |
-pkg_postinst() { |
548 |
- if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then |
549 |
- ewarn |
550 |
- ewarn "WARNING: The dhcp init script has been renamed to dhcpd" |
551 |
- ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and" |
552 |
- ewarn "and dhcp should be removed from the default runlevel" |
553 |
- ewarn |
554 |
- fi |
555 |
-} |