| 1 |
# Copyright 1999-2005 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipsec-tools/ipsec-tools-0.4-r1.ebuild,v 1.4 2005/03/23 15:01:43 latexer Exp $ |
| 4 |
|
| 5 |
inherit eutils |
| 6 |
|
| 7 |
DESCRIPTION="IPsec-Tools is a port of KAME's IPsec utilities to the Linux-2.6 IPsec implementation." |
| 8 |
HOMEPAGE="http://ipsec-tools.sourceforge.net/" |
| 9 |
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" |
| 10 |
LICENSE="BSD" |
| 11 |
KEYWORDS="x86 amd64 sparc" |
| 12 |
SLOT="0" |
| 13 |
IUSE="selinux" |
| 14 |
DEPEND="virtual/libc |
| 15 |
>=dev-libs/openssl-0.9.6" |
| 16 |
RDEPEND="${DEPEND} |
| 17 |
selinux? ( sec-policy/selinux-ipsec-tools )" |
| 18 |
|
| 19 |
pkg_setup() { |
| 20 |
my_KV=`echo ${KV} | cut -f-2 -d "."` |
| 21 |
if [ ${my_KV} != "2.6" ] ; then |
| 22 |
echo; eerror "You need a 2.6.x kernel to use the ipsec tools!"; die "You need a 2.6 kernel to use ipsec-tools!" |
| 23 |
fi |
| 24 |
} |
| 25 |
|
| 26 |
src_unpack() { |
| 27 |
unpack ${A} |
| 28 |
cd ${S} |
| 29 |
epatch ${FILESDIR}/${P}-gcc34.diff |
| 30 |
epatch ${FILESDIR}/${PN}-0.5-isakmp-underrun.diff |
| 31 |
} |
| 32 |
|
| 33 |
src_compile() { |
| 34 |
unset CC |
| 35 |
./configure --prefix=/usr --sysconfdir=/etc --with-kernel-headers=/usr/src/linux/include || die |
| 36 |
sed -e 's:AM_CFLAGS = :AM_CFLAGS = -include /usr/src/linux/include/linux/compiler.h :' -i src/setkey/Makefile || die |
| 37 |
sed -e 's:CPPFLAGS=:CPPFLAGS = -include /usr/src/linux/include/linux/compiler.h :' -i src/racoon/Makefile || die |
| 38 |
sed -e 's:va_copy:__va_copy:g' -i src/racoon/plog.c || die # GCC 2 Fix |
| 39 |
emake || die |
| 40 |
} |
| 41 |
|
| 42 |
src_install() { |
| 43 |
einstall || die |
| 44 |
rm ${D}/usr/bin |
| 45 |
dosbin src/racoon/racoon |
| 46 |
insinto /etc && doins ${FILESDIR}/ipsec.conf.sample |
| 47 |
insinto /etc/conf.d && newins ${FILESDIR}/racoon.conf.d racoon |
| 48 |
exeinto /etc/init.d && newexe ${FILESDIR}/racoon.init.d racoon |
| 49 |
|
| 50 |
dodoc ChangeLog README NEWS |
| 51 |
dodoc ${S}/src/racoon/samples/racoon.conf.sample* |
| 52 |
} |