Lines 4-25
Link Here
|
4 |
|
4 |
|
5 |
inherit eutils flag-o-matic autotools |
5 |
inherit eutils flag-o-matic autotools |
6 |
|
6 |
|
|
|
7 |
LDAP_PV="4.0.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//-*/}" |
14 |
|
11 |
DESCRIPTION="ISC Dynamic Host Configuration Protocol" |
15 |
DESCRIPTION="ISC Dynamic Host Configuration Protocol" |
12 |
HOMEPAGE="http://www.isc.org/products/DHCP" |
16 |
HOMEPAGE="http://www.isc.org/products/DHCP" |
13 |
SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz" |
17 |
SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz |
|
|
18 |
http://dcantrel.fedorapeople.org/dhcp/ldap-patch/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 ipv6 selinux kernel_linux vim-syntax" |
23 |
IUSE="doc ipv6 selinux kernel_linux vim-syntax 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 ) |
22 |
vim-syntax? ( app-vim/dhcpd-syntax )" |
27 |
vim-syntax? ( app-vim/dhcpd-syntax ) |
|
|
28 |
ldap? ( net-nds/openldap ) |
29 |
ssl? ( dev-libs/openssl )" |
23 |
|
30 |
|
24 |
PROVIDE="virtual/dhcpc" |
31 |
PROVIDE="virtual/dhcpc" |
25 |
|
32 |
|
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="Gentoo" |
80 |
local newver="Gentoo" |
Lines 114-119
Link Here
|
114 |
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \ |
124 |
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \ |
115 |
--with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \ |
125 |
--with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \ |
116 |
$(use_enable ipv6 dhcpv6) \ |
126 |
$(use_enable ipv6 dhcpv6) \ |
|
|
127 |
$(use_with ldap) \ |
128 |
$(use_with ssl ldapcrypto) \ |
117 |
|| die |
129 |
|| die |
118 |
|
130 |
|
119 |
emake || die "compile problem" |
131 |
emake || die "compile problem" |
Lines 138-145
Link Here
|
138 |
newexe "${S}"/client/scripts/freebsd dhclient-script |
150 |
newexe "${S}"/client/scripts/freebsd dhclient-script |
139 |
fi |
151 |
fi |
140 |
|
152 |
|
141 |
use doc && dodoc README RELNOTES doc/* |
153 |
if use doc; then |
142 |
|
154 |
dodoc README RELNOTES doc/* |
|
|
155 |
use ldap && dodoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/README.ldap "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/draft-ietf-dhc-ldap-schema-01.txt |
156 |
use ldap && newdoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/LICENSE LICENSE.ldap |
157 |
fi |
143 |
insinto /etc/dhcp |
158 |
insinto /etc/dhcp |
144 |
newins client/dhclient.conf dhclient.conf.sample |
159 |
newins client/dhclient.conf dhclient.conf.sample |
145 |
keepdir /var/{lib,run}/dhcp |
160 |
keepdir /var/{lib,run}/dhcp |
Lines 152-157
Link Here
|
152 |
newconfd "${FILESDIR}"/dhcpd.conf dhcpd |
167 |
newconfd "${FILESDIR}"/dhcpd.conf dhcpd |
153 |
newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay |
168 |
newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay |
154 |
|
169 |
|
|
|
170 |
# install ldap files |
171 |
if use ldap; then |
172 |
insinto /etc/openldap/schema |
173 |
doins "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcp.schema |
174 |
dosbin "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcpd-conf-to-ldap |
175 |
fi |
176 |
|
177 |
|
155 |
# We never want portage to own this file |
178 |
# We never want portage to own this file |
156 |
rm -f "${D}"/var/lib/dhcp/dhcpd.leases |
179 |
rm -f "${D}"/var/lib/dhcp/dhcpd.leases |
157 |
} |
180 |
} |