| 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.3.3.ebuild,v 1.9 2005/01/11 03:11:01 latexer Exp $
|
| 4 |
|
| 5 |
DESCRIPTION="IPsec-Tools is a port of KAME's IPsec utilities to the Linux-2.6 IPsec implementation."
|
| 6 |
HOMEPAGE="http://ipsec-tools.sourceforge.net/"
|
| 7 |
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
|
| 8 |
LICENSE="BSD"
|
| 9 |
KEYWORDS="x86 amd64 sparc"
|
| 10 |
SLOT="0"
|
| 11 |
IUSE="selinux"
|
| 12 |
DEPEND="virtual/libc
|
| 13 |
>=dev-libs/openssl-0.9.6"
|
| 14 |
RDEPEND="${DEPEND}
|
| 15 |
selinux? ( sec-policy/selinux-ipsec-tools )"
|
| 16 |
|
| 17 |
pkg_setup() {
|
| 18 |
my_KV=`echo ${KV} | cut -f-2 -d "."`
|
| 19 |
if [ ${my_KV} != "2.6" ] ; then
|
| 20 |
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!"
|
| 21 |
fi
|
| 22 |
}
|
| 23 |
|
| 24 |
src_compile() {
|
| 25 |
unset CC
|
| 26 |
./configure --prefix=/usr --sysconfdir=/etc --with-kernel-headers=/usr/src/linux/include || die
|
| 27 |
sed -e 's:AM_CFLAGS = :AM_CFLAGS = -include /usr/src/linux/include/linux/compiler.h :' -i src/setkey/Makefile || die
|
| 28 |
sed -e 's:CPPFLAGS=:CPPFLAGS = -include /usr/src/linux/include/linux/compiler.h :' -i src/racoon/Makefile || die
|
| 29 |
sed -e 's:va_copy:__va_copy:g' -i src/racoon/plog.c || die # GCC 2 Fix
|
| 30 |
emake || die
|
| 31 |
}
|
| 32 |
|
| 33 |
src_install() {
|
| 34 |
einstall || die
|
| 35 |
rm ${D}/usr/bin
|
| 36 |
dosbin src/racoon/racoon
|
| 37 |
insinto /etc && doins ${FILESDIR}/ipsec.conf.sample
|
| 38 |
insinto /etc/conf.d && newins ${FILESDIR}/racoon.conf.d racoon
|
| 39 |
exeinto /etc/init.d && newexe ${FILESDIR}/racoon.init.d racoon
|
| 40 |
|
| 41 |
dodoc ChangeLog README NEWS
|
| 42 |
dodoc ${S}/src/racoon/samples/racoon.conf.sample*
|
| 43 |
}
|