/[gentoo-x86]/net-libs/nfqueue-bindings/nfqueue-bindings-0.5.ebuild
Gentoo

Contents of /net-libs/nfqueue-bindings/nfqueue-bindings-0.5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed Jul 1 22:39:58 2015 UTC (5 years, 5 months ago) by zmedico
Branch: MAIN
CVS Tags: HEAD
Add nfqueue-bindings, thanks to Tony Cheneau <tony.cheneau@amnesiak.org> from bug 318559.

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key FDE8EF85AE5719A3)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=5
6 PYTHON_COMPAT=( python2_7 )
7 inherit cmake-utils perl-module linux-info python-single-r1
8
9 DESCRIPTION="High-level language bindings for libnetfilter_queue"
10 HOMEPAGE="https://www.wzdftpd.net/redmine/projects/nfqueue-bindings/wiki/"
11 SRC_URI="https://www.wzdftpd.net/redmine/attachments/download/68/nfqueue-bindings-0.5.tar.xz"
12
13 KEYWORDS="~x86 ~amd64"
14 SLOT="0"
15 LICENSE="GPL-3"
16 IUSE="perl python examples"
17 REQUIRED_USE="|| ( perl python )"
18
19 DEPEND="python? (
20 dev-python/dpkt[${PYTHON_USEDEP}]
21 ${PYTHON_DEPS}
22 )
23 perl? ( dev-lang/perl )
24 net-libs/libnetfilter_queue
25 dev-lang/swig"
26
27 pkg_setup() {
28 use python && python-single-r1_pkg_setup
29 # At least one of Python or Perl must be selected
30 use python || useq perl || die "At least one supported language must be selected."
31 # Check kernel configuration for NFQUEUE
32 if linux_config_exists; then
33 ebegin "Checking NETFILTER_NETLINK_QUEUE support"
34 linux_chkconfig_present NETFILTER_NETLINK_QUEUE
35 eend $? || \
36 eerror 'Netfilter NFQUEUE over NFNETLINK interface support not found!'
37 ebegin "Checking NETFILTER_XT_TARGET_NFQUEUE support"
38 linux_chkconfig_present NETFILTER_XT_TARGET_NFQUEUE
39 eend $? || \
40 eerror '"NFQUEUE" target Support not found!'
41 fi
42 }
43
44 src_prepare() {
45 # Fix Perl destination directory
46 perl_set_version
47 sed -i "s|\${LIB_INSTALL_DIR}/perl\${PERL_VERSION}/|${VENDOR_ARCH}|" perl/CMakeLists.txt || die
48 sed -i "s|\${LIB_INSTALL_DIR}/python\${PYTHON_VERSION}/dist-packages/|$(python_get_sitedir)|" python/CMakeLists.txt || die
49 # Disable Perl/Python from USE flags
50 use perl || sed -i 's|ADD_SUBDIRECTORY(perl)||' CMakeLists.txt || die
51 use python || sed -i 's|ADD_SUBDIRECTORY(python)||' CMakeLists.txt || die
52 }
53
54 src_install() {
55 emake DESTDIR="${D}" install PREFIX=/usr || die
56 docinto examples
57 use examples && dodoc examples/*
58 }

  ViewVC Help
Powered by ViewVC 1.1.20