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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Sun Apr 10 10:05:06 2011 UTC (2 years, 2 months ago) by hwoarang
Branch: MAIN
Changes since 1.4: +2 -2 lines
Stable on amd64 wrt bug #362459

(Portage version: 2.1.9.44/cvs/Linux x86_64)

1 williamh 1.1 # Copyright 1999-2011 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 hwoarang 1.5 # $Header: /var/cvsroot/gentoo-x86/net-misc/dhcpcd/dhcpcd-5.2.12.ebuild,v 1.4 2011/04/09 12:17:54 maekke Exp $
4 williamh 1.1
5     EAPI=1
6    
7     inherit 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 hwoarang 1.5 KEYWORDS="~alpha amd64 arm hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd"
20 williamh 1.1
21     SLOT="0"
22     IUSE="+zeroconf elibc_glibc"
23    
24     DEPEND=""
25     RDEPEND="!<sys-apps/openrc-0.6.0"
26     PROVIDE="virtual/dhcpc"
27    
28     src_unpack() {
29     unpack ${A}
30     cd "${S}"
31    
32     if ! use zeroconf; then
33     elog "Disabling zeroconf support"
34     {
35     echo
36     echo "# dhcpcd ebuild requested no zeroconf"
37     echo "noipv4ll"
38     } >> dhcpcd.conf
39     fi
40     }
41    
42     src_compile() {
43     local hooks="--with-hook=ntp.conf"
44     use elibc_glibc && hooks="${hooks} --with-hook=yp.conf"
45     econf --prefix= --libexecdir=/$(get_libdir)/dhcpcd --dbdir=/var/lib/dhcpcd \
46     --localstatedir=/var ${hooks}
47     emake || die
48     }
49    
50     src_install() {
51     emake DESTDIR="${D}" install || die
52     dodoc README
53     newinitd "${FILESDIR}"/${PN}.initd-1 ${PN}
54     }
55    
56     pkg_postinst() {
57     # Upgrade the duid file to the new format if needed
58     local old_duid="${ROOT}"/var/lib/dhcpcd/dhcpcd.duid
59     local new_duid="${ROOT}"/etc/dhcpcd.duid
60     if [ -e "${old_duid}" ] && ! grep -q '..:..:..:..:..:..' "${old_duid}"; then
61     sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_duid}"
62     fi
63    
64     # Move the duid to /etc, a more sensible location
65     if [ -e "${old_duid}" -a ! -e "${new_duid}" ]; then
66     cp -p "${old_duid}" "${new_duid}"
67     fi
68    
69     if use zeroconf; then
70     elog "You have installed dhcpcd with zeroconf support."
71     elog "This means that it will always obtain an IP address even if no"
72     elog "DHCP server can be contacted, which will break any existing"
73     elog "failover support you may have configured in your net configuration."
74     elog "This behaviour can be controlled with the -L flag."
75     elog "See the dhcpcd man page for more details."
76     fi
77    
78     elog
79     elog "Users upgrading from 4.0 series should pay attention to removal"
80     elog "of compat useflag. This changes behavior of dhcp in wide manner:"
81     elog "dhcpcd no longer sends a default ClientID for ethernet interfaces."
82     elog "This is so we can re-use the address the kernel DHCP client found."
83     elog "To retain the old behaviour of sending a default ClientID based on the"
84     elog "hardware address for interface, simply add the keyword clientid"
85     elog "to dhcpcd.conf or use commandline parameter -I ''"
86     elog
87     elog "Also, users upgrading from 4.0 series should be aware that"
88     elog "the -N, -R and -Y command line options no longer exist."
89     elog "These are controled now by nohook options in dhcpcd.conf."
90     }

  ViewVC Help
Powered by ViewVC 1.1.20