# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ CIPE_TEXINFO="${PN}-1.5.1.texinfo" DESCRIPTION="Cryptographic IP tunneling daemon/module" HOMEPAGE="http://sites.inka.de/bigred/devel/cipe.html" SRC_URI="http://sites.inka.de/bigred/sw/${P}.tar.gz http://sites.inka.de/bigred/sw/${CIPE_TEXINFO}" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="ssl" RDEPEND="virtual/glibc ssl? ( >=dev-libs/openssl-0.9.6 )" DEPEND="${RDEPEND} virtual/linux-sources" S=${WORKDIR}/${P} src_unpack() { unpack ${A} cp ${DISTDIR}/${CIPE_TEXINFO} ${S}/${PN}.texinfo epatch ${FILESDIR}/${P}-gentoo.patch } src_compile() { local myconf="" use ssl \ && myconf="${myconf} --enable-pkcipe" \ || myconf="${myconf} --disable-pkcipe" # A custom use flag for bug compatability mode # Do we need this? #use cipebc && myconf="${myconf} --enable-bug-compatible" econf ${myconf} || die emake || die } src_install() { make DESTDIR=${D} install || die insinto /etc/cipe insopts -m755 doins samples/ip-{up,down} insopts -m600 doins samples/options # no need #insinto /etc/modules.d #newins ${FILESDIR}/${PV}/modules.d-cipe cipe exeinto /etc/init.d newexe ${FILESDIR}/${PV}/init.d-ciped ciped dodoc README* CHANGES COPYING tcpdump.patch dodoc samples/{ip-{up,down},options} } pkg_postinst() { if [ -f /usr/bin/rsa-keygen ] && [ ! -f /etc/cipe/identity.priv ] then ebegin "Generating new identity (host) key" emsg="`rsa-keygen /etc/cipe/identity 2>&1`" eend $? $emsg fi update-modules depmod -a echo " " einfo "For info on configuring cipe, do 'info cipe'" }