Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -0,0 +1,18 @@
#!/bin/sh
if [ "$#" -lt 2 ]; then
echo "Missing args: bridge-stp <bridge> <start|stop>" >&2
exit 1
fi
case "$2" in
start)
/usr/sbin/mstpctl addbridge "$1"
exit
;;
stop)
/usr/sbin/mstpctl delbridge "$1"
exit
;;
*)
echo "Invalid operation: $2" >&2
exit 1
esac
@@ -0,0 +1,12 @@
[Unit]
Description=Multiple Spanning Tree Protocol Daemon
Before=network-pre.target
Wants=network-pre.target
[Service]
Restart=always
Type=simple
ExecStart=/usr/sbin/mstpd -d -v 2
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,30 @@
PR = "r1"
PV = "0.1+git${SRCPV}"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://LICENSE;md5=4325afd396febcb659c36b49533135d4"
SRC_URI = "git://github.com/mstpd/mstpd;branch=master;protocol=https"
SRCREV = "181c453fc1a00573e19f14960dcc54ad84beea7c"
S = "${WORKDIR}/git"
SRC_URI += "file://bridge-stp"
SRC_URI += "file://mstpd.service"
inherit autotools pkgconfig systemd
PACKAGES =+ "${PN}-mstpd"
FILES:${PN}-mstpd = "${sbindir}/mstpd ${sbindir}/mstpctl ${sbindir}/bridge-stp"
SYSTEMD_PACKAGES = "${PN}-mstpd"
SYSTEMD_SERVICE:${PN}-mstpd = "mstpd.service"
do_install:append() {
rm -rf ${D}${libexecdir} ${D}${libdir}/NetworkManager
rmdir ${D}${libdir} || true
install -d -m 0755 ${D}/${sbindir}
install -m 0755 ${WORKDIR}/bridge-stp ${D}/${sbindir}
install -d -m 0755 ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/mstpd.service ${D}${systemd_system_unitdir}/
}
@@ -0,0 +1,42 @@
PR = "r2"
PV = "0.1+git${SRCPV}"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SRC_URI = "git://github.com/yrutschle/sslh;branch=master;protocol=https"
SRCREV = "7e3f723699764a9d000902af55e15e0eb151281f"
S = "${WORKDIR}/git"
inherit perlnative
DEPENDS += "conf2struct-native"
DEPENDS += "libbsd"
DEPENDS += "libcap"
DEPENDS += "libconfig"
DEPENDS += "libev"
DEPENDS += "systemd"
DEPENDS += "pcre2"
EXTRA_OEMAKE += "DESTDIR=${D}"
EXTRA_OEMAKE += "PREFIX=${prefix}"
EXTRA_OEMAKE += "USELIBCAP=1"
EXTRA_OEMAKE += "USELIBBSD=1"
EXTRA_OEMAKE += "USESYSTEMD=1"
do_configure() {
oe_runmake distclean
}
do_compile() {
# Workaround for a non-installed and broken echosrv
sed -i 's,^\(all:.*\) echosrv,\1,' ${S}/Makefile
# Workaround for the broken dependencies in the Makefile
oe_runmake sslh-conf.h
oe_runmake
}
do_install() {
oe_runmake install
}