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/tinc
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/tinc')
-rw-r--r--net-vpn/tinc/Manifest5
-rw-r--r--net-vpn/tinc/files/tinc-1.1-fix-paths.patch44
-rw-r--r--net-vpn/tinc/files/tinc.networks13
-rw-r--r--net-vpn/tinc/files/tincd-r178
-rw-r--r--net-vpn/tinc/files/tincd-r278
-rw-r--r--net-vpn/tinc/files/tincd.conf20
-rw-r--r--net-vpn/tinc/files/tincd_at.service10
-rw-r--r--net-vpn/tinc/metadata.xml21
-rw-r--r--net-vpn/tinc/tinc-1.0.29.ebuild47
-rw-r--r--net-vpn/tinc/tinc-1.0.30.ebuild47
-rw-r--r--net-vpn/tinc/tinc-1.0.31.ebuild47
-rw-r--r--net-vpn/tinc/tinc-1.1_pre14-r3.ebuild97
12 files changed, 507 insertions, 0 deletions
diff --git a/net-vpn/tinc/Manifest b/net-vpn/tinc/Manifest
new file mode 100644
index 000000000000..c760c97d47a8
--- /dev/null
+++ b/net-vpn/tinc/Manifest
@@ -0,0 +1,5 @@
+DIST tinc-1.0.29.tar.gz 493335 SHA256 0357017c6ffbbe1b2088c28fa684d2b119afa1086f363c503d06e8f6faa72a78 SHA512 230f3ff4c86d9ebed6e350f3ec92e931d83f94e6b9c4821bec745dddc2d33997e776bf3cd2a8b9e261b2f0b2df2ed8b5406bfa40bae08696304f650de9f34ef3 WHIRLPOOL 9825337a4622bd9461c027767e701b3934ef422beb10a06b801e005549b7b2ff944d4609591667efc994d14b002db937658209a8eb9f363a868373ebfdd0603e
+DIST tinc-1.0.30.tar.gz 494699 SHA256 abc17e25afc1b9e74423c78fef586b11d503cbbbe5e4a2ed323870f4a82faa73 SHA512 2e98658eeb77ceaf2973f3b77cac0c31beecd1382dc6976461da55cf22e27469d30cf6b35d5b3ce489a1809f38e82635b24a86956d62ef34e28ec43b8d09d1e6 WHIRLPOOL bd37aa99b915e6075b0ec95589f11c3f63a6d6600b566c855735bda8312a0a7957224e4f11a6fb897308b540dd5a9ccd10a13d1d07d11a51200bbf833c823b5f
+DIST tinc-1.0.31.tar.gz 494877 SHA256 d3cbc82e6e07975a2ccc0b369d07e30fc3324e71e240dca8781ce9a4f629519b SHA512 ac694d4ceec19bddebd3d5b9f37eb703a4701b93f65a7bbcdbc0b364f2a4f8b116c85748d06ec7821474de5c4d434caf5448109a0846e15c4a96adb92a0fc622 WHIRLPOOL aec84cd59ca80ca806171003447f946073c8f99fd872eaef1e7fea9d423cd4905d554964920be802e0862f5ab8de7d9d7094792c30403af8b62abca12286e2b1
+DIST tinc-1.1-upstream-patches-1.tar.xz 17316 SHA256 2358b51678381a76ccc283eb04f14ad1ec426bbf2703d73f566f94dc52d17a9c SHA512 db71787e2edbfa8ca6288818536a36ee8fa158b400639ca9650d2d17a66b3968ab36d088e6dcbbf9524f3322166254ad1aad87db78b00dc64e0dc2a49ea7b44f WHIRLPOOL ed28917111cd0553ef75048c2b48b0499559e5a6ace77f49efb7d6d15743ba0d426477eeed9364bea6fba6e434442cf17d71ffb224acdd7da3b49792ff59bc09
+DIST tinc-1.1pre14.tar.gz 696109 SHA256 e349e78f0e0d10899b8ab51c285bdb96c5ee322e847dfcf6ac9e21036286221f SHA512 dfc54a91fd40826b108e9cbae43da42462eb51bb7ad16ac040cb1b262b5510eb6884b1f1dbe0541a3b1631213f70cc678593d1ba51ebdf150c3f6968030b9291 WHIRLPOOL 63c8229c667e461ad20c118d233a2abfe598cc95698b8c83e5f8b598657ca298ea0cdc20432ab2d084fd4a06129a5884e91eb445f4c7204be3798d1fb4dec2f8
diff --git a/net-vpn/tinc/files/tinc-1.1-fix-paths.patch b/net-vpn/tinc/files/tinc-1.1-fix-paths.patch
new file mode 100644
index 000000000000..519677dd5034
--- /dev/null
+++ b/net-vpn/tinc/files/tinc-1.1-fix-paths.patch
@@ -0,0 +1,44 @@
+diff -Naur tinc-1.1pre14.orig/src/names.c tinc-1.1pre14/src/names.c
+--- tinc-1.1pre14.orig/src/names.c 2016-04-17 12:08:41.000000000 -0400
++++ tinc-1.1pre14/src/names.c 2016-10-15 07:37:51.147064396 -0400
+@@ -86,36 +86,11 @@
+ if(!pidfilename)
+ xasprintf(&pidfilename, "%s" SLASH "pid", confbase);
+ #else
+- bool fallback = false;
+- if(daemon) {
+- if(access(LOCALSTATEDIR, R_OK | W_OK | X_OK))
+- fallback = true;
+- } else {
+- char fname[PATH_MAX];
+- snprintf(fname, sizeof fname, LOCALSTATEDIR SLASH "run" SLASH "%s.pid", identname);
+- if(access(fname, R_OK)) {
+- snprintf(fname, sizeof fname, "%s" SLASH "pid", confbase);
+- if(!access(fname, R_OK))
+- fallback = true;
+- }
+- }
++ if(!logfilename)
++ xasprintf(&logfilename, "/var/log" SLASH "%s.log", identname);
+
+- if(!fallback) {
+- if(!logfilename)
+- xasprintf(&logfilename, LOCALSTATEDIR SLASH "log" SLASH "%s.log", identname);
+-
+- if(!pidfilename)
+- xasprintf(&pidfilename, LOCALSTATEDIR SLASH "run" SLASH "%s.pid", identname);
+- } else {
+- if(!logfilename)
+- xasprintf(&logfilename, "%s" SLASH "log", confbase);
+-
+- if(!pidfilename) {
+- if(daemon)
+- logger(DEBUG_ALWAYS, LOG_WARNING, "Could not access " LOCALSTATEDIR SLASH " (%s), storing pid and socket files in %s" SLASH, strerror(errno), confbase);
+- xasprintf(&pidfilename, "%s" SLASH "pid", confbase);
+- }
+- }
++ if(!pidfilename)
++ xasprintf(&pidfilename, "/run" SLASH "%s.pid", identname);
+ #endif
+
+ if(!unixsocketname) {
diff --git a/net-vpn/tinc/files/tinc.networks b/net-vpn/tinc/files/tinc.networks
new file mode 100644
index 000000000000..e1844ce2ba24
--- /dev/null
+++ b/net-vpn/tinc/files/tinc.networks
@@ -0,0 +1,13 @@
+# file: /etc/conf.d/tinc.networks for /etc/init.d/tincd
+
+# In this file you define the tinc networks you want to connect to
+
+# USAGE:
+# you add a network to the init script by defining:
+# NETWORK: your_network_name
+#
+# if you want to connect to multiple VPN's just set them behind each other. e.g.
+# NETWORK: foo
+# NETWORK: bar
+#
+# this would join the network foo and the network bar.
diff --git a/net-vpn/tinc/files/tincd-r1 b/net-vpn/tinc/files/tincd-r1
new file mode 100644
index 000000000000..ecfb24a6a64f
--- /dev/null
+++ b/net-vpn/tinc/files/tincd-r1
@@ -0,0 +1,78 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="reload"
+
+NETS="/etc/conf.d/tinc.networks"
+DAEMON="/usr/sbin/tincd"
+
+depend() {
+ use logger dns
+ need net
+}
+
+checkconfig() {
+ if [ "${RC_SVCNAME}" = "tincd" ] ; then
+ ALL_NETNAME="$(awk '/^ *NETWORK:/ { print $2 }' "${NETS}")"
+ else
+ ALL_NETNAME="${RC_SVCNAME#*.}"
+ fi
+ # warn this if still not found
+ if [ -z "${ALL_NETNAME}" ] ; then
+ eerror "No VPN networks configured in ${NETS}"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ ebegin "Starting tinc VPN networks"
+ checkconfig || return 1
+ for NETNAME in ${ALL_NETNAME}
+ do
+ CONFIG="/etc/tinc/${NETNAME}/tinc.conf"
+ PIDFILE="/var/run/tinc.${NETNAME}.pid"
+ if [ ! -f "${CONFIG}" ]; then
+ eerror "Cannot start network ${NETNAME}."
+ eerror "Please set up ${CONFIG} !"
+ else
+ ebegin "Starting tinc network ${NETNAME}"
+ if [ "${SYSLOG}" = "yes" ]; then
+ LOG=""
+ else
+ LOG="--logfile=/var/log/tinc.${NETNAME}.log"
+ fi
+ start-stop-daemon --start --exec "${DAEMON}" --pidfile "${PIDFILE}" -- --net="${NETNAME}" ${LOG} --pidfile "${PIDFILE}" --debug="${DEBUG_LEVEL}" ${EXTRA_OPTS}
+ eend $?
+ fi
+ done
+}
+
+stop() {
+ ebegin "Stopping tinc VPN networks"
+ checkconfig || return 1
+ for NETNAME in ${ALL_NETNAME}
+ do
+ PIDFILE="/var/run/tinc.${NETNAME}.pid"
+ if [ -f "${PIDFILE}" ]; then
+ ebegin "Stopping tinc network ${NETNAME}"
+ start-stop-daemon --stop --pidfile "${PIDFILE}"
+ eend $?
+ fi
+ done
+}
+
+reload() {
+ ebegin "Reloading configuration for tinc VPN networks"
+ checkconfig || return 1
+ for NETNAME in ${ALL_NETNAME}
+ do
+ PIDFILE="/var/run/tinc.${NETNAME}.pid"
+ if [ -f "${PIDFILE}" ]; then
+ ebegin "Reloading tinc network ${NETNAME}"
+ start-stop-daemon --signal HUP --pidfile ${PIDFILE}
+ eend $?
+ fi
+ done
+}
diff --git a/net-vpn/tinc/files/tincd-r2 b/net-vpn/tinc/files/tincd-r2
new file mode 100644
index 000000000000..55728bec2c78
--- /dev/null
+++ b/net-vpn/tinc/files/tincd-r2
@@ -0,0 +1,78 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="reload"
+
+NETS="/etc/conf.d/tinc.networks"
+DAEMON="/usr/sbin/tincd"
+
+depend() {
+ use logger dns
+ need net
+}
+
+checkconfig() {
+ if [ "${RC_SVCNAME}" = "tincd" ] ; then
+ ALL_NETNAME="$(awk '/^ *NETWORK:/ { print $2 }' "${NETS}")"
+ else
+ ALL_NETNAME="${RC_SVCNAME#*.}"
+ fi
+ # warn this if still not found
+ if [ -z "${ALL_NETNAME}" ] ; then
+ eerror "No VPN networks configured in ${NETS}"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ ebegin "Starting tinc VPN networks"
+ checkconfig || return 1
+ for NETNAME in ${ALL_NETNAME}
+ do
+ CONFIG="/etc/tinc/${NETNAME}/tinc.conf"
+ PIDFILE="/run/tinc.${NETNAME}.pid"
+ if [ ! -f "${CONFIG}" ]; then
+ eerror "Cannot start network ${NETNAME}."
+ eerror "Please set up ${CONFIG} !"
+ else
+ ebegin "Starting tinc network ${NETNAME}"
+ if [ "${SYSLOG}" = "yes" ]; then
+ LOG=""
+ else
+ LOG="--logfile=/var/log/tinc.${NETNAME}.log"
+ fi
+ start-stop-daemon --start --exec "${DAEMON}" --pidfile "${PIDFILE}" -- --net="${NETNAME}" ${LOG} --pidfile "${PIDFILE}" --debug="${DEBUG_LEVEL}" ${EXTRA_OPTS}
+ eend $?
+ fi
+ done
+}
+
+stop() {
+ ebegin "Stopping tinc VPN networks"
+ checkconfig || return 1
+ for NETNAME in ${ALL_NETNAME}
+ do
+ PIDFILE="/run/tinc.${NETNAME}.pid"
+ if [ -f "${PIDFILE}" ]; then
+ ebegin "Stopping tinc network ${NETNAME}"
+ start-stop-daemon --stop --pidfile "${PIDFILE}"
+ eend $?
+ fi
+ done
+}
+
+reload() {
+ ebegin "Reloading configuration for tinc VPN networks"
+ checkconfig || return 1
+ for NETNAME in ${ALL_NETNAME}
+ do
+ PIDFILE="/run/tinc.${NETNAME}.pid"
+ if [ -f "${PIDFILE}" ]; then
+ ebegin "Reloading tinc network ${NETNAME}"
+ start-stop-daemon --signal HUP --pidfile ${PIDFILE}
+ eend $?
+ fi
+ done
+}
diff --git a/net-vpn/tinc/files/tincd.conf b/net-vpn/tinc/files/tincd.conf
new file mode 100644
index 000000000000..cedca60c42ad
--- /dev/null
+++ b/net-vpn/tinc/files/tincd.conf
@@ -0,0 +1,20 @@
+#rc_need="net.net"
+
+#If you want tincd to log to syslog, then set this to "yes"
+#Anything else and tincd will log to /var/log/tinc.NETNAME.log.
+SYSLOG="yes"
+
+#Set debug level, useful for error probe
+# 0 Quiet mode, only show starting/stopping of the daemon
+# 1 Show (dis)connects of other tinc daemons via TCP
+# 2 Show error messages received from other hosts
+# 2 Show status messages received from other hosts
+# 3 Show the requests that are sent/received
+# 4 Show contents of every request that is sent/received
+# 5 Show network traffic information
+# 6 Show contents of each packet that is being sent/received
+# 10 You have been warned
+DEBUG_LEVEL="0"
+
+#Extra Options, if you want addtional customization
+EXTRA_OPTS=""
diff --git a/net-vpn/tinc/files/tincd_at.service b/net-vpn/tinc/files/tincd_at.service
new file mode 100644
index 000000000000..71f358a39d95
--- /dev/null
+++ b/net-vpn/tinc/files/tincd_at.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Tinc daemon for network %i
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/tincd -D --pidfile /run/tinc.%i.pid -n %i
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-vpn/tinc/metadata.xml b/net-vpn/tinc/metadata.xml
new file mode 100644
index 000000000000..02dd537c6e68
--- /dev/null
+++ b/net-vpn/tinc/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>dlan@gentoo.org</email>
+ <name>Yixun Lan</name>
+ </maintainer>
+ <longdescription>tinc is an easy to configure VPN implementation.</longdescription>
+ <use>
+ <!--
+ <flag name="gcrypt">Add support for encrypted log files using <pkg>dev-libs/libgcrypt</pkg></flag>
+ -->
+ <flag name="gui">Add GUI support, using <pkg>dev-python/wxpython</pkg></flag>
+ <flag name="uml"> Enable support for User Mode Linux Sockets</flag>
+ <flag name="vde"> Enable Virtual Distributed Ethernet (VDE) based networking</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-vpn/tinc/tinc-1.0.29.ebuild b/net-vpn/tinc/tinc-1.0.29.ebuild
new file mode 100644
index 000000000000..3a34c96cb985
--- /dev/null
+++ b/net-vpn/tinc/tinc-1.0.29.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+inherit systemd
+
+DESCRIPTION="tinc is an easy to configure VPN implementation"
+HOMEPAGE="http://www.tinc-vpn.org/"
+SRC_URI="http://www.tinc-vpn.org/packages/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="libressl +lzo uml vde +zlib"
+
+DEPEND="
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ lzo? ( dev-libs/lzo:2 )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}
+ vde? ( net-misc/vde )"
+
+src_configure() {
+ econf \
+ --enable-jumbograms \
+ --disable-tunemu \
+ $(use_enable lzo) \
+ $(use_enable uml) \
+ $(use_enable vde) \
+ $(use_enable zlib)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodir /etc/tinc
+ dodoc AUTHORS NEWS README THANKS
+ doconfd "${FILESDIR}"/tinc.networks
+ newconfd "${FILESDIR}"/tincd.conf tincd
+ newinitd "${FILESDIR}"/tincd-r1 tincd
+ systemd_newunit "${FILESDIR}"/tincd_at.service "tincd@.service"
+}
+
+pkg_postinst() {
+ elog "This package requires the tun/tap kernel device."
+ elog "Look at http://www.tinc-vpn.org/ for how to configure tinc"
+}
diff --git a/net-vpn/tinc/tinc-1.0.30.ebuild b/net-vpn/tinc/tinc-1.0.30.ebuild
new file mode 100644
index 000000000000..3a34c96cb985
--- /dev/null
+++ b/net-vpn/tinc/tinc-1.0.30.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+inherit systemd
+
+DESCRIPTION="tinc is an easy to configure VPN implementation"
+HOMEPAGE="http://www.tinc-vpn.org/"
+SRC_URI="http://www.tinc-vpn.org/packages/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="libressl +lzo uml vde +zlib"
+
+DEPEND="
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ lzo? ( dev-libs/lzo:2 )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}
+ vde? ( net-misc/vde )"
+
+src_configure() {
+ econf \
+ --enable-jumbograms \
+ --disable-tunemu \
+ $(use_enable lzo) \
+ $(use_enable uml) \
+ $(use_enable vde) \
+ $(use_enable zlib)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodir /etc/tinc
+ dodoc AUTHORS NEWS README THANKS
+ doconfd "${FILESDIR}"/tinc.networks
+ newconfd "${FILESDIR}"/tincd.conf tincd
+ newinitd "${FILESDIR}"/tincd-r1 tincd
+ systemd_newunit "${FILESDIR}"/tincd_at.service "tincd@.service"
+}
+
+pkg_postinst() {
+ elog "This package requires the tun/tap kernel device."
+ elog "Look at http://www.tinc-vpn.org/ for how to configure tinc"
+}
diff --git a/net-vpn/tinc/tinc-1.0.31.ebuild b/net-vpn/tinc/tinc-1.0.31.ebuild
new file mode 100644
index 000000000000..c8adaa0c7d3e
--- /dev/null
+++ b/net-vpn/tinc/tinc-1.0.31.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+inherit systemd
+
+DESCRIPTION="tinc is an easy to configure VPN implementation"
+HOMEPAGE="http://www.tinc-vpn.org/"
+SRC_URI="http://www.tinc-vpn.org/packages/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="libressl +lzo uml vde +zlib"
+
+DEPEND="
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ lzo? ( dev-libs/lzo:2 )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}
+ vde? ( net-misc/vde )"
+
+src_configure() {
+ econf \
+ --enable-jumbograms \
+ --disable-tunemu \
+ $(use_enable lzo) \
+ $(use_enable uml) \
+ $(use_enable vde) \
+ $(use_enable zlib)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodir /etc/tinc
+ dodoc AUTHORS NEWS README THANKS
+ doconfd "${FILESDIR}"/tinc.networks
+ newconfd "${FILESDIR}"/tincd.conf tincd
+ newinitd "${FILESDIR}"/tincd-r1 tincd
+ systemd_newunit "${FILESDIR}"/tincd_at.service "tincd@.service"
+}
+
+pkg_postinst() {
+ elog "This package requires the tun/tap kernel device."
+ elog "Look at http://www.tinc-vpn.org/ for how to configure tinc"
+}
diff --git a/net-vpn/tinc/tinc-1.1_pre14-r3.ebuild b/net-vpn/tinc/tinc-1.1_pre14-r3.ebuild
new file mode 100644
index 000000000000..ccc843d8305a
--- /dev/null
+++ b/net-vpn/tinc/tinc-1.1_pre14-r3.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+MY_PV=${PV/_/}
+MY_P=${PN}-${MY_PV}
+
+PYTHON_COMPAT=( python2_7 )
+inherit eutils multilib python-any-r1
+
+DESCRIPTION="tinc is an easy to configure VPN implementation"
+HOMEPAGE="http://www.tinc-vpn.org/"
+
+UPSTREAM_VER=1
+
+[[ -n ${UPSTREAM_VER} ]] && \
+ UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-1.1-upstream-patches-${UPSTREAM_VER}.tar.xz"
+
+SRC_URI="http://www.tinc-vpn.org/packages/${MY_P}.tar.gz
+ ${UPSTREAM_PATCHSET_URI}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="+lzo +ncurses gui libressl +readline +ssl uml vde upnp +zlib"
+
+DEPEND="
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ lzo? ( dev-libs/lzo:2 )
+ ncurses? ( sys-libs/ncurses:= )
+ readline? ( sys-libs/readline:= )
+ upnp? ( net-libs/miniupnpc )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}
+ vde? ( net-misc/vde )
+ ${PYTHON_DEPS}
+ gui? ( $(python_gen_any_dep '
+ dev-python/wxpython[${PYTHON_USEDEP}]
+ ') )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ # Upstream's patchset
+ if [[ -n ${UPSTREAM_VER} ]]; then
+ einfo "Try to apply Tinc Upstream patch set"
+ EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" \
+ EPATCH_OPTS="-p1" \
+ epatch "${WORKDIR}"/patches-upstream
+ fi
+
+ eapply "${FILESDIR}"/tinc-1.1-fix-paths.patch #560528
+ eapply_user
+}
+
+src_configure() {
+ econf \
+ --enable-jumbograms \
+ --disable-silent-rules \
+ --enable-legacy-protocol \
+ --disable-tunemu \
+ --with-systemd=/usr/$(get_libdir)/systemd/system \
+ $(use_enable lzo) \
+ $(use_enable ncurses curses) \
+ $(use_enable readline) \
+ $(use_enable uml) \
+ $(use_enable vde) \
+ $(use_enable zlib) \
+ $(use_enable upnp miniupnpc) \
+ $(use_with ssl openssl)
+ #--without-libgcrypt \
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodir /etc/tinc
+ dodoc AUTHORS NEWS README THANKS
+ doconfd "${FILESDIR}"/tinc.networks
+ newconfd "${FILESDIR}"/tincd.conf tincd
+ newinitd "${FILESDIR}"/tincd-r2 tincd
+
+ if use gui; then
+ python_fix_shebang "${ED}"/usr/bin/tinc-gui
+ else
+ rm -f "${ED}"/usr/bin/tinc-gui || die
+ fi
+}
+
+pkg_postinst() {
+ elog "This package requires the tun/tap kernel device."
+ elog "Look at http://www.tinc-vpn.org/ for how to configure tinc"
+}