--- dhcp-3.0.5.ebuild 2009-05-21 10:13:06.119803604 +0300 +++ dhcp-3.0.7.ebuild 2009-05-21 09:25:51.219800531 +0300 @@ -1,6 +1,6 @@ -# Copyright 1999-2006 Gentoo Foundation +# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0.5.ebuild,v 1.2 2006/12/20 12:35:53 uberlord Exp $ +# $Header$ inherit eutils flag-o-matic multilib toolchain-funcs @@ -13,11 +13,12 @@ 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" +KEYWORDS="~x86 ~x86-fbsd" +IUSE="doc minimal static selinux kernel_linux ldap" DEPEND="selinux? ( sec-policy/selinux-dhcp ) - kernel_linux? ( sys-apps/net-tools )" + kernel_linux? ( sys-apps/net-tools ) + ldap? ( net-nds/openldap dev-libs/openssl )" PROVIDE="virtual/dhcpc" @@ -28,8 +29,10 @@ cd "${S}" #Enable LDAP-Support - epatch "${FILESDIR}/${PN}"-3.0.5-ldap.patch - + if use ldap; then + epatch "${FILESDIR}/${PN}"-3.0.5-ldap.patch + fi + # Gentoo patches - these will probably never be accepted upstream # Enable chroot support epatch "${FILESDIR}/${PN}"-3.0-paranoia.patch @@ -61,6 +64,8 @@ epatch "${FILESDIR}/${PN}"-3.0.3-libdst.patch # Fix building on Gentoo/FreeBSD epatch "${FILESDIR}/${PN}"-3.0.2-gmake.patch + # Set ddns-update-style none in the example config, #170311 + #epatch "${FILESDIR}/${PN}"-3.0-ddns-example.patch # NetworkManager support patches # If they fail to apply to future versions they will be dropped @@ -164,15 +169,25 @@ newins client/dhclient.conf dhclient.conf.sample keepdir /var/{lib,run}/dhcp + cp "${FILESDIR}"/dhcpd.init dhcpd + if use ldap ; then + dodoc README.ldap + dodir /etc/openldap/schema + cp -f dhcp.schema "${D}/etc/openldap/schema/" + sed -e "s|\(need .*$\)|\1 slapd|g" "${FILESDIR}"/dhcpd.init > dhcpd + fi + # Install our server files if ! use minimal ; then insinto /etc/dhcp newins server/dhcpd.conf dhcpd.conf.sample - newinitd "${FILESDIR}"/dhcpd.init dhcpd + newinitd dhcpd newinitd "${FILESDIR}"/dhcrelay.init dhcrelay - insinto /etc/conf.d - newins "${FILESDIR}"/dhcpd.conf dhcpd - newins "${FILESDIR}"/dhcrelay.conf dhcrelay + newconfd "${FILESDIR}"/dhcpd.conf dhcpd + newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay + + # We never want portage to own this file + rm -f "${D}"/var/lib/dhcp/dhcpd.leases fi }