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

Contents of /net-misc/dhcpcd/dhcpcd-4.0.0_rc3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Aug 24 20:57:10 2008 UTC (11 years, 3 months ago) by armin76
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump
(Portage version: 2.1.4.4)

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.0.0_rc3.ebuild,v 1.1 2008/07/27 10:47:00 ikelos Exp $
4
5 EAPI=1
6
7 inherit toolchain-funcs
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/dhcpcd"
16 SRC_URI="http://roy.marples.name/${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="+compat 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 if use compat; then
41 elog "dhcpcd-3 command line support enabled"
42 {
43 echo
44 echo "/* User indicated command line compatability */"
45 echo "#define CMDLINE_COMPAT"
46 } >> config.h
47 fi
48 }
49
50 pkg_setup() {
51 MAKE_ARGS="DBDIR=/var/lib/dhcpcd LIBEXECDIR=/lib/dhcpcd"
52 }
53
54 src_compile() {
55 [ -z "${MAKE_ARGS}" ] && die "MAKE_ARGS is empty"
56 emake CC="$(tc-getCC)" ${MAKE_ARGS} || die
57 }
58
59 src_install() {
60 local hooks="50-ntp.conf"
61 use elibc_glibc && hooks="${hooks} 50-yp.conf"
62 emake ${MAKE_ARGS} HOOKSCRIPTS="${hooks}" DESTDIR="${D}" install || die
63 }
64
65 pkg_postinst() {
66 # Upgrade the duid file to the new format if needed
67 local old_duid="${ROOT}"/var/lib/dhcpcd/dhcpcd.duid
68 local new_duid="${ROOT}"/etc/dhcpcd.duid
69 if [ -e "${old_duid}" ] && ! grep -q '..:..:..:..:..:..' "${old_duid}"; then
70 sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_duid}"
71 fi
72
73 # Move the duid to /etc, a more sensible location
74 if [ -e "${old_duid}" -a ! -e "${new_duid}" ]; then
75 cp -p "${old_duid}" "${new_duid}"
76 fi
77
78 if use zeroconf; then
79 elog "You have installed dhcpcd with zeroconf support."
80 elog "This means that it will always obtain an IP address even if no"
81 elog "DHCP server can be contacted, which will break any existing"
82 elog "failover support you may have configured in your net configuration."
83 elog "This behaviour can be controlled with the -L flag."
84 elog "See the dhcpcd man page for more details."
85 fi
86 }

  ViewVC Help
Powered by ViewVC 1.1.20