diff --git a/tapws/APKBUILD b/tapws/APKBUILD new file mode 100644 index 0000000..c65e639 --- /dev/null +++ b/tapws/APKBUILD @@ -0,0 +1,33 @@ +# Contributor: Patrycja Rosa +# Maintainer: Patrycja Rosa +pkgname=tapws +pkgver=1.1.0 +pkgrel=0 +pkgdesc="Ethernet switch for WebSockets" +url="https://github.com/ptrcnull/tapws" +arch="all" +license="BSD-2-Clause" +makedepends="go" +subpackages="$pkgname-openrc" +source="https://github.com/ptrcnull/tapws/archive/refs/tags/v$pkgver/tapws-$pkgver.tar.gz + tapws.initd + tapws.confd + " +options="!check" + +build() { + go build -o tapws +} + +package() { + install -Dm755 tapws -t "$pkgdir"/usr/bin + + install -Dm755 "$srcdir"/tapws.initd "$pkgdir"/etc/init.d/tapws + install -Dm644 "$srcdir"/tapws.confd "$pkgdir"/etc/conf.d/tapws +} + +sha512sums=" +4eb4129e60b0ded1fc417148800ee39094ef5a40074d8fa710dda28c5bc0dc94bf232afe4e4f46ac24ed30381414ddf412512b3245b82ca2deb5653a34869e64 tapws-1.1.0.tar.gz +1c5e8037b2e69096505eed5024f0229767036d1f6656ca65c6a4fdfda89b6895095b182860f9f6f2956852ee3bf59bf72487ee8541f541449431f6cdf3ffffc3 tapws.initd +64e0f0de31571108c6d92b90e81ac04a187114a39b9dd68378ee91d7c00dd8f44c829a52c0dd19be2d7c792619022eacccbf47cb40a7f2114da81646a25937e6 tapws.confd +" diff --git a/tapws/tapws.confd b/tapws/tapws.confd new file mode 100644 index 0000000..ff979eb --- /dev/null +++ b/tapws/tapws.confd @@ -0,0 +1,3 @@ +# Configuration file for tapws +bind_address="127.0.0.1:8080" +network_host="10.5.0.1/16" diff --git a/tapws/tapws.initd b/tapws/tapws.initd new file mode 100644 index 0000000..11c9560 --- /dev/null +++ b/tapws/tapws.initd @@ -0,0 +1,7 @@ +#!/sbin/openrc-run + +supervisor=supervise-daemon + +name="tapws" +command="/usr/bin/tapws" +command_args="-bind $bind_address -host $network_host"