/[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.3 - (hide annotations) (download)
Tue Jun 26 04:36:01 2012 UTC (2 years, 5 months ago) by zmedico
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +3 -3 lines
inherit multilib for get_libdir

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

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

  ViewVC Help
Powered by ViewVC 1.1.20