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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue Jul 22 09:43:07 2008 UTC (11 years, 4 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_beta1.ebuild,v 1.1 2008/05/06 14:28:55 drac 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 S="${WORKDIR}/${MY_P}"
12
13 DESCRIPTION="A DHCP client"
14 HOMEPAGE="http://roy.marples.name/dhcpcd"
15 SRC_URI="http://roy.marples.name/${PN}/${MY_P}.tar.bz2"
16 LICENSE="BSD-2"
17
18 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
19
20 SLOT="0"
21 IUSE="+compat zeroconf"
22
23 DEPEND=""
24 PROVIDE="virtual/dhcpc"
25
26 src_unpack() {
27 unpack ${A}
28 cd "${S}"
29
30 if ! use zeroconf; then
31 elog "Disabling zeroconf support"
32 {
33 echo
34 echo "# dhcpcd ebuild requested no zeroconf"
35 echo "noipv4ll"
36 } >> dhcpcd.conf
37 fi
38
39 if use compat; then
40 elog "dhcpcd-3 command line support enabled"
41 {
42 echo
43 echo "/* User indicated command line compatability */"
44 echo "#define CMDLINE_COMPAT"
45 } >> config.h
46 fi
47 }
48
49 src_compile() {
50 emake CC="$(tc-getCC)" DBDIR=/var/lib/dhcpcd || die
51 }
52
53 src_install() {
54 emake DESTDIR="${D}" install || die
55
56 dodir /etc/dhcpcd/dhcpcd-exit-hook.d
57 insinto /etc/dhcpcd/dhcpcd-exit-hook.d
58 # The sample ntp script only works with with NTP, not openntp
59 doins hook-samples/ntp.sh
60 # The sample ypbind script only works with linux
61 use elibc_glibc && doins hook-samples/ypbind.sh
62 }
63
64 pkg_postinst() {
65 # Upgrade the duid file to the new format if needed
66 local old_duid="${ROOT}"/var/lib/dhcpcd/dhcpcd.duid
67 local new_duid="${ROOT}"/etc/dhcpcd/dhcpcd.duid
68 if [ -e "${old_duid}" ] && ! grep -q '..:..:..:..:..:..' "${old_duid}"; then
69 sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_duid}"
70 fi
71
72 # Move the duid to /etc, a more sensible location
73 if [ -e "${old_duid}" -a ! -e "${new_duid}" ]; then
74 cp -p "${old_duid}" "${new_duid}"
75 fi
76
77 if use zeroconf; then
78 elog "You have installed dhcpcd with zeroconf support."
79 elog "This means that it will always obtain an IP address even if no"
80 elog "DHCP server can be contacted, which will break any existing"
81 elog "failover support you may have configured in your net configuration."
82 elog "This behaviour can be controlled with the -L flag."
83 elog "See the dhcpcd man page for more details."
84 fi
85 }

  ViewVC Help
Powered by ViewVC 1.1.20