new package: vlan

This commit is contained in:
Tee KOBAYASHI 2022-12-04 13:04:14 +09:00 committed by xtkoba
parent bdee3715f7
commit 44c470684b
3 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,20 @@
TERMUX_PKG_HOMEPAGE=https://salsa.debian.org/debian/vlan
TERMUX_PKG_DESCRIPTION="ifupdown integration for vlan configuration"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.0.5
TERMUX_PKG_SRCURL=https://deb.debian.org/debian/pool/main/v/vlan/vlan_${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=ccf261839b79247be8dae93074e1c5fcbce3807787a0ff7aed4e1f7a9095c465
TERMUX_PKG_DEPENDS="iproute2"
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_make_install() {
install -Dm700 -t $TERMUX_PREFIX/bin vconfig
local f
for f in network/{if-post-down.d/vlan,if-pre-up.d/vlan,if-up.d/ip}; do
install -Dm700 -T debian/${f} $TERMUX_PREFIX/etc/${f}
done
install -Dm600 -t $TERMUX_PREFIX/share/man/man5 debian/vlan-interfaces.5
install -Dm600 -t $TERMUX_PREFIX/share/man/man8 vconfig.8
}

View File

@ -0,0 +1,11 @@
--- a/debian/network/if-pre-up.d/vlan
+++ b/debian/network/if-pre-up.d/vlan
@@ -2,7 +2,7 @@
# Most of this stuff is to enable vlans
-STATEDIR=/run/network/vlan
+STATEDIR=@TERMUX_PREFIX@/var/run/network/vlan
case "$IFACE" in
# Ignore any alias (#272891) which uses <interface>:<alabel>

View File

@ -0,0 +1,20 @@
--- a/vconfig
+++ b/vconfig
@@ -45,7 +45,7 @@
ARGC=$(expr $# + 1)
-STATEDIR=/run/network/vlan
+STATEDIR=@TERMUX_PREFIX@/var/run/network/vlan
echo "" >&2
echo "Warning: vconfig is deprecated and might be removed in the future, please migrate to ip(route2) as soon as possible!" >&2
@@ -59,7 +59,7 @@
fi
ip () {
- /sbin/ip "$@"
+ @TERMUX_PREFIX@/bin/ip "$@"
}
condret () {