Gentoo Archives: gentoo-commits

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