net-vpn/vtun-embedded: new package, add 3.0.6

vtun-embedded is a fork of net-vpn/vtun::gentoo (I proxy maintain). This
is intended for situations where the full rewrite fork vtun-ng[rust] is not
practical or possible to use. I still recommend using vtun-ng as a
replacement for vtun whenever possible.

Signed-off-by: Jan-Espen Oversand <sigsegv@radiotube.org>
This commit is contained in:
Jan-Espen Oversand
2025-10-29 07:07:31 +01:00
parent 679794cac4
commit 005286625d
3 changed files with 71 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST vtun-embedded-3.0.6.tar.gz 170935 BLAKE2B 0804589eb0a8c15bc7bc36781a4e9bdcb251540f3e569dcf865a796a54750cf8a4f3aba99eca0da66a98e5581c7f673445cbaefe3f02bd4f73632c97bdf966b8 SHA512 62190e4c8ed5f3cd12b04394d0324954d2fb47edeff0428aeb57f51a45330bd11569c5aeab06082e9cab9d7ed7fdfc7c542584b4fd96b7b2495ecfc2211cea7e

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>sigsegv@radiotube.org</email>
<name>Jan-Espen Oversand</name>
</maintainer>
<upstream>
<remote-id type="github">leakingmemory/vtun-embedded</remote-id>
</upstream>
</pkgmetadata>

View File

@@ -0,0 +1,59 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit linux-info autotools systemd
DESCRIPTION="Create tunnels over TCP/IP networks with shaping, encryption, and compression"
HOMEPAGE="https://github.com/leakingmemory/vtun-embedded"
SRC_URI="https://github.com/leakingmemory/vtun-embedded/releases/download/v${PV}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm64 ~ppc ~sparc ~x86"
IUSE="systemd lzo socks5 ssl zlib"
RDEPEND="
lzo? ( dev-libs/lzo:2 )
socks5? ( net-proxy/dante )
ssl? ( dev-libs/openssl:0= )
zlib? ( sys-libs/zlib )
dev-libs/libbsd"
DEPEND="${RDEPEND}"
BDEPEND="
sys-devel/bison
"
DOCS=( ChangeLog Credits FAQ README README.Setup README.Shaper TODO )
CONFIG_CHECK="~TUN"
src_prepare() {
default
eautoreconf
sed -i -e '/^LDFLAGS/s|=|+=|g' Makefile.in || die
sed -i 's:$(BIN_DIR)/strip $(DESTDIR)$(SBIN_DIR)/vtunemd::' Makefile.in || die
}
src_configure() {
econf \
$(use_enable ssl) \
$(use_enable zlib) \
$(use_enable lzo) \
$(use_enable socks5 socks) \
--enable-shaper
}
src_install() {
default
newinitd "${FILESDIR}"/vtun-embedded.rc vtun-embedded
insinto /etc
doins "${FILESDIR}"/vtunemd-start.conf
rm -r "${ED}"/var || die
if use systemd; then
insinto /etc/vtunemd
newins "${S}"/scripts/sample-client.env.systemd sample-client.env
fi
systemd_newunit "${S}"/scripts/vtunemd.service.systemd vtunemd.service
systemd_newunit "${S}"/scripts/vtunemd-client.service.systemd vtunemd@.service
}