# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-firewall/ipsec-tools/ipsec-tools-0.5-r1.ebuild,v 1.2 2005/04/15 13:52:42 josejx Exp $ inherit eutils flag-o-matic MY_P=${P/_/-} DESCRIPTION="IPsec-Tools is a port of KAME's IPsec utilities to the Linux-2.6 IPsec implementation." HOMEPAGE="http://ipsec-tools.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2" LICENSE="BSD" KEYWORDS="~x86 ~amd64 ~ppc" SLOT="0" IUSE="doc ipv6 kerberos selinux" S=${WORKDIR}/${MY_P} DEPEND="virtual/libc || ( >=sys-kernel/linux-headers-2.6 sys-kernel/linux26-headers ) >=dev-libs/openssl-0.9.6" RDEPEND="${DEPEND} selinux? ( sec-policy/selinux-ipsec-tools )" src_unpack() { unpack ${A} cd ${S} epunt_cxx } src_compile() { # Filter the c3 flag for now. Probably a GCC problem, but we'll # avoid it here for now. See bug #61025 filter-flags -march=c3 econf \ --enable-adminport \ $(use_enable kerberos gssapi) \ --enable-hybrid \ --enable-frag \ --enable-stats \ --enable-dpd \ --enable-samode-unspec \ $(use_enable ipv6) \ --enable-natt \ || die emake -j1 || die } src_install() { einstall || die keepdir /var/lib/racoon insinto /etc/conf.d && newins ${FILESDIR}/racoon.conf.d racoon exeinto /etc/init.d && newexe ${FILESDIR}/racoon.init.d racoon insinto /etc && newins ${FILESDIR}/setkey.conf.sample setkey.conf.sample dodoc ChangeLog README NEWS dodoc ${S}/src/racoon/doc/* if use doc; then mkdir -m 0755 ${D}/usr/share/doc/${PF}/samples mv ${S}/src/racoon/samples/roadwarrior ${D}/usr/share/doc/${PF}/samples/ mv ${S}/src/racoon/samples/psk.txt* ${D}/usr/share/doc/${PF}/samples/ mv ${S}/src/racoon/samples/racoon.conf* ${D}/usr/share/doc/${PF}/samples/ mkdir -m 0755 ${D}/usr/share/doc/${PF}/samples/setkey mv ${S}/src/setkey/sample*cf ${D}/usr/share/doc/${PF}/samples/setkey/ fi } pkg_postinst() { if [ -f "/etc/ipsec.conf" ]; then einfo einfo "The new ipsec-tools uses /etc/setkey.conf instead of /etc/ipsec.conf." einfo "You should merge the information in ipsec.conf into setkey.conf." einfo fi }