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

Contents of /net-misc/dhcpcd/dhcpcd-6.0.5-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Mon Mar 10 15:51:09 2014 UTC (5 years, 8 months ago) by williamh
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
remove older unstable versions

(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0x8568F528)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/dhcpcd/dhcpcd-6.0.5-r1.ebuild,v 1.2 2014/01/18 10:25:23 vapier Exp $
4
5 EAPI=5
6
7 if [[ ${PV} == "9999" ]]; then
8 EGIT_REPO_URI="git://roy.marples.name/${PN}.git"
9 inherit git-2
10 else
11 MY_P="${P/_alpha/-alpha}"
12 MY_P="${MY_P/_beta/-beta}"
13 MY_P="${MY_P/_rc/-rc}"
14 SRC_URI="http://roy.marples.name/downloads/${PN}/${MY_P}.tar.bz2"
15 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
16 S="${WORKDIR}/${MY_P}"
17 fi
18
19 inherit eutils systemd
20
21 DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
22 HOMEPAGE="http://roy.marples.name/projects/dhcpcd/"
23 LICENSE="BSD-2"
24 SLOT="0"
25 IUSE="elibc_glibc ipv6"
26
27 DEPEND=""
28 RDEPEND=""
29
30 src_prepare()
31 {
32 epatch "${FILESDIR}"/${P}-fix-build-without-ipv6.patch
33 epatch "${FILESDIR}"/${P}-fix-segfault.patch
34 epatch_user
35 }
36
37 src_configure()
38 {
39 local hooks="--with-hook=ntp.conf"
40 use elibc_glibc && hooks="${hooks} --with-hook=yp.conf"
41 econf \
42 --prefix="${EPREFIX}" \
43 --libexecdir="${EPREFIX}/lib/dhcpcd" \
44 --dbdir="${EPREFIX}/var/lib/dhcpcd" \
45 --localstatedir="${EPREFIX}/var" \
46 $(use_enable ipv6) \
47 ${hooks}
48 }
49
50 src_install()
51 {
52 default
53 newinitd "${FILESDIR}"/${PN}.initd ${PN}
54 systemd_dounit "${FILESDIR}"/${PN}.service
55 }
56
57 pkg_postinst()
58 {
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 elog
72 elog "dhcpcd has zeroconf support active by default."
73 elog "This means 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 noipv4ll configuration"
77 elog "file option or the -L command line switch."
78 elog "See the dhcpcd and dhcpcd.conf man pages for more details."
79
80 elog
81 elog "Dhcpcd has duid enabled by default, and this may cause issues"
82 elog "with some dhcp servers. For more information, see"
83 elog "https://bugs.gentoo.org/show_bug.cgi?id=477356"
84
85 if ! has_version net-dns/bind-tools; then
86 elog
87 elog "If you activate the lookup-hostname hook to look up your hostname"
88 elog "using the dns, you need to install net-dns/bind-tools."
89 fi
90 }

  ViewVC Help
Powered by ViewVC 1.1.20