summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Väth <mvath@google.com>2019-08-04 16:28:46 +0200
committerMartin Väth <mvath@google.com>2019-08-04 16:28:46 +0200
commitcdab6ab70c8df4b7f74f2da64215874a9d9934d5 (patch)
tree549dcf848aecceedd917e0d52b35120cacd5f17e /net-firewall/firewall-mv/firewall-mv-13.1-r1.ebuild
parentsys-fs/squashfs-tools: Version bump (diff)
downloadmv-cdab6ab70c8df4b7f74f2da64215874a9d9934d5.tar.gz
mv-cdab6ab70c8df4b7f74f2da64215874a9d9934d5.tar.bz2
mv-cdab6ab70c8df4b7f74f2da64215874a9d9934d5.zip
Support USE=-split-usr
Signed-off-by: Martin Väth <mvath@google.com>
Diffstat (limited to 'net-firewall/firewall-mv/firewall-mv-13.1-r1.ebuild')
-rw-r--r--net-firewall/firewall-mv/firewall-mv-13.1-r1.ebuild43
1 files changed, 43 insertions, 0 deletions
diff --git a/net-firewall/firewall-mv/firewall-mv-13.1-r1.ebuild b/net-firewall/firewall-mv/firewall-mv-13.1-r1.ebuild
new file mode 100644
index 00000000..a050cf03
--- /dev/null
+++ b/net-firewall/firewall-mv/firewall-mv-13.1-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 2012-2019 Martin V\"ath
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+RESTRICT="mirror"
+inherit systemd
+
+DESCRIPTION="Initialize iptables and net-related sysctl variables"
+HOMEPAGE="https://github.com/vaeth/firewall-mv/"
+SRC_URI="https://github.com/vaeth/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="split-usr"
+RDEPEND=">=app-shells/push-2.0-r2"
+DEPEND=""
+
+src_prepare() {
+ if use prefix
+ then sed -i \
+ -e "s!/etc/!${EPREFIX}/etc/!g" \
+ -e "s!/usr/!${EPREFIX}/usr/!g" \
+ -- sbin/* etc/* systemd/* || die
+ else sed -i \
+ -e '1s"^#!/usr/bin/env sh$"#!'"${EPREFIX}$(get_usr)/bin/sh"'"' \
+ -- sbin/* || die
+ fi
+ default
+}
+
+src_compile() {
+ emake "SYSTEMUNITDIR=$(systemd_get_systemunitdir)" BINDIR="$(get_usr)/sbin" LIBDIR="$(get_usr)/lib/firewall"
+}
+
+src_install() {
+ dodoc README.md
+ emake DESTDIR="${ED}" "SYSTEMUNITDIR=$(systemd_get_systemunitdir)" BINDIR="$(get_usr)/sbin" LIBDIR="$(get_usr)/lib/firewall" install
+}
+
+get_usr() {
+ use split-usr || echo /usr
+}