summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2020-06-27 13:37:10 -0700
committerPatrick McLean <chutzpah@gentoo.org>2020-06-27 13:37:31 -0700
commitae62e133c84c646842cca143727a32805c59d921 (patch)
treeb5c3c28bc5412840134c4f211537478b76da8c3f
parentnet-firewall/nftables: Add live ebuild (diff)
downloadgentoo-ae62e133c84c646842cca143727a32805c59d921.tar.gz
gentoo-ae62e133c84c646842cca143727a32805c59d921.tar.bz2
gentoo-ae62e133c84c646842cca143727a32805c59d921.zip
net-firewall/nftables-0.9.6: Add py39, instructions for openrc
Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
-rw-r--r--net-firewall/nftables/nftables-0.9.6.ebuild39
1 files changed, 25 insertions, 14 deletions
diff --git a/net-firewall/nftables/nftables-0.9.6.ebuild b/net-firewall/nftables/nftables-0.9.6.ebuild
index aad88b61923..44e1fc441fb 100644
--- a/net-firewall/nftables/nftables-0.9.6.ebuild
+++ b/net-firewall/nftables/nftables-0.9.6.ebuild
@@ -3,13 +3,12 @@
EAPI=7
-PYTHON_COMPAT=( python3_{6,7,8} )
+PYTHON_COMPAT=( python3_{6,7,8,9} )
inherit autotools linux-info python-r1 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"
SRC_URI="https://netfilter.org/projects/nftables/files/${P}.tar.bz2"
LICENSE="GPL-2"
@@ -37,9 +36,9 @@ BDEPEND="
virtual/pkgconfig
"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-#S="${WORKDIR}/v${PV}"
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
python_make() {
emake \
@@ -47,7 +46,7 @@ python_make() {
abs_builddir="${S}" \
DESTDIR="${D}" \
PYTHON_BIN="${PYTHON}" \
- ${@}
+ "${@}"
}
pkg_setup() {
@@ -93,7 +92,7 @@ src_configure() {
src_compile() {
default
- if use python ; then
+ if use python; then
python_foreach_impl python_make
fi
}
@@ -141,11 +140,23 @@ pkg_postinst() {
ewarn " 'chmod 600 \"${save_file}\"'"
fi
- elog "If you wish to enable the firewall rules on boot (on systemd) you"
- elog "will need to enable the nftables-restore service."
- elog " 'systemctl enable ${PN}-restore.service'"
- elog
- elog "If you are creating firewall rules before the next system restart "
- elog "the nftables-restore service must be manually started in order to "
- elog "save those rules on shutdown."
+ if has_version 'sys-apps/systemd'; then
+ elog "If you wish to enable the firewall rules on boot (on systemd) you"
+ elog "will need to enable the nftables-restore service."
+ elog " 'systemctl enable ${PN}-restore.service'"
+ elog
+ elog "If you are creating firewall rules before the next system restart"
+ elog "the nftables-restore service must be manually started in order to"
+ elog "save those rules on shutdown."
+ fi
+ if has_version 'sys-apps/openrc'; then
+ elog "If you wish to enable the firewall rules on boot (on openrc) you"
+ elog "will need to enable the nftables service."
+ elog " 'rc-update add ${PN} default'"
+ elog
+ elog "If you are creating or updating the firewall rules and wish to save"
+ elog "them to be loaded on the next restart, use the \"save\" functionality"
+ elog "in the init script."
+ elog " 'rc-service ${PN} save'"
+ fi
}