blob: b3020b5c1cb61fd0fdd85951cb59895f9101d81e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-firewall/ipt_netflow/ipt_netflow-1.8.ebuild,v 1.2 2013/02/07 15:31:53 pinkbyte Exp $
EAPI="4"
inherit linux-info linux-mod multilib toolchain-funcs
MY_PN="ipt-netflow"
DESCRIPTION="Netflow iptables module"
HOMEPAGE="http://sourceforge.net/projects/ipt-netflow"
SRC_URI="mirror://sourceforge/${MY_PN}/${P}.tgz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND="net-firewall/iptables"
DEPEND="${RDEPEND}
virtual/linux-sources
virtual/pkgconfig"
BUILD_TARGETS="all"
CONFIG_CHECK="~IP_NF_IPTABLES"
MODULE_NAMES="ipt_NETFLOW(ipt_netflow:${S})"
IPT_LIB=/usr/$(get_libdir)/xtables
src_prepare() {
sed -i -e 's:-I$(KDIR)/include::' \
-e 's:gcc -O2:$(CC) $(CFLAGS) $(LDFLAGS):' \
-e 's:gcc:$(CC) $(CFLAGS) $(LDFLAGS):' Makefile.in || die 'sed on Makefile.in failed'
sed -i -e '/IPT_NETFLOW_VERSION/s/1.7.2/1.8/' ipt_NETFLOW.c || die 'sed on ipt_NETFLOW.c failed'
}
src_configure() {
local IPT_VERSION="$($(tc-getPKG_CONFIG) --modversion xtables)"
# econf can not be used, cause configure script fails when see unknown parameter
./configure --kver="${KV_FULL}" --kdir="${KV_DIR}" \
--ipt-ver="${IPT_VERSION}" --ipt-lib="${IPT_LIB}" || die 'configure failed'
}
src_compile() {
local ARCH=$(tc-arch-kernel)
emake CC="$(tc-getCC)" all
}
src_install() {
linux-mod_src_install
exeinto "${IPT_LIB}"
doexe libipt_NETFLOW.so
insinto /usr/include
doins ipt_NETFLOW.h
dodoc README*
}
|