aboutsummaryrefslogtreecommitdiffstats
path: root/testing/novnc
diff options
context:
space:
mode:
authorAndré Bierwolf <a.b.bierwolf@gmail.com>2017-07-19 20:10:02 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-07-29 00:28:10 +0200
commit7004919ed9970e5b3c93f370dbba9104ca5d6ba4 (patch)
tree67509886d73845ce54fcef8084c84f9d6b48e1bf /testing/novnc
parentdac78d9247328891ab31ff9a64de925f7af5af30 (diff)
downloadaports-7004919ed9970e5b3c93f370dbba9104ca5d6ba4.tar.bz2
aports-7004919ed9970e5b3c93f370dbba9104ca5d6ba4.tar.xz
testing/novnc: new aport
The Kimchi aport wil need this as a dependency to make vnc console work.
Diffstat (limited to 'testing/novnc')
-rw-r--r--testing/novnc/APKBUILD38
-rw-r--r--testing/novnc/alpine-specific-launch.js.patch17
2 files changed, 55 insertions, 0 deletions
diff --git a/testing/novnc/APKBUILD b/testing/novnc/APKBUILD
new file mode 100644
index 0000000000..c952fb82a3
--- /dev/null
+++ b/testing/novnc/APKBUILD
@@ -0,0 +1,38 @@
+# Contributor: Andre Bierwolf <a.b.bierwolf@gmail.com>
+# Maintainer: Andre Bierwolf <a.b.bierwolf@gmail.com>
+pkgname=novnc
+_pkgname=noVNC
+pkgver=0.6.2
+pkgrel=0
+pkgdesc="VNC client using HTML5 (WebSockets, Canvas) with encryption (wss://) support"
+url="https://kanaka.github.io/noVNC/"
+arch="noarch"
+license="MPL-2.0"
+depends="websockify net-tools"
+subpackages="$pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$_pkgname/archive/v$pkgver.tar.gz
+ alpine-specific-launch.js.patch"
+builddir="$srcdir/$_pkgname-$pkgver"
+options="!check"
+
+package() {
+ mkdir -p "$pkgdir"/usr/share/novnc
+ cp -r "$builddir"/* "$pkgdir"/usr/share/novnc
+ # Clean up package
+ rm "$pkgdir"/usr/share/novnc/CONTRIBUTING.md
+ rm "$pkgdir"/usr/share/novnc/utils/README.md
+ # Move license files
+ mkdir -p "$pkgdir"/usr/share/licenses/novnc
+ mv "$pkgdir"/usr/share/novnc/LICENSE.txt "$pkgdir"/usr/share/licenses/novnc
+ mv "$pkgdir"/usr/share/novnc/docs/LICENSE.* "$pkgdir"/usr/share/licenses/novnc
+ # Move documentation
+ mkdir -p "$pkgdir"/usr/share/doc
+ mv "$pkgdir"/usr/share/novnc/docs "$pkgdir"/usr/share/doc/novnc
+ mv "$pkgdir"/usr/share/novnc/README.md "$pkgdir"/usr/share/doc/novnc
+ # Add launch.sh to /usr/bin
+ mkdir -p "$pkgdir"/usr/bin
+ ln -sf /usr/share/novnc/utils/launch.sh "$pkgdir"/usr/bin/novnc_server
+}
+
+sha512sums="245d205f8935c82722a55d6cfcd2cea1825176c0cd695fd0eec34aa19cdc3b766fed62e741ff41b0a8c4a3b3cbabc5a39dfa6ad8ffa6169f5b88420a4a845a7c novnc-0.6.2.tar.gz
+039abf940909767f93217832bb43dc3405613c9a0d0afa4f4d601c1c1d7459394e93fa9d8e5e880b8e65759e293c7da4cc586b73f2c981f50dcb6872093499bc alpine-specific-launch.js.patch"
diff --git a/testing/novnc/alpine-specific-launch.js.patch b/testing/novnc/alpine-specific-launch.js.patch
new file mode 100644
index 0000000000..ca1c985188
--- /dev/null
+++ b/testing/novnc/alpine-specific-launch.js.patch
@@ -0,0 +1,17 @@
+--- a/utils/launch.sh
++++ b/utils/launch.sh
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env bash
++#!/bin/ash
+
+ # Copyright 2016 Joel Martin
+ # Copyright 2016 Solly Ross
+@@ -141,7 +141,7 @@
+ ${WEBSOCKIFY} --web ${WEB} ${CERT:+--cert ${CERT}} ${PORT} ${VNC_DEST} &
+ proxy_pid="$!"
+ sleep 1
+-if ! ps -p ${proxy_pid} >/dev/null; then
++if [ -z "$proxy_pid" ] || ! ps -o pid= | grep -qw ${proxy_pid}; then
+ proxy_pid=
+ echo "Failed to start WebSockets proxy"
+ exit 1