/[gentoo-x86]/net-misc/dhcpcd/dhcpcd-5.0.4.ebuild
Gentoo

Contents of /net-misc/dhcpcd/dhcpcd-5.0.4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Wed Mar 31 18:03:50 2010 UTC (9 years, 9 months ago) by solar
Branch: MAIN
Changes since 1.2: +3 -3 lines
- elibc_glibc has to be defined in IUSE= for profiles that are unable to use.force that flag bug #312085
(Portage version: 2.1.8.2/cvs/Linux x86_64)

1 solar 1.3 # Copyright 1999-2010 Gentoo Foundation
2 armin76 1.1 # Distributed under the terms of the GNU General Public License v2
3 solar 1.3 # $Header: /var/cvsroot/gentoo-x86/net-misc/dhcpcd/dhcpcd-5.0.4.ebuild,v 1.2 2009/07/31 17:01:30 ssuominen Exp $
4 armin76 1.1
5     EAPI=1
6    
7     inherit toolchain-funcs eutils
8    
9     MY_P="${P/_alpha/-alpha}"
10     MY_P="${MY_P/_beta/-beta}"
11     MY_P="${MY_P/_rc/-rc}"
12     S="${WORKDIR}/${MY_P}"
13    
14     DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
15     HOMEPAGE="http://roy.marples.name/projects/dhcpcd/"
16     SRC_URI="http://roy.marples.name/downloads/${PN}/${MY_P}.tar.bz2"
17     LICENSE="BSD-2"
18    
19     KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
20    
21     SLOT="0"
22 solar 1.3 IUSE="+zeroconf elibc_glibc"
23 armin76 1.1
24     DEPEND=""
25     PROVIDE="virtual/dhcpc"
26    
27     src_unpack() {
28     unpack ${A}
29     cd "${S}"
30    
31     if ! use zeroconf; then
32     elog "Disabling zeroconf support"
33     {
34     echo
35     echo "# dhcpcd ebuild requested no zeroconf"
36     echo "noipv4ll"
37     } >> dhcpcd.conf
38     fi
39     }
40    
41     pkg_setup() {
42     MAKE_ARGS="DBDIR=/var/lib/dhcpcd LIBEXECDIR=/lib/dhcpcd"
43     }
44    
45     src_compile() {
46     [ -z "${MAKE_ARGS}" ] && die "MAKE_ARGS is empty"
47     emake CC="$(tc-getCC)" ${MAKE_ARGS} || die
48     }
49    
50     src_install() {
51     local hooks="50-ntp.conf"
52     use elibc_glibc && hooks="${hooks} 50-yp.conf"
53     use compat && hooks="${hooks} 50-dhcpcd-compat"
54     emake ${MAKE_ARGS} HOOKSCRIPTS="${hooks}" DESTDIR="${D}" install || die
55    
56     newinitd "${FILESDIR}"/${PN}.initd ${PN}
57     }
58    
59     pkg_postinst() {
60     # Upgrade the duid file to the new format if needed
61     local old_duid="${ROOT}"/var/lib/dhcpcd/dhcpcd.duid
62     local new_duid="${ROOT}"/etc/dhcpcd.duid
63     if [ -e "${old_duid}" ] && ! grep -q '..:..:..:..:..:..' "${old_duid}"; then
64     sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_duid}"
65     fi
66    
67     # Move the duid to /etc, a more sensible location
68     if [ -e "${old_duid}" -a ! -e "${new_duid}" ]; then
69     cp -p "${old_duid}" "${new_duid}"
70     fi
71    
72     if use zeroconf; then
73     elog "You have installed dhcpcd with zeroconf support."
74     elog "This means that it will always obtain an IP address even if no"
75     elog "DHCP server can be contacted, which will break any existing"
76     elog "failover support you may have configured in your net configuration."
77     elog "This behaviour can be controlled with the -L flag."
78     elog "See the dhcpcd man page for more details."
79     fi
80    
81     elog
82     elog "Users transfering from 4.0 series should pay attention to removal"
83     elog "of compat useflag. This changes behavior of dhcp in wide manner:"
84     elog "dhcpcd no longer sends a default ClientID for ethernet interfaces."
85     elog "This is so we can re-use the address the kernel DHCP client found."
86     elog "To retain the old behaviour of sending a default ClientID based on the"
87     elog "hardware address for interface, simply add the keyword clientid"
88     elog "to dhcpcd.conf or use commandline parameter -I ''"
89     }

  ViewVC Help
Powered by ViewVC 1.1.20