Line 0
Link Here
|
0 |
- |
1 |
# Copyright 1999-2015 Gentoo Foundation |
|
|
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Id$ |
4 |
|
5 |
EAPI=5 |
6 |
|
7 |
inherit autotools linux-info eutils systemd |
8 |
|
9 |
DESCRIPTION="Linux kernel (3.13+) firewall, NAT and packet mangling tools" |
10 |
HOMEPAGE="http://netfilter.org/projects/nftables/" |
11 |
SRC_URI="http://git.netfilter.org/nftables/snapshot/v${PV}.tar.gz -> ${P}.tar.gz" |
12 |
|
13 |
LICENSE="GPL-2" |
14 |
SLOT="0" |
15 |
KEYWORDS="~amd64 ~arm ~x86" |
16 |
IUSE="debug gmp +readline" |
17 |
|
18 |
RDEPEND=">=net-libs/libmnl-1.0.3 |
19 |
>=net-libs/libnftnl-1.0.5 |
20 |
gmp? ( dev-libs/gmp:0= ) |
21 |
readline? ( sys-libs/readline:0= )" |
22 |
DEPEND="${RDEPEND} |
23 |
>=app-text/docbook2X-0.8.8-r4 |
24 |
sys-devel/bison |
25 |
sys-devel/flex" |
26 |
|
27 |
S="${WORKDIR}"/v${PV} |
28 |
|
29 |
pkg_setup() { |
30 |
if kernel_is ge 3 13; then |
31 |
CONFIG_CHECK="~NF_TABLES" |
32 |
linux-info_pkg_setup |
33 |
else |
34 |
eerror "This package requires kernel version 3.13 or newer to work properly." |
35 |
fi |
36 |
} |
37 |
|
38 |
src_prepare() { |
39 |
epatch_user |
40 |
eautoreconf |
41 |
} |
42 |
|
43 |
src_configure() { |
44 |
econf \ |
45 |
--sbindir="${EPREFIX}"/sbin \ |
46 |
$(use_enable debug) \ |
47 |
$(use_with readline cli) \ |
48 |
$(use_with !gmp mini_gmp) |
49 |
} |
50 |
|
51 |
src_install() { |
52 |
default |
53 |
|
54 |
dodir /usr/libexec/${PN} |
55 |
cp -p "${FILESDIR}"/libexec/${PN}.sh "${D}"/usr/libexec/${PN}/${PN}.sh |
56 |
|
57 |
newconfd "${FILESDIR}"/${PN}.confd ${PN} |
58 |
newinitd "${FILESDIR}"/${PN}.init-r2 ${PN} |
59 |
keepdir /var/lib/nftables |
60 |
|
61 |
systemd_dounit "${FILESDIR}"/systemd/${PN}{,-{re,}store}.service |
62 |
} |