2009-07-07 22:17:02 +02:00
|
|
|
--- /usr/portage/net-misc/dhcp/dhcp-3.1.1.ebuild 2009-04-05 12:37:41.000000000 +0200
|
2010-02-14 07:43:52 +01:00
|
|
|
+++ dhcp-3.1.3.ebuild 2009-07-08 19:11:03.383208313 +0200
|
2009-07-07 22:17:02 +02:00
|
|
|
@@ -1,24 +1,31 @@
|
2010-02-14 07:43:52 +01:00
|
|
|
-# Copyright 1999-2010 Gentoo Foundation
|
|
|
|
+# Copyright 1999-2010 Gentoo Foundation
|
2009-07-07 22:17:02 +02:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.1.1.ebuild,v 1.9 2008/11/05 00:41:46 vapier Exp $
|
|
|
|
|
|
|
|
inherit eutils flag-o-matic multilib toolchain-funcs
|
|
|
|
|
2010-02-14 07:43:52 +01:00
|
|
|
+LDAP_PV="3.1.3-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 minimal static selinux kernel_linux"
|
|
|
|
+IUSE="doc minimal static selinux kernel_linux ldap ssl"
|
|
|
|
|
|
|
|
DEPEND="selinux? ( sec-policy/selinux-dhcp )
|
|
|
|
- kernel_linux? ( sys-apps/net-tools )"
|
|
|
|
+ kernel_linux? ( sys-apps/net-tools )
|
|
|
|
+ ldap? ( net-nds/openldap
|
|
|
|
+ ssl? ( dev-libs/openssl ) )"
|
|
|
|
|
|
|
|
PROVIDE="virtual/dhcpc"
|
|
|
|
|
|
|
|
@@ -65,6 +72,9 @@
|
|
|
|
# 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="${MY_PV}-Gentoo"
|
2009-07-08 19:32:17 +02:00
|
|
|
@@ -119,6 +129,10 @@
|
2009-07-07 22:17:02 +02:00
|
|
|
#define _PATH_DHCLIENT_PID "/var/run/dhcp/dhclient.pid"
|
|
|
|
#define DHCPD_LOG_FACILITY LOG_LOCAL1
|
|
|
|
END
|
2009-07-08 19:32:17 +02:00
|
|
|
+ if use ldap ; then
|
|
|
|
+ echo "#define LDAP_CONFIGURATION" >> includes/site.h
|
|
|
|
+ use ssl && echo "#define USE_SSL" >> includes/site.h
|
|
|
|
+ fi
|
2009-07-07 22:17:02 +02:00
|
|
|
|
|
|
|
cat <<-END > site.conf
|
|
|
|
CC = $(tc-getCC)
|
2009-07-08 19:32:17 +02:00
|
|
|
@@ -138,6 +152,10 @@
|
2009-07-07 22:17:02 +02:00
|
|
|
USRMANEXT = .1
|
|
|
|
MANCAT = man
|
|
|
|
END
|
2009-07-08 19:32:17 +02:00
|
|
|
+ if use ldap ; then
|
|
|
|
+ echo "LDAPLIB = -lldap" >> site.conf
|
|
|
|
+ use ssl && echo "SSLLIB = -lcrypto -lssl" >> site.conf
|
|
|
|
+ fi
|
2009-07-07 22:17:02 +02:00
|
|
|
|
|
|
|
./configure --copts "-DPARANOIA -DEARLY_CHROOT ${CFLAGS}" \
|
|
|
|
|| die "configure failed"
|
2009-07-08 19:32:17 +02:00
|
|
|
@@ -152,7 +170,10 @@
|
2009-07-07 22:17:02 +02:00
|
|
|
|
|
|
|
src_install() {
|
|
|
|
make install DESTDIR="${D}" || die
|
|
|
|
- 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
|
2009-07-08 19:32:17 +02:00
|
|
|
@@ -167,6 +188,13 @@
|
2009-07-07 22:17:02 +02:00
|
|
|
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
|
|
|
|
fi
|