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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Tue Jun 26 04:36:01 2012 UTC (21 months, 4 weeks ago) by zmedico
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +2 -2 lines
inherit multilib for get_libdir

(Portage version: 2.2.0_alpha113/cvs/Linux i686)

1 ago 1.3 # Copyright 1999-2012 Gentoo Foundation
2 pva 1.1 # Distributed under the terms of the GNU General Public License v2
3 zmedico 1.5 # $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/iptables-1.4.12.1-r1.ebuild,v 1.4 2012/01/06 23:16:38 vapier Exp $
4 pva 1.1
5     EAPI="4"
6    
7     # Force users doing their own patches to install their own tools
8     AUTOTOOLS_AUTO_DEPEND=no
9    
10 zmedico 1.5 inherit eutils multilib toolchain-funcs autotools
11 pva 1.1
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 scarabeus 1.2 IUSE="ipv6 netlink static-libs"
20 pva 1.1
21 scarabeus 1.2 RDEPEND="
22 pva 1.1 netlink? ( net-libs/libnfnetlink )
23     "
24 scarabeus 1.2 DEPEND="${RDEPEND}
25 pva 1.1 virtual/os-headers
26     sys-devel/automake
27     "
28    
29     src_prepare() {
30 scarabeus 1.2 epatch \
31     "${FILESDIR}/iptables-1.4.12.1-lm.patch" \
32     "${FILESDIR}/iptables-1.4.12.1-conntrack-v2-ranges.patch"
33 pva 1.1 eautomake
34    
35 vapier 1.4 # use the saner headers from the kernel
36     rm -f include/linux/{kernel,types}.h
37    
38 pva 1.1 # Only run autotools if user patched something
39     epatch_user && eautoreconf || elibtoolize
40     }
41    
42     src_configure() {
43     sed -i \
44 vapier 1.4 -e "/nfnetlink=[01]/s:=[01]:=$(usex netlink 1 0):" \
45 pva 1.1 configure || die
46     econf \
47     --sbindir=/sbin \
48     --libexecdir=/$(get_libdir) \
49     --enable-devel \
50     --enable-libipq \
51     --enable-shared \
52 ago 1.3 $(use_enable static-libs static) \
53 pva 1.1 $(use_enable ipv6)
54     }
55    
56     src_compile() {
57     emake V=1
58     }
59    
60     src_install() {
61 scarabeus 1.2 default
62 pva 1.1 dodoc INCOMPATIBILITIES iptables/iptables.xslt
63    
64     # all the iptables binaries are in /sbin, so might as well
65     # put these small files in with them
66     into /
67     dosbin iptables/iptables-apply
68     dosym iptables-apply /sbin/ip6tables-apply
69     doman iptables/iptables-apply.8
70    
71     insinto /usr/include
72     doins include/iptables.h $(use ipv6 && echo include/ip6tables.h)
73     insinto /usr/include/iptables
74     doins include/iptables/internal.h
75    
76     keepdir /var/lib/iptables
77     newinitd "${FILESDIR}"/${PN}-1.4.11.init iptables
78     newconfd "${FILESDIR}"/${PN}-1.3.2.confd iptables
79     if use ipv6 ; then
80     keepdir /var/lib/ip6tables
81     newinitd "${FILESDIR}"/iptables-1.4.11.init ip6tables
82     newconfd "${FILESDIR}"/ip6tables-1.3.2.confd ip6tables
83     fi
84    
85     # Move important libs to /lib
86     gen_usr_ldscript -a ip{4,6}tc ipq iptc xtables
87     find "${ED}" -type f -name '*.la' -exec rm -rf '{}' '+' || die "la removal failed"
88     }

  ViewVC Help
Powered by ViewVC 1.1.20