aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testing/websocketd/APKBUILD24
-rw-r--r--testing/websocketd/make.patch33
2 files changed, 57 insertions, 0 deletions
diff --git a/testing/websocketd/APKBUILD b/testing/websocketd/APKBUILD
new file mode 100644
index 0000000000..a33760cb96
--- /dev/null
+++ b/testing/websocketd/APKBUILD
@@ -0,0 +1,24 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+pkgname=websocketd
+pkgver=0.3.1
+pkgrel=0
+pkgdesc="Like inetd, but for WebSockets. Turn any application that uses STDIO/STDOUT into a WebSocket server."
+url="https://github.com/joewalnes/websocketd"
+arch="all"
+license="BSD-2-Clause"
+options="!check" #no test provided
+makedepends="go"
+source="$pkgname-$pkgver.tar.gz::https://github.com/joewalnes/websocketd/archive/v$pkgver.tar.gz
+make.patch"
+
+build() {
+ make websocketd
+}
+package() {
+ install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname"
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+sha512sums="0b6914e656df24eca6060baad6336ea6916385c0e8ec998ba49ec777d298250f9e31b49277d3e35365c855e98e15f15ed07fde99dbb4212804c6463ce6bd8598 websocketd-0.3.1.tar.gz
+d9d9eaf5990e0be007bf77091932c33d2c921b45c1a289ffea6662d7842a357227c0ac5358962c74fbcd5886ca3194b0028d41e9ca5081a7bceedc838cc10384 make.patch"
diff --git a/testing/websocketd/make.patch b/testing/websocketd/make.patch
new file mode 100644
index 0000000000..678afdb27c
--- /dev/null
+++ b/testing/websocketd/make.patch
@@ -0,0 +1,33 @@
+diff --git a/Makefile b/Makefile
+index 9871b7d..7091128 100644
+--- a/Makefile
++++ b/Makefile
+@@ -10,13 +10,7 @@
+ # To manually invoke the locally installed Go, use ./go
+
+ # Go installation config.
+-GO_VER=1.11.5
+-SYSTEM_NAME:=$(shell uname -s | tr '[:upper:]' '[:lower:]')
+-SYSTEM_ARCH:=$(shell uname -m)
+-GO_ARCH:=$(if $(filter x86_64, $(SYSTEM_ARCH)),amd64,386)
+-GO_VERSION:=$(GO_VER).$(SYSTEM_NAME)-$(GO_ARCH)
+-GO_DOWNLOAD_URL:=https://dl.google.com/go/go$(GO_VERSION).tar.gz
+-GO_DIR:=go-$(GO_VER)
++GO_DIR:=/usr
+
+ # Build websocketd binary
+ websocketd: $(GO_DIR)/bin/go $(wildcard *.go) $(wildcard libwebsocketd/*.go)
+@@ -24,13 +18,6 @@ websocketd: $(GO_DIR)/bin/go $(wildcard *.go) $(wildcard libwebsocketd/*.go)
+
+ localgo: $(GO_DIR)/bin/go
+
+-# Download and unpack Go distribution.
+-$(GO_DIR)/bin/go:
+- mkdir -p $(GO_DIR)
+- rm -f $@
+- @echo Downloading and unpacking Go $(GO_VERSION) to $(GO_DIR)
+- curl -s $(GO_DOWNLOAD_URL) | tar xf - --strip-components=1 -C $(GO_DIR)
+-
+ # Clean up binary
+ clean:
+ rm -rf websocketd