summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <patrick.mclean@sony.com>2020-05-08 19:50:50 -0700
committerPatrick McLean <chutzpah@gentoo.org>2020-05-08 19:54:51 -0700
commit166b01ff87eef4866daeede41629a619e8605d02 (patch)
treeadb681bde13974f62d4816c58a8a2c245ebe98c6 /net-firewall/arptables
parentapp-eselect/eselect-iptables: Remove old (bug #721578) (diff)
downloadgentoo-166b01ff87eef4866daeede41629a619e8605d02.tar.gz
gentoo-166b01ff87eef4866daeede41629a619e8605d02.tar.bz2
gentoo-166b01ff87eef4866daeede41629a619e8605d02.zip
net-firewall/arptables-0.0.5-r1: Revbump, support eselect-arptables
Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'net-firewall/arptables')
-rw-r--r--net-firewall/arptables/arptables-0.0.5-r1.ebuild55
1 files changed, 55 insertions, 0 deletions
diff --git a/net-firewall/arptables/arptables-0.0.5-r1.ebuild b/net-firewall/arptables/arptables-0.0.5-r1.ebuild
new file mode 100644
index 000000000000..6dc0f8f781c3
--- /dev/null
+++ b/net-firewall/arptables/arptables-0.0.5-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+DESCRIPTION="set up, maintain, and inspect the tables of ARP rules in the Linux kernel"
+HOMEPAGE="http://ebtables.sourceforge.net/"
+SRC_URI="ftp://ftp.netfilter.org/pub/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+BDEPEND=">=app-eselect/eselect-iptables-20200508"
+RDEPEND="${BDEPEND}"
+
+src_compile() {
+ # -O0 does not work and at least -O2 is required, bug #240752
+ emake CC="$(tc-getCC)" COPT_FLAGS="-O2 ${CFLAGS//-O0/-O2}"
+ sed -e 's:__EXEC_PATH__:/sbin:g' \
+ -i arptables-save arptables-restore || die "sed failed"
+}
+
+src_install() {
+ emake \
+ PREFIX="${ED}"/ \
+ LIBDIR="${ED}/$(get_libdir)" \
+ SYSCONFIGDIR="${ED}"/etc \
+ MANDIR="${ED}"/usr/share/man \
+ install
+
+ newman arptables-legacy.8 arptables.8
+}
+
+pkg_postinst() {
+ if ! eselect arptables show &>/dev/null; then
+ elog "Current arptables implementation is unset, setting to ebtables-legacy"
+ eselect arptables set arptables-legacy
+ fi
+
+ eselect arptables show
+}
+
+pkg_prerm() {
+ if has_version 'net-firewall/iptables[nftables]'; then
+ elog "Resetting arptables symlinks to xtables-nft-multi before removal"
+ eselect arptables set xtables-nft-multi
+ else
+ elog "Unsetting arptables symlinks before removal"
+ eselect arptables unset
+ fi
+}