]> Pileus Git - ~andy/sunrise/blob - net-firewall/opendpi-netfilter-wrapper/opendpi-netfilter-wrapper-1.1.ebuild
sunrise/ net-nntp/nzbperl/Manifest: Update copyright line to satisfy repoman
[~andy/sunrise] / net-firewall / opendpi-netfilter-wrapper / opendpi-netfilter-wrapper-1.1.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="2"
6
7 inherit eutils linux-mod
8
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"
14
15 LICENSE="GPL-2"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86"
18 IUSE=""
19
20 RDEPEND=">=net-firewall/iptables-1.4.1"
21 DEPEND="${RDEPEND}"
22
23 S="${S}/wrapper"
24
25 MODULE_NAMES="xt_opendpi(extra:${S}:${S}/src)"
26 BUILD_TARGETS=" "
27
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."
32
33 src_prepare() {
34         epatch "${FILESDIR}/${P}_2.6.35_v2.patch.gz"
35
36         cd "${WORKDIR}/${OPENDPI_VER}" || die
37         epatch "${WORKDIR}/${P}/ipq_main.h.diff"
38         epatch "${WORKDIR}/${P}/ipq_protocols.h.diff"
39 }
40
41 src_compile() {
42         export OPENDPI_PATH="${WORKDIR}/${OPENDPI_VER}"
43         linux-mod_src_compile
44 }
45
46 src_install() {
47         exeinto "/$(get_libdir)/xtables"
48         doexe "ipt/libxt_opendpi.so" || die
49
50         linux-mod_src_install
51
52         dodoc README INSTALL AUTHORS || die
53 }
54
55 pkg_postinst() {
56         linux-mod_pkg_postinst
57
58         elog
59         elog "See output of 'iptables -m opendpi --help' for help on using and the options available."
60         elog
61 }