commit:     60246db6f39cb6651e8d0c63142b3e2e61b4560f
Author:     Sebastian Pipping <sebastian <AT> pipping <DOT> org>
AuthorDate: Sat Sep  6 10:10:37 2014 +0000
Commit:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Sat Sep  6 10:10:37 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/betagarden.git;a=commit;h=60246db6

app-misc/netjail: 1.0.0

---
 app-misc/netjail/metadata.xml         |  8 ++++++++
 app-misc/netjail/netjail-1.0.0.ebuild | 35 +++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/app-misc/netjail/metadata.xml b/app-misc/netjail/metadata.xml
new file mode 100644
index 0000000..16bcc9f
--- /dev/null
+++ b/app-misc/netjail/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer>
+               <email>[email protected]</email>
+               <name>Sebastian Pipping</name>
+       </maintainer>
+</pkgmetadata>

diff --git a/app-misc/netjail/netjail-1.0.0.ebuild 
b/app-misc/netjail/netjail-1.0.0.ebuild
new file mode 100644
index 0000000..accac8a
--- /dev/null
+++ b/app-misc/netjail/netjail-1.0.0.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="5"
+
+inherit multilib
+
+DESCRIPTION="Configurably disable the ability of a process to access the 
internet"
+HOMEPAGE="http://sourceforge.net/projects/netjail/";
+SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_install() {
+       local preload_dir="/usr/$(get_libdir)/${PN}"
+       local preload_file="lib${PN}.so.1.0.0"
+
+       dodoc AUTHORS README || die
+
+       insinto ${preload_dir}
+       doins ${preload_file} || die
+
+       cat <<-EOF > ${PN}
+               #! /bin/bash
+               [[ -z \${NETJAIL_INET} ]] && export NETJAIL_INET=D:ALL
+               [[ -z \${NETJAIL_UNIX} ]] && export NETJAIL_UNIX=D:ALL
+               LD_PRELOAD="${preload_dir}/${preload_file}" "\$@"
+       EOF
+       chmod a+x ${PN} || die
+       dobin ${PN} || die
+}

Reply via email to