diff --git a/testing/multicast-relay/APKBUILD b/testing/multicast-relay/APKBUILD new file mode 100644 index 0000000000000000000000000000000000000000..a76a23e52dbb48b844efc479113dac387e079efe --- /dev/null +++ b/testing/multicast-relay/APKBUILD @@ -0,0 +1,30 @@ +# Contributor: Magnus Sandin <magnus.sandin@gmail.com> +# Maintainer: Magnus Sandin <magnus.sandin@gmail.com> +pkgname=multicast-relay +pkgver=1.3.1 +pkgrel=0 +pkgdesc="Relay broadcast and multicast packets between interfaces" +options="!check" # No tests available +url="https://github.com/alsmith/multicast-relay" +arch="noarch" +license="GPL-3.0-or-later" +depends="python3 py3-netifaces" +subpackages="$pkgname-doc $pkgname-openrc" +source="$pkgname-$pkgver.tar.gz::https://github.com/alsmith/multicast-relay/archive/refs/tags/v$pkgver.tar.gz + fix-python_version.patch + $pkgname.initd + $pkgname.confd + " + +package() { + install -m744 -D "$builddir/$pkgname.py" "$pkgdir/usr/bin/$pkgname.py" + install -m644 -D "$builddir/README.md" "$pkgdir/usr/share/doc/$pkgname/README.md" + install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname +} + +sha512sums="934db533345f8a7863765ffb444178dd20ea4208537cfb0fd062dce1902050a43f8476ae737c3cf37e799b4de65398ecebc8e9fc4f0014432bc5922cce5bfa2c multicast-relay-1.3.1.tar.gz +3a5e9dee4e05c89ae421861aaba4b38195cc6a04b6e7552d5f5b251eaa0f5a6ac12f6c831bf065c7585faad74cf60352fe5eefbe6ccbcec2af6bfe143b31bc1b fix-python_version.patch +32a6fe5f9072fb708c89d9fa2035b4044fdbd36648c42fa953128f724a1ba371ed2e8c086507fc5b746a0ded2f06f86c02360cd836bdd521c8a90172de63e870 multicast-relay.confd +2a82a4bbc01dfcce4c70a47ddb290499ecb5f43a9b290337632e832622cdd44780ae21c5db01693804f6f6c6bd88d79785dbc66601bce334c51a58022d909603 multicast-relay.initd +" diff --git a/testing/multicast-relay/fix-python_version.patch b/testing/multicast-relay/fix-python_version.patch new file mode 100644 index 0000000000000000000000000000000000000000..d59700de9395f931ed91f668865e55ab20ac7bfb --- /dev/null +++ b/testing/multicast-relay/fix-python_version.patch @@ -0,0 +1,8 @@ +--- a/multicast-relay.py.org ++++ b/multicast-relay.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + import argparse + import binascii diff --git a/testing/multicast-relay/multicast-relay.confd b/testing/multicast-relay/multicast-relay.confd new file mode 100644 index 0000000000000000000000000000000000000000..e6ea15ac7e55a4cc3939cbda848b492b1962abd6 --- /dev/null +++ b/testing/multicast-relay/multicast-relay.confd @@ -0,0 +1,17 @@ +# INTERFACES +# List all interfaces that multicast shall be routed between +# This is mandatory!! +# +# Example +# INTERFACES="eth0 eth1" +# +INTERFACES="" + +# EXTRA_PARAMETERS +# Any extra parameters to append as arguments +# +# Example +# EXTRA_PARAMETERS="--noSSDP --noSonosDiscovery" +# +EXTRA_PARAMETERS="" + diff --git a/testing/multicast-relay/multicast-relay.initd b/testing/multicast-relay/multicast-relay.initd new file mode 100644 index 0000000000000000000000000000000000000000..5cd620cfe0e95d6eaa2e3c1a63d63a09574db8bb --- /dev/null +++ b/testing/multicast-relay/multicast-relay.initd @@ -0,0 +1,15 @@ +#!/sbin/openrc-run + +name="multicast-relay" +description="Relay broadcast and multicast packets between interfaces" + +command="/usr/bin/multicast-relay.py" +command_args="--foreground --interfaces $INTERFACES $EXTRA_PARAMETERS" +command_background=true + +pidfile="/run/${RC_SVCNAME}.pid" + +depend() { + need net +} +