net-misc/dhcp: Minor ebuild improvements.
authorLars Wendler <polynomial-c@gentoo.org>
Sun, 27 Jan 2019 10:07:11 +0000 (11:07 +0100)
committerLars Wendler <polynomial-c@gentoo.org>
Sun, 27 Jan 2019 10:08:49 +0000 (11:08 +0100)
Package-Manager: Portage-2.3.58, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
net-misc/dhcp/dhcp-4.4.1.ebuild

index b092a12295053c89c9ae0ec5025d15d7b577a9c2..c3848a50d3e9b92b732ead82978aa2efb8a199b1 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -170,7 +170,7 @@ src_configure() {
        cd bind/bind-*/ || die
        local el
        eval econf \
-               $(for el in $(awk '/^bindconfig/,/^$/ {print}' ../Makefile.in) ; do if [[ ${el} =~ ^-- ]] ; then printf ' %s' ${el}; fi; done | sed 's,@\([[:alpha:]]\+\)dir@,${binddir}/\1,g') \
+               $(for el in $(awk '/^bindconfig/,/^$/ {print}' ../Makefile.in) ; do if [[ ${el} =~ ^-- ]] ; then printf ' %s' ${el} ; fi ; done | sed 's,@\([[:alpha:]]\+\)dir@,${binddir}/\1,g') \
                --disable-symtable \
                --without-make-clean
 }
@@ -192,7 +192,7 @@ src_install() {
        if [[ -e client/dhclient ]] ; then
                # move the client to /
                dodir /sbin
-               mv "${D}"/usr/sbin/dhclient "${D}"/sbin/ || die
+               mv "${ED%/}"/usr/sbin/dhclient "${ED%/}"/sbin/ || die
 
                exeinto /sbin
                if use kernel_linux ; then
@@ -224,15 +224,15 @@ src_install() {
                systemd_install_serviced "${FILESDIR}"/dhcrelay4.service.conf
                systemd_install_serviced "${FILESDIR}"/dhcrelay6.service.conf
 
-               sed -i "s:#@slapd@:$(usex ldap slapd ''):" "${ED}"/etc/init.d/* || die #442560
+               sed -i "s:#@slapd@:$(usex ldap slapd ''):" "${ED%/}"/etc/init.d/* || die #442560
        fi
 
        # the default config files aren't terribly useful #384087
        local f
-       for f in "${ED}"/etc/dhcp/*.conf.example ; do
+       for f in "${ED%/}"/etc/dhcp/*.conf.example ; do
                mv "${f}" "${f%.example}" || die
        done
-       sed -i '/^[^#]/s:^:#:' "${ED}"/etc/dhcp/*.conf || die
+       sed -i '/^[^#]/s:^:#:' "${ED%/}"/etc/dhcp/*.conf || die
 }
 
 pkg_preinst() {
@@ -245,10 +245,10 @@ pkg_preinst() {
        for f in dhclient:da7c8496a96452190aecf9afceef4510 dhcpd:10979e7b71134bd7f04d2a60bd58f070 ; do
                h=${f#*:}
                f="/etc/dhcp/${f%:*}.conf"
-               if [ -e "${EROOT}"${f} ] ; then
+               if [ -e "${EROOT%/}"${f} ] ; then
                        case $(md5sum "${EROOT}"${f}) in
                                ${h}*) ;;
-                               *) cp -p "${EROOT}"${f} "${ED}"${f};;
+                               *) cp -p "${EROOT%/}"${f} "${ED%/}"${f};;
                        esac
                fi
        done