# $Header: /magellan-cvs/smage/openswan/openswan-2.6.14-r1.smage2,v 1.2 2008/08/17 17:07:10 niro Exp $ PNAME="openswan" PVER="2.6.14" PBUILD="r1" PCATEGORIE="net-vpn" STATE="unstable" DESCRIPTION="Openswan is an implementation of IPsec for Linux." HOMEPAGE="http://www.openswan.org/" DEPEND=">= dev-libs/gmp-4" SDEPEND=">= sys-apps/gawk-3 >= sys-dev/flex-2 >= sys-apps/bison-2" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mbuild SRC_URI=( http://www.openswan.org/download/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # fix some pathes local d=${SRCDIR}/Makefile.inc # multilib awareness sed -i "s:^FINALLIBEXECDIR=.*:FINALLIBEXECDIR=/usr/$(mlibdir):g" ${d} || die # fix usr location sed -i "s:^INC_USRLOCAL=.*:INC_USRLOCAL=/usr:g" ${d} || die # fix wrong man dir sed -i "s:^INC_MANDIR=.*:INC_MANDIR=share/man:g" ${d} || die # fix wrong doc dir sed -i "s:^FINALEXAMPLECONFDIR=.*:FINALEXAMPLECONFDIR=/usr/share/doc/${PNAME}-${PVER}:g" ${d} || die sed -i "s:^FINALDOCDIR?=.*:FINALDOCDIR?=/usr/share/doc/${PNAME}-${PVER}:g" ${d} || die # fix wrong libexec dir sed -i "s:^FINALLIBEXECDIR=.*:FINALLIBEXECDIR=/usr/$(mlibdir)/ipsec:g" ${d} || die } src_compile() { cd ${SRCDIR} mmake -j1 programs || die }