summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Vinson <nvinson234@gmail.com>2017-01-07 06:56:05 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2017-01-07 13:46:03 -0800
commit318d063e9b2cb1d0dcf7fc7416f711ee52efae47 (patch)
treebe35cbf73f3ef956c1c8c82e96259001dd2415b1 /net-firewall
parentnet-firewall/nftables: Fix SAVE_OPTIONS bug in libexec scripts (diff)
downloadgentoo-318d063e9b2cb1d0dcf7fc7416f711ee52efae47.tar.gz
gentoo-318d063e9b2cb1d0dcf7fc7416f711ee52efae47.tar.bz2
gentoo-318d063e9b2cb1d0dcf7fc7416f711ee52efae47.zip
net-firewall/nftables: version bump to 0.7
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'net-firewall')
-rw-r--r--net-firewall/nftables/Manifest1
-rw-r--r--net-firewall/nftables/nftables-0.7.ebuild83
2 files changed, 84 insertions, 0 deletions
diff --git a/net-firewall/nftables/Manifest b/net-firewall/nftables/Manifest
index ee4654f4c8b..dfd6553f63e 100644
--- a/net-firewall/nftables/Manifest
+++ b/net-firewall/nftables/Manifest
@@ -1 +1,2 @@
DIST nftables-0.6.tar.gz 252523 SHA256 85dd7fa4e741c0be02efddbc57b5d300e1147f09ec6f81d0399110f96dc958f0 SHA512 17f3b94687865e077dc082cf61b29ab2854fd1ffe18212a8d424f2876aef8db9780dd4d06dca8e6d093498151d47bab73e40e1f54062a83a23a3cbe75f27e921 WHIRLPOOL d15eaf81426d73bea28752f96727d291120120fb2aaa994d421d900974eb45062957435e077664fb916780f636ed9b61889dbec8b627d5d309512bae96f02874
+DIST nftables-0.7.tar.gz 292652 SHA256 192c9d92ee0c56eded599d1c54b0d68f4d9b0286f3d908579f0b9271aeba432f SHA512 6032720abf3af8a6dc0b4f507c6ae970447f504d59db4a34b2e0eea3c59962bc69d9ebfaa4e26a117747eb9d0224716a9709b96551b5479d914d7498f26ed43a WHIRLPOOL a999e85370bd9241daf015849ecdf5955f87a2d65f5525a6e75e9eda1bb87e1a84123c42e95f16c4469873a682409fea2ccc65a3af84a107b62d8c2a5727343d
diff --git a/net-firewall/nftables/nftables-0.7.ebuild b/net-firewall/nftables/nftables-0.7.ebuild
new file mode 100644
index 00000000000..b90143dd309
--- /dev/null
+++ b/net-firewall/nftables/nftables-0.7.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools linux-info systemd
+
+DESCRIPTION="Linux kernel (3.13+) firewall, NAT and packet mangling tools"
+HOMEPAGE="http://netfilter.org/projects/nftables/"
+SRC_URI="http://git.netfilter.org/nftables/snapshot/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="debug doc gmp +readline"
+
+RDEPEND=">=net-libs/libmnl-1.0.3
+ gmp? ( dev-libs/gmp:0= )
+ readline? ( sys-libs/readline:0= )
+ >=net-libs/libnftnl-1.0.7"
+
+DEPEND="${RDEPEND}
+ >=app-text/docbook2X-0.8.8-r4
+ doc? ( >=app-text/dblatex-0.3.7 )
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig"
+
+S="${WORKDIR}/v${PV}"
+
+pkg_setup() {
+ if kernel_is ge 3 13; then
+ CONFIG_CHECK="~NF_TABLES"
+ linux-info_pkg_setup
+ else
+ eerror "This package requires kernel version 3.13 or newer to work properly."
+ fi
+}
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --sbindir="${EPREFIX}"/sbin \
+ $(use_enable doc pdf-doc) \
+ $(use_enable debug) \
+ $(use_with readline cli) \
+ $(use_with !gmp mini_gmp)
+}
+
+src_install() {
+ default
+
+ dodir /usr/libexec/${PN}
+ exeinto /usr/libexec/${PN}
+ doexe "${FILESDIR}"/libexec/${PN}.sh
+
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ newinitd "${FILESDIR}"/${PN}.init ${PN}
+ keepdir /var/lib/nftables
+
+ systemd_dounit "${FILESDIR}"/systemd/${PN}-restore.service
+ systemd_enable_service basic.target ${PN}-restore.service
+}
+
+pkg_postinst() {
+ local save_file
+ save_file="${EROOT%/}/var/lib/nftables/rules-save"
+
+ elog "In order for the nftables-restore systemd service to start, "
+ elog "the file, ${save_file}, must exist. To create this "
+ elog "file run the following command: "
+ elog ""
+ elog " touch '${save_file}'"
+ elog ""
+ elog "Afterwards, the nftables-restore service should be manually started "
+ elog "to ensure firewall changes are stored on system shutdown. The "
+ elog "systemd service will function normally thereafter."
+}