# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header$ inherit eutils DESCRIPTION="GNU Virtual Private Ethernet" HOMEPAGE="http://savannah.gnu.org/projects/gvpe" SRC_URI="http://ftp.gnu.org/gnu/gvpe/${P}.tar.gz" EAPI="1" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="nls -dns -icmp -rohc +tcp +compression" DEPEND=">=dev-libs/openssl-0.9.7c virtual/linux-sources >=dev-libs/lzo-2 >=sys-libs/zlib-1.1.4-r2 nls? ( sys-devel/gettext )" src_compile() { #These are because the configure script does not make deference between #--disable-feature and --enable-feature and will generally enable things #if --disable is passed. local CONF_PARAM="$(use_enable nls) " use dns && CONF_PARAM="$CONF_PARAM $(use_enable dns) " use icmp && CONF_PARAM="$CONF_PARAM $(use_enable icmp) " use rohc && CONF_PARAM="$CONF_PARAM $(use_enable rohc) " econf $CONF_PARAM $(use_enable tcp) $(use_enable compression) \ --enable-hmac-length=16 --enable-rand-length=8 --enable-cipher=aes-256 \ --enable-digest=sha512 || die emake || die } src_install() { emake DESTDIR="${D}" install || die dodir /etc/gvpe || die dodoc AUTHORS NEWS README || die newinitd "${FILESDIR}"/gvpe.rc gvpe || die newconfd "${FILESDIR}"/gvpe.confd gvpe || die insinto /etc/gvpe doins "${FILESDIR}"/gvpe.conf.example || die exeinto /etc/gvpe doexe "${FILESDIR}"/if-up || die } pkg_postinst() { einfo "This package requires the tun/tap kernel device." einfo "Edit /etc/conf.d/gvpe and /etc/gvpe/gvpe.conf" }