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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Sep 18 19:04:41 2014 UTC (5 years, 2 months ago) by williamh
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
remove old

(Portage version: 2.2.13/cvs/Linux x86_64, signed Manifest commit with key 0x30C46538)

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.4.4.ebuild,v 1.1 2014/09/16 22:25:35 williamh Exp $
4
5 EAPI=5
6
7 if [[ ${PV} == "9999" ]]; then
8 FOSSIL_URI="http://roy.marples.name/projects/dhcpcd"
9 else
10 MY_P="${P/_alpha/-alpha}"
11 MY_P="${MY_P/_beta/-beta}"
12 MY_P="${MY_P/_rc/-rc}"
13 SRC_URI="http://roy.marples.name/downloads/${PN}/${MY_P}.tar.bz2"
14 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"
15 S="${WORKDIR}/${MY_P}"
16 fi
17
18 inherit eutils systemd toolchain-funcs
19
20 DESCRIPTION="A fully featured, yet light weight RFC2131 compliant DHCP client"
21 HOMEPAGE="http://roy.marples.name/projects/dhcpcd/"
22 LICENSE="BSD-2"
23 SLOT="0"
24 IUSE="elibc_glibc ipv6 kernel_linux +udev"
25
26 COMMON_DEPEND="udev? ( virtual/udev )"
27 DEPEND="${COMMON_DEPEND}"
28 RDEPEND="${COMMON_DEPEND}"
29
30 if [[ ${PV} == "9999" ]]; then
31 DEPEND+=" dev-vcs/fossil"
32
33 src_unpack()
34 {
35 local distdir=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}
36 local repo=${distdir}/fossil/${PN}.fossil
37
38 addwrite "${distdir}"
39
40 if [[ -e "${repo}" ]]; then
41 fossil pull "${FOSSIL_URI}" -R "${repo}" || die
42 else
43 mkdir -p "${distdir}/fossil" || die
44 fossil clone "${FOSSIL_URI}" "${repo}" || die
45 fi
46
47 mkdir -p "${S}" || die
48 cd "${S}" || die
49 fossil open "${repo}" || die
50 }
51 fi
52
53 src_prepare()
54 {
55 epatch_user
56 }
57
58 src_configure()
59 {
60 local dev hooks rundir
61 use udev || dev="--without-dev --without-udev"
62 hooks="--with-hook=ntp.conf"
63 use elibc_glibc && hooks="${hooks} --with-hook=yp.conf"
64 use kernel_linux && rundir="--rundir=${EPREFIX}/run"
65 econf \
66 --prefix="${EPREFIX}" \
67 --libexecdir="${EPREFIX}/lib/dhcpcd" \
68 --dbdir="${EPREFIX}/var/lib/dhcpcd" \
69 --localstatedir="${EPREFIX}/var" \
70 ${rundir} \
71 $(use_enable ipv6) \
72 ${dev} \
73 ${hooks}
74 }
75
76 src_install()
77 {
78 default
79 newinitd "${FILESDIR}"/${PN}.initd ${PN}
80 systemd_dounit "${FILESDIR}"/${PN}.service
81 }
82
83 pkg_postinst()
84 {
85 # Upgrade the duid file to the new format if needed
86 local old_duid="${ROOT}"/var/lib/dhcpcd/dhcpcd.duid
87 local new_duid="${ROOT}"/etc/dhcpcd.duid
88 if [ -e "${old_duid}" ] && ! grep -q '..:..:..:..:..:..' "${old_duid}"; then
89 sed -i -e 's/\(..\)/\1:/g; s/:$//g' "${old_duid}"
90 fi
91
92 # Move the duid to /etc, a more sensible location
93 if [ -e "${old_duid}" -a ! -e "${new_duid}" ]; then
94 cp -p "${old_duid}" "${new_duid}"
95 fi
96
97 if [ -z "$REPLACING_VERSIONS" ]; then
98 elog
99 elog "dhcpcd has zeroconf support active by default."
100 elog "This means it will always obtain an IP address even if no"
101 elog "DHCP server can be contacted, which will break any existing"
102 elog "failover support you may have configured in your net configuration."
103 elog "This behaviour can be controlled with the noipv4ll configuration"
104 elog "file option or the -L command line switch."
105 elog "See the dhcpcd and dhcpcd.conf man pages for more details."
106
107 elog
108 elog "Dhcpcd has duid enabled by default, and this may cause issues"
109 elog "with some dhcp servers. For more information, see"
110 elog "https://bugs.gentoo.org/show_bug.cgi?id=477356"
111 fi
112
113 if ! has_version net-dns/bind-tools; then
114 elog
115 elog "If you activate the lookup-hostname hook to look up your hostname"
116 elog "using the dns, you need to install net-dns/bind-tools."
117 fi
118 }

  ViewVC Help
Powered by ViewVC 1.1.20