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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show 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.7: +3 -3 lines
inherit multilib for get_libdir

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

1 # Copyright 1999-2012 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.12.1.ebuild,v 1.7 2011/10/08 18:23:34 armin76 Exp $
4
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 multilib 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 COMMON_DEPEND="
22 netlink? ( net-libs/libnfnetlink )
23 "
24 DEPEND="
25 ${COMMON_DEPEND}
26 virtual/os-headers
27 sys-devel/automake
28 "
29 RDEPEND="
30 ${COMMON_DEPEND}
31 "
32
33 src_prepare() {
34 epatch "${FILESDIR}/iptables-1.4.12.1-lm.patch"
35 eautomake
36
37 # Only run autotools if user patched something
38 epatch_user && eautoreconf || elibtoolize
39 }
40
41 src_configure() {
42 sed -i \
43 -e "/nfnetlink=[01]/s:=[01]:=$(use netlink && echo 1 || echo 0):" \
44 configure || die
45 econf \
46 --sbindir=/sbin \
47 --libexecdir=/$(get_libdir) \
48 --enable-devel \
49 --enable-libipq \
50 --enable-shared \
51 --enable-static \
52 $(use_enable ipv6)
53 }
54
55 src_compile() {
56 emake V=1
57 }
58
59 src_install() {
60 emake install DESTDIR="${D}"
61 dodoc INCOMPATIBILITIES iptables/iptables.xslt
62
63 # all the iptables binaries are in /sbin, so might as well
64 # put these small files in with them
65 into /
66 dosbin iptables/iptables-apply
67 dosym iptables-apply /sbin/ip6tables-apply
68 doman iptables/iptables-apply.8
69
70 insinto /usr/include
71 doins include/iptables.h $(use ipv6 && echo include/ip6tables.h)
72 insinto /usr/include/iptables
73 doins include/iptables/internal.h
74
75 keepdir /var/lib/iptables
76 newinitd "${FILESDIR}"/${PN}-1.4.11.init iptables
77 newconfd "${FILESDIR}"/${PN}-1.3.2.confd iptables
78 if use ipv6 ; then
79 keepdir /var/lib/ip6tables
80 newinitd "${FILESDIR}"/iptables-1.4.11.init ip6tables
81 newconfd "${FILESDIR}"/ip6tables-1.3.2.confd ip6tables
82 fi
83
84 # Move important libs to /lib
85 gen_usr_ldscript -a ip{4,6}tc ipq iptc xtables
86 find "${ED}" -type f -name '*.la' -exec rm -rf '{}' '+' || die "la removal failed"
87 }

  ViewVC Help
Powered by ViewVC 1.1.20