| 1 |
# Copyright 1999-2010 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/iptables-1.4.6.ebuild,v 1.1 2009/12/18 16:00:01 vapier Exp $ |
| 4 |
|
| 5 |
inherit eutils toolchain-funcs |
| 6 |
|
| 7 |
DESCRIPTION="Linux kernel (2.4+) firewall, NAT and packet mangling tools" |
| 8 |
HOMEPAGE="http://www.iptables.org/" |
| 9 |
SRC_URI="http://iptables.org/projects/iptables/files/${P}.tar.bz2" |
| 10 |
|
| 11 |
LICENSE="GPL-2" |
| 12 |
SLOT="0" |
| 13 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86" |
| 14 |
IUSE="ipv6" |
| 15 |
|
| 16 |
DEPEND="virtual/os-headers" |
| 17 |
RDEPEND="" |
| 18 |
|
| 19 |
src_unpack() { |
| 20 |
unpack ${P}.tar.bz2 |
| 21 |
cd "${S}" |
| 22 |
epatch_user |
| 23 |
} |
| 24 |
|
| 25 |
src_compile() { |
| 26 |
econf \ |
| 27 |
--sbindir=/sbin \ |
| 28 |
--libexecdir=/$(get_libdir) \ |
| 29 |
--enable-devel \ |
| 30 |
--enable-libipq \ |
| 31 |
--enable-shared \ |
| 32 |
--enable-static \ |
| 33 |
$(use_enable ipv6) |
| 34 |
emake V=1 || die |
| 35 |
} |
| 36 |
|
| 37 |
src_install() { |
| 38 |
emake install DESTDIR="${D}" || die |
| 39 |
|
| 40 |
insinto /usr/include |
| 41 |
doins include/iptables.h $(use ipv6 && echo include/ip6tables.h) || die |
| 42 |
insinto /usr/include/iptables |
| 43 |
doins include/iptables/internal.h || die |
| 44 |
|
| 45 |
keepdir /var/lib/iptables |
| 46 |
newinitd "${FILESDIR}"/${PN}-1.3.2.init iptables || die |
| 47 |
newconfd "${FILESDIR}"/${PN}-1.3.2.confd iptables || die |
| 48 |
if use ipv6 ; then |
| 49 |
keepdir /var/lib/ip6tables |
| 50 |
newinitd "${FILESDIR}"/iptables-1.3.2.init ip6tables || die |
| 51 |
newconfd "${FILESDIR}"/ip6tables-1.3.2.confd ip6tables || die |
| 52 |
fi |
| 53 |
} |