summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2017-10-17 16:10:47 +0200
committerLars Wendler <polynomial-c@gentoo.org>2017-10-17 16:12:10 +0200
commitb75f49ebb606b23ff04aa2ec5e3972b60d1cbad2 (patch)
treed0be46c1174198722a0813d71afca655d1f6e752 /net-firewall
parentnet-libs/libnftnl: Bump to version 1.0.8 (diff)
downloadgentoo-b75f49ebb606b23ff04aa2ec5e3972b60d1cbad2.tar.gz
gentoo-b75f49ebb606b23ff04aa2ec5e3972b60d1cbad2.tar.bz2
gentoo-b75f49ebb606b23ff04aa2ec5e3972b60d1cbad2.zip
net-firewall/nftables: Bump to version 0.8
Package-Manager: Portage-2.3.11, Repoman-2.3.3
Diffstat (limited to 'net-firewall')
-rw-r--r--net-firewall/nftables/Manifest1
-rw-r--r--net-firewall/nftables/nftables-0.8.ebuild84
2 files changed, 85 insertions, 0 deletions
diff --git a/net-firewall/nftables/Manifest b/net-firewall/nftables/Manifest
index dfd6553f63e0..d07751502f1a 100644
--- a/net-firewall/nftables/Manifest
+++ b/net-firewall/nftables/Manifest
@@ -1,2 +1,3 @@
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
+DIST nftables-0.8.tar.gz 327629 SHA256 95603f34e47dbfe89a1d704e17131ba1d60f458343c573c0985ac1e84cbca85a SHA512 90ffebc338c121334ca42822793b6fdeff48390e755c690308919de47064b53f9af735a2c2914e5255f1bddec90484599337d4cdd67f7a01a3956deefcef9fcb WHIRLPOOL ef5224eabdb57a640d4a3d53c90721c5fc473e06af977ea8e8e3fc566f8755e858fa7780642a34c4da72480357671d75a460a32d97d60bb47d009f5cc735f0e2
diff --git a/net-firewall/nftables/nftables-0.8.ebuild b/net-firewall/nftables/nftables-0.8.ebuild
new file mode 100644
index 000000000000..8ea3783bb5c4
--- /dev/null
+++ b/net-firewall/nftables/nftables-0.8.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools linux-info systemd
+
+DESCRIPTION="Linux kernel (3.13+) firewall, NAT and packet mangling tools"
+HOMEPAGE="https://netfilter.org/projects/nftables/"
+SRC_URI="https://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.8"
+
+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() {
+ local myeconfargs=(
+ --sbindir="${EPREFIX}"/sbin
+ $(use_enable doc pdf-doc)
+ $(use_enable debug)
+ $(use_with readline cli)
+ $(use_with !gmp mini_gmp)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+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."
+}