2009-07-07 22:17:02 +02:00
|
|
|
--- /usr/portage/net-misc/dhcp/dhcp-4.0.1.ebuild 2009-03-30 15:13:28.000000000 +0200
|
2009-07-08 19:32:17 +02:00
|
|
|
+++ dhcp-4.0.1.ebuild 2009-07-08 19:11:15.121631116 +0200
|
|
|
|
@@ -4,22 +4,30 @@
|
2009-07-07 22:17:02 +02:00
|
|
|
|
|
|
|
inherit eutils flag-o-matic autotools
|
|
|
|
|
2009-07-08 19:32:17 +02:00
|
|
|
+LDAP_PV="4.0.1-2.1"
|
2009-07-07 22:17:02 +02:00
|
|
|
+
|
|
|
|
MY_PV="${PV//_alpha/a}"
|
|
|
|
MY_PV="${MY_PV//_beta/b}"
|
|
|
|
MY_PV="${MY_PV//_rc/rc}"
|
|
|
|
MY_P="${PN}-${MY_PV}"
|
|
|
|
+MY_LDAP_PV="${LDAP_PV//-*/}"
|
|
|
|
+
|
|
|
|
DESCRIPTION="ISC Dynamic Host Configuration Protocol"
|
|
|
|
HOMEPAGE="http://www.isc.org/products/DHCP"
|
|
|
|
-SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz"
|
|
|
|
+SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz
|
2009-07-08 19:32:17 +02:00
|
|
|
+ ldap? ( http://dcantrel.fedorapeople.org/dhcp/ldap-patch/ldap-for-dhcp-${LDAP_PV}.tar.gz
|
2010-05-10 20:43:24 +02:00
|
|
|
+ http://ftp.disconnected-by-peer.at/pub/ldap-for-dhcp-${LDAP_PV}.tar.gz )"
|
2009-07-07 22:17:02 +02:00
|
|
|
|
|
|
|
LICENSE="isc-dhcp"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
|
|
|
|
-IUSE="doc ipv6 selinux kernel_linux vim-syntax"
|
|
|
|
+IUSE="doc ipv6 selinux kernel_linux vim-syntax ldap ssl"
|
|
|
|
|
|
|
|
DEPEND="selinux? ( sec-policy/selinux-dhcp )
|
|
|
|
kernel_linux? ( sys-apps/net-tools )
|
|
|
|
- vim-syntax? ( app-vim/dhcpd-syntax )"
|
|
|
|
+ vim-syntax? ( app-vim/dhcpd-syntax )
|
|
|
|
+ ldap? ( net-nds/openldap
|
|
|
|
+ ssl? ( dev-libs/openssl ) )"
|
|
|
|
|
|
|
|
PROVIDE="virtual/dhcpc"
|
|
|
|
|
2009-07-08 19:32:17 +02:00
|
|
|
@@ -65,6 +73,9 @@
|
2009-07-07 22:17:02 +02:00
|
|
|
# Add dbus support to dhclient
|
|
|
|
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch
|
|
|
|
|
|
|
|
+ # Ldap patch for dhcp
|
|
|
|
+ epatch "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}/dhcp-${MY_LDAP_PV}"-ldap.patch
|
|
|
|
+
|
|
|
|
# Brand the version with Gentoo
|
|
|
|
# include revision if >0
|
|
|
|
local newver="Gentoo"
|
2009-07-08 19:32:17 +02:00
|
|
|
@@ -114,6 +125,8 @@
|
2009-07-07 22:17:02 +02:00
|
|
|
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
|
|
|
|
--with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \
|
|
|
|
$(use_enable ipv6 dhcpv6) \
|
|
|
|
+ $(use_with ldap) \
|
|
|
|
+ $(use_with ssl ldapcrypto) \
|
|
|
|
|| die
|
|
|
|
|
|
|
|
emake || die "compile problem"
|
2009-07-08 19:32:17 +02:00
|
|
|
@@ -138,8 +151,10 @@
|
2009-07-07 22:17:02 +02:00
|
|
|
newexe "${S}"/client/scripts/freebsd dhclient-script
|
|
|
|
fi
|
|
|
|
|
|
|
|
- use doc && dodoc README RELNOTES doc/*
|
|
|
|
-
|
|
|
|
+ if use doc; then
|
|
|
|
+ dodoc README RELNOTES doc/*
|
2009-07-08 19:32:17 +02:00
|
|
|
+ use ldap && dodoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/*.ldap "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/draft-ietf-dhc-ldap-schema-01.txt
|
2009-07-07 22:17:02 +02:00
|
|
|
+ fi
|
|
|
|
insinto /etc/dhcp
|
|
|
|
newins client/dhclient.conf dhclient.conf.sample
|
|
|
|
keepdir /var/{lib,run}/dhcp
|
|
|
|
@@ -152,6 +167,14 @@
|
|
|
|
newconfd "${FILESDIR}"/dhcpd.conf dhcpd
|
|
|
|
newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay
|
|
|
|
|
|
|
|
+ # install ldap files
|
|
|
|
+ if use ldap; then
|
|
|
|
+ insinto /etc/openldap/schema
|
2009-07-08 19:32:17 +02:00
|
|
|
+ doins "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcp.*
|
2009-07-07 22:17:02 +02:00
|
|
|
+ dosbin "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcpd-conf-to-ldap
|
|
|
|
+ fi
|
|
|
|
+
|
|
|
|
+
|
|
|
|
# We never want portage to own this file
|
|
|
|
rm -f "${D}"/var/lib/dhcp/dhcpd.leases
|
|
|
|
}
|