/[gentoo-x86]/net-firewall/iptables/iptables-1.4.10-r1.ebuild
Gentoo

Contents of /net-firewall/iptables/iptables-1.4.10-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Thu Feb 10 04:05:05 2011 UTC (3 years, 2 months ago) by vapier
Branch: MAIN
Install ip6tables-apply symlink to iptables-apply #316369 by Paul Tobias and add USE=netlink to control libnfnetlink depend #351880 by Mike Gilbert.

(Portage version: 2.2.0_alpha20/cvs/Linux x86_64)

1 # Copyright 1999-2011 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.10.ebuild,v 1.9 2011/01/13 18:56:23 ranger Exp $
4
5 EAPI="2"
6
7 # Force users doing their own patches to install their own tools
8 AUTOTOOLS_AUTO_DEPEND=no
9
10 inherit eutils toolchain-funcs autotools
11
12 DESCRIPTION="Linux kernel (2.4+) firewall, NAT and packet mangling tools"
13 HOMEPAGE="http://www.iptables.org/"
14 SRC_URI="http://iptables.org/projects/iptables/files/${P}.tar.bz2"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
19 IUSE="ipv6 netlink"
20
21 DEPEND="virtual/os-headers"
22 RDEPEND="netlink? ( net-libs/libnfnetlink )"
23
24 src_prepare() {
25 # Only run autotools if user patched something
26 epatch_user && eautoreconf || elibtoolize
27 }
28
29 src_configure() {
30 sed -i \
31 -e "/nfnetlink=[01]/s:=[01]:=$(use netlink && echo 1 || echo 0):" \
32 configure
33 econf \
34 --sbindir=/sbin \
35 --libexecdir=/$(get_libdir) \
36 --enable-devel \
37 --enable-libipq \
38 --enable-shared \
39 --enable-static \
40 $(use_enable ipv6)
41 }
42
43 src_compile() {
44 emake V=1 || die
45 }
46
47 src_install() {
48 emake install DESTDIR="${D}" || die
49 doman iptables-apply.8 || die
50 dodoc INCOMPATIBILITIES iptables.xslt || die
51
52 # all the iptables binaries are in /sbin, so might as well
53 # put these small files in with them
54 into /
55 dosbin iptables-apply || die
56 dosym iptables-apply /sbin/ip6tables-apply || die
57
58 insinto /usr/include
59 doins include/iptables.h $(use ipv6 && echo include/ip6tables.h) || die
60 insinto /usr/include/iptables
61 doins include/iptables/internal.h || die
62
63 keepdir /var/lib/iptables
64 newinitd "${FILESDIR}"/${PN}-1.3.2.init iptables || die
65 newconfd "${FILESDIR}"/${PN}-1.3.2.confd iptables || die
66 if use ipv6 ; then
67 keepdir /var/lib/ip6tables
68 newinitd "${FILESDIR}"/iptables-1.3.2.init ip6tables || die
69 newconfd "${FILESDIR}"/ip6tables-1.3.2.confd ip6tables || die
70 fi
71
72 # Move important libs to /lib
73 gen_usr_ldscript -a ip{4,6}tc ipq iptc xtables
74 find "${D}" -type f -name '*.la' -exec rm -rf '{}' '+' || die "la removal failed"
75 }

  ViewVC Help
Powered by ViewVC 1.1.20