summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Ospald <hasufell@gentoo.org>2012-08-13 10:40:22 +0000
committerJulian Ospald <hasufell@gentoo.org>2012-08-13 10:40:22 +0000
commit724798a417a38105182354e2556eaab25ee67fb4 (patch)
tree135643bb4df3914b86e1f32ca4fc91b8b89f22e5 /net-misc/badvpn
parentStable for x86, wrt bug #429592 (diff)
downloadgentoo-2-724798a417a38105182354e2556eaab25ee67fb4.tar.gz
gentoo-2-724798a417a38105182354e2556eaab25ee67fb4.tar.bz2
gentoo-2-724798a417a38105182354e2556eaab25ee67fb4.zip
initial commit with Ambroz Bizjak
(Portage version: 2.2.0_alpha121/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/badvpn')
-rw-r--r--net-misc/badvpn/ChangeLog11
-rw-r--r--net-misc/badvpn/Manifest8
-rw-r--r--net-misc/badvpn/badvpn-1.999.123.ebuild82
-rw-r--r--net-misc/badvpn/files/badvpn-ncd.conf8
-rw-r--r--net-misc/badvpn/files/badvpn-ncd.init50
-rw-r--r--net-misc/badvpn/files/badvpn-server.conf13
-rw-r--r--net-misc/badvpn/files/badvpn-server.init43
-rw-r--r--net-misc/badvpn/metadata.xml45
8 files changed, 260 insertions, 0 deletions
diff --git a/net-misc/badvpn/ChangeLog b/net-misc/badvpn/ChangeLog
new file mode 100644
index 000000000000..40ed16f2b46d
--- /dev/null
+++ b/net-misc/badvpn/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for net-misc/badvpn
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/badvpn/ChangeLog,v 1.1 2012/08/13 10:40:22 hasufell Exp $
+
+*badvpn-1.999.123 (13 Aug 2012)
+
+ 13 Aug 2012; Julian Ospald <hasufell@gentoo.org> +badvpn-1.999.123.ebuild,
+ +files/badvpn-ncd.conf, +files/badvpn-ncd.init, +files/badvpn-server.conf,
+ +files/badvpn-server.init, +metadata.xml:
+ initial commit with Ambroz Bizjak
+
diff --git a/net-misc/badvpn/Manifest b/net-misc/badvpn/Manifest
new file mode 100644
index 000000000000..eaf195bc2539
--- /dev/null
+++ b/net-misc/badvpn/Manifest
@@ -0,0 +1,8 @@
+AUX badvpn-ncd.conf 165 SHA256 8f5ee9eb2a2269ac6d5cfb8c38977ccb49cf3d5c66c35a8318842686a0bd74f0 SHA512 9e5254259999bca33f64325d9928fca85c2ce77d18b3be208b5ec6e8ebaa9ad58835db8d2daf80e1563088e94b2293fb7c155d87c1a493d956e74be68d9235cc WHIRLPOOL 33f4c9a80935a7fa6ed9610e5d810d0f685a1c5b64770afce997d67d5d18e0f8c506bf61d52b441de769b3f2728938b64e3a21ab75c379dfce8c814d6dfa8acc
+AUX badvpn-ncd.init 915 SHA256 fe79a46d94b7bba0a4b0054d7c7f1e9967a503e0a978cdc4e3083834367cebb4 SHA512 d51a6eb45bf430b7a02dbd9db545eefc9a1c5c420e3c9d100837db8b8f083ecfe51e0343d96ff2b41fc7e81d46008e504d2ac742266347669750d516f81bcf96 WHIRLPOOL 6d869fd81285ccae090cc62f699968d4ac69a522e391be59748c764e94857e35ce23ea436b55cb496d73a1fc9c7293892681eea0d7adf13c5d14d7104e99a01c
+AUX badvpn-server.conf 309 SHA256 84cfbea8aabec8ae9bc222a9b8f4c4ddc2005a134538fb5a70e94799594a3ab1 SHA512 00f1a0df97d8e89a6bed181baf3c7431a3b021965bd827aceb5a9283d0fac69ede4e4d4ba1e68464810865ba2bf206df1ec62f0581b23323bc6e1b371c42dcd8 WHIRLPOOL 12fc7f3a096df5ee1f681af704c469813a9721e8fad813d122e0973c3a6757305ef8f1fd957d5ecca5b9a60c90a25c9a963151dbc3ced23d54e3cc9b467b280d
+AUX badvpn-server.init 855 SHA256 cf54da7332fabc5f7286fad24afaa1f564c637ac005d2a35125f90a312be4577 SHA512 70091e2b403ee9df645e988e4fcbd367921c757cddd49a8bedce9f34948a09779ee990cf74b9eff282f874d24d6db68543cacec4cd2bc07e040a33a5da834643 WHIRLPOOL ca54462b791ce7d5877a475a9727b8d4a0f2c368a26e728448ea8f5a37d31f01c48a6bf7f44b8810d607767d571c4731f56788e41dd6c712bf1eaf82eacfe6ad
+DIST badvpn-1.999.123.tar.bz2 905823 SHA256 e971ec1c093da2ada77d14592ceefcd263ae2831ff95a3da8ee55a13495abb40 SHA512 24e591aeb907f3e5249e1b01ce62fb18a7e60898952b874ada633fa4ac31c1b456184245a67563f6977f080f9ae93da5c39049948b2eecc1e526b0c0c366b6d1 WHIRLPOOL d2440a8c427cb7c25e493fba7e9320e2ac201e9b82b6cb5f08a752b77c2121efe70694e317eff1c1c90da50e398b341e1e6bf9469f57c19a5ab9861d5a2531c8
+EBUILD badvpn-1.999.123.ebuild 1660 SHA256 3a9ea179348f46bf9b30acd04a065512ef563d37a82f4a0d8e1aae512e1b5458 SHA512 0986494cfcef03bbb9cdff58a18cc6bf28b39afae7fa23311c2803bcc58e4f4df453e9a6a28cb6787dd648608f1b959ebf59c2626c44e7f1289c37f3edb9a6f4 WHIRLPOOL 8313a2f17a73e32ad869e5a4c8a63bbdaacc814a379731b3ceaf574e01e7d551f037b6e993ede8f69391fd5d98c46cfb48fc4ebd9655a6f4cb8c6d644f13a7df
+MISC ChangeLog 384 SHA256 95f8c5c7b82b376b1bbc884f8fd0fa5f7f9467d17d16304674099714b577468c SHA512 6a2585b503ed9a6f4068e6e4df63890755c6f92f439f28ad8d017b348caada54367b1dfd28cb98c9b4cd9f54175641f844331bb083a5899c6d77f00c3088fe3f WHIRLPOOL f4c9bd08b45f23180ee7510301ff9fc4b3c8595a888cade9e185bc4c57c0d60b4ed47d15e8d2d80999fb5d2d0bc1065b0c08a17553da6c5d0fcecbc4c6c9d147
+MISC metadata.xml 1921 SHA256 6f1002fcdd6246b227b9ca0df7035183a15b4d30e6cfed076fc088fe0fcf2377 SHA512 ea979f2e838f1eef48308adf12e82f2f6f6c27a7fc575f7539a2d403926f3e291b6753efd829503007948c1d186ff669949b6c3aa86cd9b093c80d6205a51054 WHIRLPOOL f88b01ed28067f73140060b38691d4ff912002a5e59c0b928c86dc76eff36a9f50f5a73a6197240e41665df623035fa3ec8ffb679dcff492e8a2a8297663eb79
diff --git a/net-misc/badvpn/badvpn-1.999.123.ebuild b/net-misc/badvpn/badvpn-1.999.123.ebuild
new file mode 100644
index 000000000000..2b45dc10fc16
--- /dev/null
+++ b/net-misc/badvpn/badvpn-1.999.123.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/badvpn/badvpn-1.999.123.ebuild,v 1.1 2012/08/13 10:40:22 hasufell Exp $
+
+EAPI=4
+inherit eutils cmake-utils user
+
+MY_P=${PN}-${PV/_rc/rc}
+DESCRIPTION="Peer-to-peer VPN, NCD scripting language, tun2socks proxifier"
+HOMEPAGE="http://code.google.com/p/badvpn/"
+SRC_URI="http://badvpn.googlecode.com/files/${MY_P}.tar.bz2"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+TARGETS="+client +ncd +server +tun2socks +udpgw"
+IUSE="${TARGETS} debug"
+
+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? (
+ net-firewall/iptables
+ net-wireless/wpa_supplicant
+ sys-apps/iproute2
+ >=sys-fs/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_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-misc/badvpn/files/badvpn-ncd.conf b/net-misc/badvpn/files/badvpn-ncd.conf
new file mode 100644
index 000000000000..fd553e6a9b83
--- /dev/null
+++ b/net-misc/badvpn/files/badvpn-ncd.conf
@@ -0,0 +1,8 @@
+# NCD program file.
+NCD_CONFIG="/etc/ncd.conf"
+
+# Syslog identification. Use "none" to disable syslog.
+#VPN_SYSLOG_IDENT="ncd"
+
+# Additional arguments.
+#NCD_ARGS=()
diff --git a/net-misc/badvpn/files/badvpn-ncd.init b/net-misc/badvpn/files/badvpn-ncd.init
new file mode 100644
index 000000000000..6714faf91992
--- /dev/null
+++ b/net-misc/badvpn/files/badvpn-ncd.init
@@ -0,0 +1,50 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Released under the 3-clause BSD license.
+
+NCD_PIDFILE="/var/run/${SVCNAME}.pid"
+NCD_NAME=${NCD_NAME:-"Network Configuration Daemon"}
+NCD_SYSLOG_IDENT=${NCD_SYSLOG_IDENT:-"ncd"}
+NCD_EXEC=${NCD_EXEC:-"/usr/bin/badvpn-ncd"}
+
+depend() {
+ need net
+ after bootmisc
+ before netmount
+}
+
+start() {
+ ebegin "Starting ${NCD_NAME}"
+
+ local args=(
+ "${NCD_ARGS[@]}"
+ --config-file
+ "${NCD_CONFIG}"
+ )
+ if [ "$NCD_SYSLOG_IDENT" != "none" ]; then
+ args=(
+ "${args[@]}"
+ --logger syslog
+ --syslog-ident "$NCD_SYSLOG_IDENT"
+ )
+ fi
+
+ start-stop-daemon \
+ --start \
+ --pidfile "${NCD_PIDFILE}" \
+ --background \
+ --make-pidfile \
+ --exec "${NCD_EXEC}" -- "${args[@]}"
+
+ eend $? "Failed to start ${NCD_NAME}"
+}
+
+stop() {
+ ebegin "Stopping ${NCD_NAME}"
+
+ start-stop-daemon \
+ --stop \
+ --pidfile "${NCD_PIDFILE}"
+
+ eend $? "Failed to stop ${NCD_NAME}"
+}
diff --git a/net-misc/badvpn/files/badvpn-server.conf b/net-misc/badvpn/files/badvpn-server.conf
new file mode 100644
index 000000000000..6d2750a55826
--- /dev/null
+++ b/net-misc/badvpn/files/badvpn-server.conf
@@ -0,0 +1,13 @@
+# Name to print when starting/stopping, in case of multiple servers.
+#VPN_NAME="BadVPN server"
+
+# User account to run server as.
+VPN_USER="badvpn"
+
+# Syslog identification. Use "none" to disable syslog.
+#VPN_SYSLOG_IDENT="badvpn-server"
+
+# Arguments to badvpn-server.
+VPN_ARGS=(
+ --listen-addr 0.0.0.0:7179
+)
diff --git a/net-misc/badvpn/files/badvpn-server.init b/net-misc/badvpn/files/badvpn-server.init
new file mode 100644
index 000000000000..fc1a1d981279
--- /dev/null
+++ b/net-misc/badvpn/files/badvpn-server.init
@@ -0,0 +1,43 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Released under the 3-clause BSD license.
+
+VPN_PIDFILE="/var/run/${SVCNAME}.pid"
+VPN_NAME=${VPN_NAME:-"BadVPN server"}
+VPN_SYSLOG_IDENT=${VPN_SYSLOG_IDENT:-"badvpn-server"}
+VPN_EXEC=${VPN_EXEC:-"/usr/bin/badvpn-server"}
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting $VPN_NAME"
+ local args=("${VPN_ARGS[@]}")
+ if [ "$VPN_SYSLOG_IDENT" != "none" ]; then
+ args=(
+ "${args[@]}"
+ --logger syslog
+ --syslog-ident "$VPN_SYSLOG_IDENT"
+ )
+ fi
+ start-stop-daemon \
+ --start \
+ --pidfile "${VPN_PIDFILE}" \
+ --background \
+ --make-pidfile \
+ --user "${VPN_USER}" \
+ --exec "${VPN_EXEC}" -- "${args[@]}"
+
+ eend $? "Failed to start $VPN_NAME"
+}
+
+stop() {
+ ebegin "Stopping $VPN_NAME"
+
+ start-stop-daemon \
+ --stop \
+ --pidfile $VPN_PIDFILE
+
+ eend $? "Failed to stop $VPN_NAME"
+}
diff --git a/net-misc/badvpn/metadata.xml b/net-misc/badvpn/metadata.xml
new file mode 100644
index 000000000000..cba2e110cab7
--- /dev/null
+++ b/net-misc/badvpn/metadata.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hasufell@gentoo.org</email>
+ <name>Julian Ospald</name>
+ <description>Maintainer, assign bugs to him</description>
+ </maintainer>
+ <maintainer>
+ <email>ambrop7@gmail.com</email>
+ <name>Ambroz Bizjak</name>
+ <description>Proxy 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://code.google.com/p/badvpn/issues/list</bugs-to>
+ </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>
+