1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit eutils linux-mod
9 OPENDPI_VER="opendpi-1.2.0"
10 DESCRIPTION="Netfilter wrapper for OpenDPI library."
11 HOMEPAGE="http://opendpi.org/"
12 SRC_URI="http://opendpi.googlecode.com/files/${P}.tar.gz
13 http://opendpi.googlecode.com/files/${OPENDPI_VER}.tar.gz"
17 KEYWORDS="~amd64 ~x86"
20 RDEPEND=">=net-firewall/iptables-1.4.1"
25 MODULE_NAMES="xt_opendpi(extra:${S}:${S}/src)"
28 CONFIG_CHECK="NETFILTER NF_CONNTRACK_EVENTS !NF_CT_NETLINK"
29 ERROR_NETFILTER="${PN} requires Netfilter support in your kernel."
30 ERROR_NF_CONNTRACK_EVENTS="${PN} requires Connection tracking events support in your kernel."
31 ERROR_NF_CT_NETLINK="${PN} requires disabled Connection tracking netlink interface option in your kernel."
34 epatch "${FILESDIR}/${P}_2.6.35_v2.patch.gz"
36 cd "${WORKDIR}/${OPENDPI_VER}" || die
37 epatch "${WORKDIR}/${P}/ipq_main.h.diff"
38 epatch "${WORKDIR}/${P}/ipq_protocols.h.diff"
42 export OPENDPI_PATH="${WORKDIR}/${OPENDPI_VER}"
47 exeinto "/$(get_libdir)/xtables"
48 doexe "ipt/libxt_opendpi.so" || die
52 dodoc README INSTALL AUTHORS || die
56 linux-mod_pkg_postinst
59 elog "See output of 'iptables -m opendpi --help' for help on using and the options available."