Lines 1-24
Link Here
|
1 |
# Copyright 1999-2008 Gentoo Foundation |
1 |
# Copyright 1999-2009 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.1.1.ebuild,v 1.9 2008/11/05 00:41:46 vapier Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.1.1.ebuild,v 1.9 2008/11/05 00:41:46 vapier Exp $ |
4 |
|
4 |
|
5 |
inherit eutils flag-o-matic multilib toolchain-funcs |
5 |
inherit eutils flag-o-matic multilib toolchain-funcs |
6 |
|
6 |
|
|
|
7 |
LDAP_PV="3.1.2-1.1" |
8 |
|
7 |
MY_PV="${PV//_alpha/a}" |
9 |
MY_PV="${PV//_alpha/a}" |
8 |
MY_PV="${MY_PV//_beta/b}" |
10 |
MY_PV="${MY_PV//_beta/b}" |
9 |
MY_PV="${MY_PV//_rc/rc}" |
11 |
MY_PV="${MY_PV//_rc/rc}" |
10 |
MY_P="${PN}-${MY_PV}" |
12 |
MY_P="${PN}-${MY_PV}" |
|
|
13 |
MY_LDAP_PV="${LDAP_PV//-*/}" |
11 |
DESCRIPTION="ISC Dynamic Host Configuration Protocol" |
14 |
DESCRIPTION="ISC Dynamic Host Configuration Protocol" |
12 |
HOMEPAGE="http://www.isc.org/products/DHCP" |
15 |
HOMEPAGE="http://www.isc.org/products/DHCP" |
13 |
SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz" |
16 |
SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz |
|
|
17 |
ldap? ( http://dcantrel.fedorapeople.org/dhcp/ldap-patch/ldap-for-dhcp-${LDAP_PV}.tar.gz |
18 |
http://ftp.mars.arge.at/pub/ldap-for-dhcp-${LDAP_PV}.tar.gz )" |
14 |
|
19 |
|
15 |
LICENSE="isc-dhcp" |
20 |
LICENSE="isc-dhcp" |
16 |
SLOT="0" |
21 |
SLOT="0" |
17 |
KEYWORDS="alpha amd64 arm hppa ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd" |
22 |
KEYWORDS="alpha amd64 arm hppa ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd" |
18 |
IUSE="doc minimal static selinux kernel_linux" |
23 |
IUSE="doc minimal static selinux kernel_linux ldap ssl" |
19 |
|
24 |
|
20 |
DEPEND="selinux? ( sec-policy/selinux-dhcp ) |
25 |
DEPEND="selinux? ( sec-policy/selinux-dhcp ) |
21 |
kernel_linux? ( sys-apps/net-tools )" |
26 |
kernel_linux? ( sys-apps/net-tools ) |
|
|
27 |
ldap? ( net-nds/openldap |
28 |
ssl? ( dev-libs/openssl ) )" |
22 |
|
29 |
|
23 |
PROVIDE="virtual/dhcpc" |
30 |
PROVIDE="virtual/dhcpc" |
24 |
|
31 |
|
Lines 65-70
Link Here
|
65 |
# Add dbus support to dhclient |
72 |
# Add dbus support to dhclient |
66 |
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch |
73 |
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch |
67 |
|
74 |
|
|
|
75 |
# Ldap patch for dhcp |
76 |
epatch "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}/dhcp-${MY_LDAP_PV}"-ldap.patch |
77 |
|
68 |
# Brand the version with Gentoo |
78 |
# Brand the version with Gentoo |
69 |
# include revision if >0 |
79 |
# include revision if >0 |
70 |
local newver="${MY_PV}-Gentoo" |
80 |
local newver="${MY_PV}-Gentoo" |
Lines 119-124
Link Here
|
119 |
#define _PATH_DHCLIENT_PID "/var/run/dhcp/dhclient.pid" |
129 |
#define _PATH_DHCLIENT_PID "/var/run/dhcp/dhclient.pid" |
120 |
#define DHCPD_LOG_FACILITY LOG_LOCAL1 |
130 |
#define DHCPD_LOG_FACILITY LOG_LOCAL1 |
121 |
END |
131 |
END |
|
|
132 |
if use ldap ; then |
133 |
echo "#define LDAP_CONFIGURATION" >> includes/site.h |
134 |
use ssl && echo "#define USE_SSL" >> includes/site.h |
135 |
fi |
122 |
|
136 |
|
123 |
cat <<-END > site.conf |
137 |
cat <<-END > site.conf |
124 |
CC = $(tc-getCC) |
138 |
CC = $(tc-getCC) |
Lines 138-143
Link Here
|
138 |
USRMANEXT = .1 |
152 |
USRMANEXT = .1 |
139 |
MANCAT = man |
153 |
MANCAT = man |
140 |
END |
154 |
END |
|
|
155 |
if use ldap ; then |
156 |
echo "LDAPLIB = -lldap" >> site.conf |
157 |
use ssl && echo "SSLLIB = -lcrypto -lssl" >> site.conf |
158 |
fi |
141 |
|
159 |
|
142 |
./configure --copts "-DPARANOIA -DEARLY_CHROOT ${CFLAGS}" \ |
160 |
./configure --copts "-DPARANOIA -DEARLY_CHROOT ${CFLAGS}" \ |
143 |
|| die "configure failed" |
161 |
|| die "configure failed" |
Lines 152-158
Link Here
|
152 |
|
170 |
|
153 |
src_install() { |
171 |
src_install() { |
154 |
make install DESTDIR="${D}" || die |
172 |
make install DESTDIR="${D}" || die |
155 |
use doc && dodoc README RELNOTES doc/* |
173 |
if use doc; then |
|
|
174 |
dodoc README RELNOTES doc/* |
175 |
use ldap && dodoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/*.ldap "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/draft-ietf-dhc-ldap-schema-01.txt |
176 |
fi |
156 |
|
177 |
|
157 |
insinto /etc/dhcp |
178 |
insinto /etc/dhcp |
158 |
newins client/dhclient.conf dhclient.conf.sample |
179 |
newins client/dhclient.conf dhclient.conf.sample |
Lines 167-172
Link Here
|
167 |
newconfd "${FILESDIR}"/dhcpd.conf dhcpd |
188 |
newconfd "${FILESDIR}"/dhcpd.conf dhcpd |
168 |
newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay |
189 |
newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay |
169 |
|
190 |
|
|
|
191 |
# install ldap files |
192 |
if use ldap; then |
193 |
insinto /etc/openldap/schema |
194 |
doins "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcp.* |
195 |
dosbin "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcpd-conf-to-ldap |
196 |
fi |
197 |
|
170 |
# We never want portage to own this file |
198 |
# We never want portage to own this file |
171 |
rm -f "${D}"/var/lib/dhcp/dhcpd.leases |
199 |
rm -f "${D}"/var/lib/dhcp/dhcpd.leases |
172 |
fi |
200 |
fi |