/[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.2 - (hide annotations) (download)
Fri Dec 30 12:01:22 2011 UTC (2 years, 6 months ago) by scarabeus
Branch: MAIN
Changes since 1.1: +9 -12 lines
Do not provide static libs unless requested. Sort the deps to be more straight-forward.

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

1 pva 1.1 # Copyright 1999-2011 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 scarabeus 1.2 # $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/iptables-1.4.12.1-r1.ebuild,v 1.1 2011/09/19 07:45:40 pva 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     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 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     # Only run autotools if user patched something
36     epatch_user && eautoreconf || elibtoolize
37     }
38    
39     src_configure() {
40     sed -i \
41     -e "/nfnetlink=[01]/s:=[01]:=$(use netlink && echo 1 || echo 0):" \
42     configure || die
43     econf \
44     --sbindir=/sbin \
45     --libexecdir=/$(get_libdir) \
46     --enable-devel \
47     --enable-libipq \
48     --enable-shared \
49 scarabeus 1.2 $(use-enable static-libs static) \
50 pva 1.1 $(use_enable ipv6)
51     }
52    
53     src_compile() {
54     emake V=1
55     }
56    
57     src_install() {
58 scarabeus 1.2 default
59 pva 1.1 dodoc INCOMPATIBILITIES iptables/iptables.xslt
60    
61     # all the iptables binaries are in /sbin, so might as well
62     # put these small files in with them
63     into /
64     dosbin iptables/iptables-apply
65     dosym iptables-apply /sbin/ip6tables-apply
66     doman iptables/iptables-apply.8
67    
68     insinto /usr/include
69     doins include/iptables.h $(use ipv6 && echo include/ip6tables.h)
70     insinto /usr/include/iptables
71     doins include/iptables/internal.h
72    
73     keepdir /var/lib/iptables
74     newinitd "${FILESDIR}"/${PN}-1.4.11.init iptables
75     newconfd "${FILESDIR}"/${PN}-1.3.2.confd iptables
76     if use ipv6 ; then
77     keepdir /var/lib/ip6tables
78     newinitd "${FILESDIR}"/iptables-1.4.11.init ip6tables
79     newconfd "${FILESDIR}"/ip6tables-1.3.2.confd ip6tables
80     fi
81    
82     # Move important libs to /lib
83     gen_usr_ldscript -a ip{4,6}tc ipq iptc xtables
84     find "${ED}" -type f -name '*.la' -exec rm -rf '{}' '+' || die "la removal failed"
85     }

  ViewVC Help
Powered by ViewVC 1.1.20