summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <zx2c4@gentoo.org>2017-03-17 14:49:18 +0100
committerJason A. Donenfeld <zx2c4@gentoo.org>2017-03-17 14:56:14 +0100
commit7f68c86d93d5f69d775bceb3941b3a3b46672eb1 (patch)
treeb461a335b70f8d07bda55ab1e3cc54fbd568a097 /net-vpn/badvpn
parentdev-ruby/nexpose: Initial version (diff)
downloadgentoo-7f68c86d93d5f69d775bceb3941b3a3b46672eb1.tar.gz
gentoo-7f68c86d93d5f69d775bceb3941b3a3b46672eb1.tar.bz2
gentoo-7f68c86d93d5f69d775bceb3941b3a3b46672eb1.zip
Move VPN packages into net-vpn/
Diffstat (limited to 'net-vpn/badvpn')
-rw-r--r--net-vpn/badvpn/Manifest5
-rw-r--r--net-vpn/badvpn/badvpn-1.999.126.ebuild91
-rw-r--r--net-vpn/badvpn/badvpn-1.999.127.ebuild92
-rw-r--r--net-vpn/badvpn/badvpn-1.999.128.ebuild92
-rw-r--r--net-vpn/badvpn/badvpn-1.999.129.ebuild92
-rw-r--r--net-vpn/badvpn/badvpn-1.999.130.ebuild84
-rw-r--r--net-vpn/badvpn/files/badvpn-1.999.127-ncd.init24
-rw-r--r--net-vpn/badvpn/files/badvpn-ncd.conf11
-rw-r--r--net-vpn/badvpn/files/badvpn-ncd.init48
-rw-r--r--net-vpn/badvpn/files/badvpn-ncd.service11
-rw-r--r--net-vpn/badvpn/files/badvpn-server.conf11
-rw-r--r--net-vpn/badvpn/files/badvpn-server.init48
-rw-r--r--net-vpn/badvpn/metadata.xml40
13 files changed, 649 insertions, 0 deletions
diff --git a/net-vpn/badvpn/Manifest b/net-vpn/badvpn/Manifest
new file mode 100644
index 000000000000..7e8dc8fbecf9
--- /dev/null
+++ b/net-vpn/badvpn/Manifest
@@ -0,0 +1,5 @@
+DIST badvpn-1.999.126.tar.bz2 936233 SHA256 188440a6d2fa575162f65baf4b8a2645d6fda71ef1a20794ec0be42a3053f2ff SHA512 3d0bbe3c8f91a3cb758b78a0fce4fd111f93fa0578ce06f0a8db5cc575d02f52248b37e7fa097447589257e47084a607a9df7078448ef44ae9fb66eb59e8b9e2 WHIRLPOOL 6767bc359c92d85d91f7b32d15c17bd0f33dcaa36716d8cc3b87eb59a110d7d26d91b38145e9f47cce3950f49470756ade29c6768b956f27108fff143248ac79
+DIST badvpn-1.999.127.tar.bz2 962224 SHA256 d20c79d69a7aa9eac1e0bf9a52fb9c9cdca78be123b6d17d59ff277f282e7943 SHA512 7484a817795392a52b44d3bf68765652739029aae8c16965b433bbfb4ca67ea70048f76376ba445196aac07a8f19f97696917ad24fe2bcb34025adda1f18a9fb WHIRLPOOL a3030691d50add2f76854b3a4c3cd1a66c3d3c53b0780c592e0a7337907c7d253a4ea552c57c26e03abc0adf5c4d2f416b18a3e74bc3a6af9b9182927cd721f5
+DIST badvpn-1.999.128.tar.bz2 1000636 SHA256 d6b28d5d566470dd1b0584b14b7ffab8159e4f604c1facbf9ef3a3ddbc0c9bfc SHA512 7d59e8365c10e7164c6c74b95d5f212ae0c480870bea31a6fb4ed25883f28bb6365e09a9271a9ecedccccd886e5f5e50a6f6df406ee3c40fad40031bbd3f049b WHIRLPOOL 5541a8d91a48f69fb5646451c276d0dd8844e508f9a33d553f08c5aabbe2c6d5bab8bd6073829641facec861d507cfce7c346497bc3f321033dd46c036f719d9
+DIST badvpn-1.999.129.tar.gz 1327123 SHA256 f4fd6fef72203acee10af7d7a6198f6f5fdfc00d9607f0924f6ebae84d570f1d SHA512 7a305198d7b4aaa31e567ff1f1bf23e0a65070d8eae78e7ed6be1a3a3b7bce7fcba32c0eb8ae549ef1851a61675afc1770f52dedf131658036b7b6414fdd4e4e WHIRLPOOL 821a4228ff1f3e2fbc5af7db07536ffeeed7c35ad6a9238948f3c9b350ddf556fbc69e036ce08ed2bc9c7c805b653ff1532c336b37b67acb40ccf41e7bacb6a2
+DIST badvpn-1.999.130.tar.gz 1340372 SHA256 bfd4bbfebd7274bcec792558c9a2fd60e39cd92e04673825ade5d04154766109 SHA512 958d6f3b7a8074fa7ba2f26812c9b2c39272b75d762a12a821ad2d0db9cdc9b9307338d77ca0dcadcf57b81fa4632362e67524de4246d01829951e8924a89770 WHIRLPOOL 77bf158eb4624301a7ecc3f17583faf3525d8ff165478535d6f9d33b42d4e50906ede42a8dea4454bb06b6845a20aa3127649ba0ceaf08e0e04fe9839de7184c
diff --git a/net-vpn/badvpn/badvpn-1.999.126.ebuild b/net-vpn/badvpn/badvpn-1.999.126.ebuild
new file mode 100644
index 000000000000..56e19578c566
--- /dev/null
+++ b/net-vpn/badvpn/badvpn-1.999.126.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils cmake-utils user toolchain-funcs
+
+MY_P=${PN}-${PV/_rc/rc}
+DESCRIPTION="Peer-to-peer VPN, NCD scripting language, tun2socks proxifier"
+HOMEPAGE="https://code.google.com/p/badvpn/"
+SRC_URI="https://badvpn.googlecode.com/files/${MY_P}.tar.bz2"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~arm ~x86"
+SLOT="0"
+TARGETS="+client +ncd +server +tun2socks +udpgw"
+IUSE="${TARGETS} debug"
+# tests are only ncd related
+RESTRICT="!ncd? ( test )"
+
+COMMON_DEPEND="
+ client? (
+ dev-libs/nspr
+ dev-libs/nss
+ dev-libs/openssl
+ )
+ server? (
+ dev-libs/nspr
+ dev-libs/nss
+ dev-libs/openssl
+ )
+ ncd? (
+ dev-libs/openssl
+ )"
+RDEPEND="${COMMON_DEPEND}
+ ncd? (
+ sys-apps/iproute2
+ >=virtual/udev-171
+ )"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+# we need at least one target
+REQUIRED_USE="|| ( ${TARGETS//+/} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewuser ${PN}
+}
+
+src_prepare() {
+ # allow user to easily apply patches
+ epatch_user
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_NOTHING_BY_DEFAULT=1
+ $(cmake-utils_use_build client CLIENT)
+ $(cmake-utils_use_build server SERVER)
+ $(cmake-utils_use_build ncd NCD)
+ $(cmake-utils_use_build tun2socks TUN2SOCKS)
+ $(cmake-utils_use_build udpgw UDPGW)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ # OOHMSA: do this on portage level?
+ tc-is-cross-compiler && die "these tests do not work when cross compiling!"
+
+ einfo "Running NCD tests"
+ cd "${S}"/ncd/tests || die
+ bash ./run_tests "${CMAKE_BUILD_DIR}/ncd/badvpn-ncd" \
+ || die "one or more tests failed"
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc ChangeLog
+
+ if use server; then
+ newinitd "${FILESDIR}"/${PN}-server.init ${PN}-server
+ newconfd "${FILESDIR}"/${PN}-server.conf ${PN}-server
+ fi
+
+ if use ncd; then
+ newinitd "${FILESDIR}"/${PN}-ncd.init ${PN}-ncd
+ newconfd "${FILESDIR}"/${PN}-ncd.conf ${PN}-ncd
+ fi
+}
diff --git a/net-vpn/badvpn/badvpn-1.999.127.ebuild b/net-vpn/badvpn/badvpn-1.999.127.ebuild
new file mode 100644
index 000000000000..f8b68ce72105
--- /dev/null
+++ b/net-vpn/badvpn/badvpn-1.999.127.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils cmake-utils user toolchain-funcs systemd
+
+MY_P=${PN}-${PV/_rc/rc}
+DESCRIPTION="Peer-to-peer VPN, NCD scripting language, tun2socks proxifier"
+HOMEPAGE="https://code.google.com/p/badvpn/"
+SRC_URI="https://badvpn.googlecode.com/files/${MY_P}.tar.bz2"
+
+LICENSE="BSD"
+KEYWORDS="amd64 arm x86"
+SLOT="0"
+TARGETS="+client +ncd +server +tun2socks +udpgw"
+IUSE="${TARGETS} debug"
+# tests are only ncd related
+RESTRICT="!ncd? ( test )"
+
+COMMON_DEPEND="
+ client? (
+ dev-libs/nspr
+ dev-libs/nss
+ dev-libs/openssl
+ )
+ server? (
+ dev-libs/nspr
+ dev-libs/nss
+ dev-libs/openssl
+ )
+ ncd? (
+ dev-libs/openssl
+ )"
+RDEPEND="${COMMON_DEPEND}
+ ncd? (
+ sys-apps/iproute2
+ >=virtual/udev-171
+ )"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+# we need at least one target
+REQUIRED_USE="|| ( ${TARGETS//+/} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewuser ${PN}
+}
+
+src_prepare() {
+ # allow user to easily apply patches
+ epatch_user
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_NOTHING_BY_DEFAULT=1
+ $(cmake-utils_use_build client CLIENT)
+ $(cmake-utils_use_build server SERVER)
+ $(cmake-utils_use_build ncd NCD)
+ $(cmake-utils_use_build tun2socks TUN2SOCKS)
+ $(cmake-utils_use_build udpgw UDPGW)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ # OOHMSA: do this on portage level?
+ tc-is-cross-compiler && die "these tests do not work when cross compiling!"
+
+ einfo "Running NCD tests"
+ cd "${S}"/ncd/tests || die
+ bash ./run_tests "${CMAKE_BUILD_DIR}/ncd/badvpn-ncd" \
+ || die "one or more tests failed"
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc ChangeLog
+
+ if use server; then
+ newinitd "${FILESDIR}"/${PN}-server.init ${PN}-server
+ newconfd "${FILESDIR}"/${PN}-server.conf ${PN}-server
+ fi
+
+ if use ncd; then
+ newinitd "${FILESDIR}"/${P}-ncd.init ${PN}-ncd
+ newconfd "${FILESDIR}"/${PN}-ncd.conf ${PN}-ncd
+ systemd_dounit "${FILESDIR}"/badvpn-ncd.service
+ fi
+}
diff --git a/net-vpn/badvpn/badvpn-1.999.128.ebuild b/net-vpn/badvpn/badvpn-1.999.128.ebuild
new file mode 100644
index 000000000000..879722ef31ba
--- /dev/null
+++ b/net-vpn/badvpn/badvpn-1.999.128.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils cmake-utils user toolchain-funcs systemd
+
+MY_P=${PN}-${PV/_rc/rc}
+DESCRIPTION="Peer-to-peer VPN, NCD scripting language, tun2socks proxifier"
+HOMEPAGE="https://code.google.com/p/badvpn/"
+SRC_URI="https://badvpn.googlecode.com/files/${MY_P}.tar.bz2"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~arm ~x86"
+SLOT="0"
+TARGETS="+client +ncd +server +tun2socks +udpgw"
+IUSE="${TARGETS} debug"
+# tests are only ncd related
+RESTRICT="!ncd? ( test )"
+
+COMMON_DEPEND="
+ client? (
+ dev-libs/nspr
+ dev-libs/nss
+ dev-libs/openssl
+ )
+ server? (
+ dev-libs/nspr
+ dev-libs/nss
+ dev-libs/openssl
+ )
+ ncd? (
+ dev-libs/openssl
+ )"
+RDEPEND="${COMMON_DEPEND}
+ ncd? (
+ sys-apps/iproute2
+ >=virtual/udev-171
+ )"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+# we need at least one target
+REQUIRED_USE="|| ( ${TARGETS//+/} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewuser ${PN}
+}
+
+src_prepare() {
+ # allow user to easily apply patches
+ epatch_user
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_NOTHING_BY_DEFAULT=1
+ $(cmake-utils_use_build client CLIENT)
+ $(cmake-utils_use_build server SERVER)
+ $(cmake-utils_use_build ncd NCD)
+ $(cmake-utils_use_build tun2socks TUN2SOCKS)
+ $(cmake-utils_use_build udpgw UDPGW)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ # OOHMSA: do this on portage level?
+ tc-is-cross-compiler && die "these tests do not work when cross compiling!"
+
+ einfo "Running NCD tests"
+ cd "${S}"/ncd/tests || die
+ bash ./run_tests "${CMAKE_BUILD_DIR}/ncd/badvpn-ncd" \
+ || die "one or more tests failed"
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc ChangeLog
+
+ if use server; then
+ newinitd "${FILESDIR}"/${PN}-server.init ${PN}-server
+ newconfd "${FILESDIR}"/${PN}-server.conf ${PN}-server
+ fi
+
+ if use ncd; then
+ newinitd "${FILESDIR}"/${PN}-1.999.127-ncd.init ${PN}-ncd
+ newconfd "${FILESDIR}"/${PN}-ncd.conf ${PN}-ncd
+ systemd_dounit "${FILESDIR}"/badvpn-ncd.service
+ fi
+}
diff --git a/net-vpn/badvpn/badvpn-1.999.129.ebuild b/net-vpn/badvpn/badvpn-1.999.129.ebuild
new file mode 100644
index 000000000000..6183228f2ab0
--- /dev/null
+++ b/net-vpn/badvpn/badvpn-1.999.129.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils cmake-utils user toolchain-funcs systemd
+
+MY_P=${PN}-${PV/_rc/rc}
+DESCRIPTION="Peer-to-peer VPN, NCD scripting language, tun2socks proxifier"
+HOMEPAGE="https://github.com/ambrop72/badvpn https://code.google.com/p/badvpn/"
+SRC_URI="https://github.com/ambrop72/badvpn/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="amd64 ~arm x86"
+SLOT="0"
+TARGETS="+client +ncd +server +tun2socks +udpgw"
+IUSE="${TARGETS} debug"
+# tests are only ncd related
+RESTRICT="!ncd? ( test )"
+
+COMMON_DEPEND="
+ client? (
+ dev-libs/nspr
+ dev-libs/nss
+ dev-libs/openssl
+ )
+ server? (
+ dev-libs/nspr
+ dev-libs/nss
+ dev-libs/openssl
+ )
+ ncd? (
+ dev-libs/openssl
+ )"
+RDEPEND="${COMMON_DEPEND}
+ ncd? (
+ sys-apps/iproute2
+ >=virtual/udev-171
+ )"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+# we need at least one target
+REQUIRED_USE="|| ( ${TARGETS//+/} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewuser ${PN}
+}
+
+src_prepare() {
+ # allow user to easily apply patches
+ epatch_user
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_NOTHING_BY_DEFAULT=1
+ $(cmake-utils_use_build client CLIENT)
+ $(cmake-utils_use_build server SERVER)
+ $(cmake-utils_use_build ncd NCD)
+ $(cmake-utils_use_build tun2socks TUN2SOCKS)
+ $(cmake-utils_use_build udpgw UDPGW)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ # OOHMSA: do this on portage level?
+ tc-is-cross-compiler && die "these tests do not work when cross compiling!"
+
+ einfo "Running NCD tests"
+ cd "${S}"/ncd/tests || die
+ bash ./run_tests "${CMAKE_BUILD_DIR}/ncd/badvpn-ncd" \
+ || die "one or more tests failed"
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc ChangeLog
+
+ if use server; then
+ newinitd "${FILESDIR}"/${PN}-server.init ${PN}-server
+ newconfd "${FILESDIR}"/${PN}-server.conf ${PN}-server
+ fi
+
+ if use ncd; then
+ newinitd "${FILESDIR}"/${PN}-1.999.127-ncd.init ${PN}-ncd
+ newconfd "${FILESDIR}"/${PN}-ncd.conf ${PN}-ncd
+ systemd_dounit "${FILESDIR}"/badvpn-ncd.service
+ fi
+}
diff --git a/net-vpn/badvpn/badvpn-1.999.130.ebuild b/net-vpn/badvpn/badvpn-1.999.130.ebuild
new file mode 100644
index 000000000000..8fc6bb47aa1e
--- /dev/null
+++ b/net-vpn/badvpn/badvpn-1.999.130.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils cmake-utils user toolchain-funcs systemd
+
+MY_P=${PN}-${PV/_rc/rc}
+DESCRIPTION="Peer-to-peer VPN, NCD scripting language, tun2socks proxifier"
+HOMEPAGE="https://github.com/ambrop72/badvpn https://code.google.com/p/badvpn/"
+SRC_URI="https://github.com/ambrop72/badvpn/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~arm ~x86"
+SLOT="0"
+TARGETS="+client +ncd +server +tun2socks +udpgw"
+IUSE="${TARGETS} debug"
+# tests are only ncd related
+RESTRICT="!ncd? ( test )"
+
+COMMON_DEPEND="
+ client? (
+ dev-libs/nspr
+ dev-libs/nss
+ dev-libs/openssl:0
+ )
+ server? (
+ dev-libs/nspr
+ dev-libs/nss
+ dev-libs/openssl:0
+ )"
+RDEPEND="${COMMON_DEPEND}
+ ncd? (
+ sys-apps/iproute2
+ >=virtual/udev-171
+ )"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+# we need at least one target
+REQUIRED_USE="|| ( ${TARGETS//+/} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewuser ${PN}
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_NOTHING_BY_DEFAULT=1
+ $(cmake-utils_use_build client CLIENT)
+ $(cmake-utils_use_build server SERVER)
+ $(cmake-utils_use_build ncd NCD)
+ $(cmake-utils_use_build tun2socks TUN2SOCKS)
+ $(cmake-utils_use_build udpgw UDPGW)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ # OOHMSA: do this on portage level?
+ tc-is-cross-compiler && die "these tests do not work when cross compiling!"
+
+ einfo "Running NCD tests"
+ cd "${S}"/ncd/tests || die
+ bash ./run_tests "${CMAKE_BUILD_DIR}/ncd/badvpn-ncd" \
+ || die "one or more tests failed"
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc ChangeLog
+
+ if use server; then
+ newinitd "${FILESDIR}"/${PN}-server.init ${PN}-server
+ newconfd "${FILESDIR}"/${PN}-server.conf ${PN}-server
+ fi
+
+ if use ncd; then
+ newinitd "${FILESDIR}"/${PN}-1.999.127-ncd.init ${PN}-ncd
+ newconfd "${FILESDIR}"/${PN}-ncd.conf ${PN}-ncd
+ systemd_dounit "${FILESDIR}"/badvpn-ncd.service
+ fi
+}
diff --git a/net-vpn/badvpn/files/badvpn-1.999.127-ncd.init b/net-vpn/badvpn/files/badvpn-1.999.127-ncd.init
new file mode 100644
index 000000000000..69f7ba45992a
--- /dev/null
+++ b/net-vpn/badvpn/files/badvpn-1.999.127-ncd.init
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Released under the 3-clause BSD license.
+
+command="${ncd_exec:-"/usr/bin/badvpn-ncd"}"
+command_args="${ncd_args} --config-file ${ncd_config:-/etc/ncd.conf}"
+command_background="YES"
+description="Network Configuration Daemon"
+pidfile="/var/run/${RC_SVCNAME}.pid"
+
+depend() {
+ need localmount
+ after bootmisc
+ before netmount
+}
+
+start_pre() {
+ if yesno "${ncd_syslog:-NO}"; then
+ command_args="${command_args}
+ --logger syslog
+ --syslog-ident \"${ncd_syslog_ident:-${RC_SVCNAME}}\"
+ --channel-loglevel ncd_log_msg info"
+ fi
+}
diff --git a/net-vpn/badvpn/files/badvpn-ncd.conf b/net-vpn/badvpn/files/badvpn-ncd.conf
new file mode 100644
index 000000000000..ad34c66f7ca3
--- /dev/null
+++ b/net-vpn/badvpn/files/badvpn-ncd.conf
@@ -0,0 +1,11 @@
+# NCD program file.
+#ncd_config="/etc/ncd.conf"
+
+# enable or disable syslog.
+#ncd_syslog="NO"
+
+# Syslog identification.
+#ncd_syslog_ident="ncd"
+
+# Additional arguments.
+#ncd_args=""
diff --git a/net-vpn/badvpn/files/badvpn-ncd.init b/net-vpn/badvpn/files/badvpn-ncd.init
new file mode 100644
index 000000000000..e408075128a4
--- /dev/null
+++ b/net-vpn/badvpn/files/badvpn-ncd.init
@@ -0,0 +1,48 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Released under the 3-clause BSD license.
+
+command="${ncd_exec:-"/usr/bin/badvpn-ncd"}"
+command_args="${ncd_args} --config-file ${ncd_config:-/etc/ncd.conf}"
+command_background="YES"
+description="Network Configuration Daemon"
+pidfile="/var/run/${RC_SVCNAME}.pid"
+
+depend() {
+ need localmount
+ after bootmisc
+ before netmount
+ if yesno "${ncd_syslog:-NO}"; then
+ use logger
+ fi
+}
+
+start_pre() {
+ if yesno "${ncd_syslog:-NO}"; then
+ command_args="${command_args}
+ --logger syslog
+ --syslog-ident \"${ncd_syslog_ident:-${RC_SVCNAME}}\""
+ fi
+}
+
+start()
+{
+ [ -n "$command" ] || return 0
+ local _background=
+ ebegin "Starting ${name:-$RC_SVCNAME}"
+ if yesno "${command_background}"; then
+ if [ -z "${pidfile}" ]; then
+ eend 1 "command_background option used but no pidfile specified"
+ return 1
+ fi
+ _background="--background --make-pidfile"
+ fi
+ eval start-stop-daemon --start \
+ --exec $command \
+ ${procname:+--name} $procname \
+ ${pidfile:+--pidfile} $pidfile \
+ $_background $start_stop_daemon_args \
+ -- $command_args
+ eend $? "Failed to start $RC_SVCNAME"
+ return $?
+}
diff --git a/net-vpn/badvpn/files/badvpn-ncd.service b/net-vpn/badvpn/files/badvpn-ncd.service
new file mode 100644
index 000000000000..6ca7aa515e00
--- /dev/null
+++ b/net-vpn/badvpn/files/badvpn-ncd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Network Configuation Daemon
+After=syslog.target
+
+[Service]
+ExecStart=/usr/bin/badvpn-ncd --logger syslog --syslog-ident ncd --loglevel warning --channel-loglevel ncd_log_msg info /etc/ncd.conf
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/net-vpn/badvpn/files/badvpn-server.conf b/net-vpn/badvpn/files/badvpn-server.conf
new file mode 100644
index 000000000000..ed5103d3d0ef
--- /dev/null
+++ b/net-vpn/badvpn/files/badvpn-server.conf
@@ -0,0 +1,11 @@
+# User account to run server as.
+#vpn_user="badvpn"
+
+# Enable or disable syslog.
+#vpn_syslog="NO"
+
+# Syslog identification.
+#vpn_syslog_ident="badvpn-server"
+
+# Arguments to badvpn-server.
+vpn_args="--listen-addr 0.0.0.0:7179"
diff --git a/net-vpn/badvpn/files/badvpn-server.init b/net-vpn/badvpn/files/badvpn-server.init
new file mode 100644
index 000000000000..32ee7fefe33e
--- /dev/null
+++ b/net-vpn/badvpn/files/badvpn-server.init
@@ -0,0 +1,48 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Released under the 3-clause BSD license.
+
+command="${vpn_exec:-/usr/bin/badvpn-server}"
+command_args="${vpn_args}"
+command_background="YES"
+description="BadVPN server"
+pidfile="/var/run/${RC_SVCNAME}.pid"
+start_stop_daemon_args="--user \"${vpn_user:-badvpn}\""
+
+depend() {
+ need localmount
+ after bootmisc
+ if yesno "${vpn_syslog:-NO}"; then
+ use logger
+ fi
+}
+
+start_pre() {
+ if yesno "${vpn_syslog:-NO}"; then
+ command_args="${command_args}
+ --logger syslog
+ --syslog-ident \"${vpn_syslog_ident:-${RC_SVCNAME}}\""
+ fi
+}
+
+start()
+{
+ [ -n "$command" ] || return 0
+ local _background=
+ ebegin "Starting ${name:-$RC_SVCNAME}"
+ if yesno "${command_background}"; then
+ if [ -z "${pidfile}" ]; then
+ eend 1 "command_background option used but no pidfile specified"
+ return 1
+ fi
+ _background="--background --make-pidfile"
+ fi
+ eval start-stop-daemon --start \
+ --exec $command \
+ ${procname:+--name} $procname \
+ ${pidfile:+--pidfile} $pidfile \
+ $_background $start_stop_daemon_args \
+ -- $command_args
+ eend $? "Failed to start $RC_SVCNAME"
+ return $?
+}
diff --git a/net-vpn/badvpn/metadata.xml b/net-vpn/badvpn/metadata.xml
new file mode 100644
index 000000000000..e2a7803599c3
--- /dev/null
+++ b/net-vpn/badvpn/metadata.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>williamh@gentoo.org</email>
+ <description>backup Maintainer, CC him on bugs</description>
+ </maintainer>
+ <upstream>
+ <maintainer status="active">
+ <email>ambrop7@gmail.com</email>
+ <name>Ambroz Bizjak</name>
+ </maintainer>
+ <doc lang="en">https://code.google.com/p/badvpn/w/list</doc>
+ <bugs-to>https://github.com/ambrop72/badvpn/issues</bugs-to>
+ <remote-id type="github">ambrop72/badvpn</remote-id>
+ <remote-id type="google-code">badvpn</remote-id>
+ </upstream>
+ <use>
+ <flag name="client">Build the badvpn-client program, a daemon that
+ runs on endpoints of the VPN.</flag>
+ <flag name="server">Build the badvpn-server program, a central
+ server that manages the VPN network.</flag>
+ <flag name="ncd">Build NCD, a lightweight scripting language
+ especially suited for network configurations.</flag>
+ <flag name="tun2socks">Build tun2socks, a program which implements
+ a TUN device that forwards TCP traffic through a SOCKS5
+ server.</flag>
+ <flag name="udpgw">Build udpgw, a small daemon which allows tun2socks to forward UDP traffic.</flag> </use>
+ <longdescription lang="en">
+ BadVPN is an open-source peer-to-peer VPN system. It provides a
+ Layer 2 (Ethernet) network between the peers (VPN nodes). The peers
+ connect to a central server which acts as a chat server for them to
+ establish direct connections between each other (data connections).
+ These connections are used for transferring network data (Ethernet
+ frames), and can be secured with a multitude of mechanisms.
+
+ The BadVPN package also includes other network-related software,
+ like tun2socks and NCD.
+ </longdescription>
+</pkgmetadata>