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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Nov 21 13:08:25 2008 UTC (11 years ago) by scarabeus
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump. Remove old. Proxy commit for Roy.
(Portage version: 2.2_rc14/cvs/Linux 2.6.27-gentoo x86_64)

1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/dhcpcd/dhcpcd-4.99.3.ebuild,v 1.1 2008/10/29 15:10:51 welp Exp $
4
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 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 IUSE="zeroconf"
23
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 epatch "${FILESDIR}"/${PN}-4.99.2-no-empty-clientid.patch
41 }
42
43 pkg_setup() {
44 MAKE_ARGS="DBDIR=/var/lib/dhcpcd LIBEXECDIR=/lib/dhcpcd"
45 }
46
47 src_compile() {
48 [ -z "${MAKE_ARGS}" ] && die "MAKE_ARGS is empty"
49 emake CC="$(tc-getCC)" ${MAKE_ARGS} || die
50 }
51
52 src_install() {
53 local hooks="50-ntp.conf"
54 use elibc_glibc && hooks="${hooks} 50-yp.conf"
55 emake ${MAKE_ARGS} HOOKSCRIPTS="${hooks}" DESTDIR="${D}" install || die
56 }
57
58 pkg_postinst() {
59 # Upgrade the duid file to the new format if needed
60 local old_duid="${ROOT}"/var/lib/dhcpcd/dhcpcd.duid
61 local new_duid="${ROOT}"/etc/dhcpcd.duid
62 if [ -e "${old_duid}" ] && ! grep -q '..:..:..:..:..:..' "${old_duid}"; then
63 sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_duid}"
64 fi
65
66 # Move the duid to /etc, a more sensible location
67 if [ -e "${old_duid}" -a ! -e "${new_duid}" ]; then
68 cp -p "${old_duid}" "${new_duid}"
69 fi
70
71 if use zeroconf; then
72 elog "You have installed dhcpcd with zeroconf support."
73 elog "This means that it will always obtain an IP address even if no"
74 elog "DHCP server can be contacted, which will break any existing"
75 elog "failover support you may have configured in your net configuration."
76 elog "This behaviour can be controlled with the -L flag."
77 elog "See the dhcpcd man page for more details."
78 fi
79 }

  ViewVC Help
Powered by ViewVC 1.1.20