aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/websocketd/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'unmaintained/websocketd/APKBUILD')
-rw-r--r--unmaintained/websocketd/APKBUILD64
1 files changed, 64 insertions, 0 deletions
diff --git a/unmaintained/websocketd/APKBUILD b/unmaintained/websocketd/APKBUILD
new file mode 100644
index 0000000000..dd633a3268
--- /dev/null
+++ b/unmaintained/websocketd/APKBUILD
@@ -0,0 +1,64 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=websocketd
+pkgver=0.2.10
+pkgrel=1
+pkgdesc="Full duplex messaging between web browsers and servers"
+url="http://websocketd.com/"
+arch="all"
+license="BSD"
+depends=""
+depends_dev=""
+makedepends="$depends_dev go go-tools"
+install=""
+subpackages="$pkgname-doc"
+options="!strip"
+source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz"
+
+_disturl="dev.alpinelinux.org:/archive/$pkgname/"
+_gourl="github.com/joewalnes/websocketd"
+_builddir="$srcdir"/src/$_gourl
+
+snapshot() {
+ abuild clean && abuild deps
+ export GOPATH="$srcdir"
+ msg "Checking out v${pkgver} tag"
+ git clone -q --branch v${pkgver} https://$_gourl $_builddir || return 1
+ cd $_builddir
+ go get -v -d || return 1
+ cd "$srcdir"
+ tar zcf $pkgname-$pkgver.tar.gz src || return 1
+ rsync --progress -La $pkgname-$pkgver.tar.gz \
+ $_disturl || return 1
+ cd $startdir && abuild undeps
+}
+
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir" || return 1
+ export GOPATH="$srcdir"
+ go fix || return 1
+ go build -v -ldflags "-X main.version $pkgver" || return 1
+}
+
+package() {
+ cd "$_builddir"
+ install -Dm 0755 $pkgname "$pkgdir"/usr/bin/$pkgname || return 1
+ mkdir -p "$pkgdir"/usr/share/man/man8
+ gzip -c release/websocketd.man > \
+ "$pkgdir"/usr/share/man/man8/websocketd.man.gz || return 1
+}
+
+md5sums="226b6f6125a6cf8d747ecd5fb619913a websocketd-0.2.10.tar.gz"
+sha256sums="cecaf94886021f305db659fc2919cd2226ece6e382fc8182fc214c9c24deadc3 websocketd-0.2.10.tar.gz"
+sha512sums="b02a5d4cc4e448571e370db0713ebab83c905beab5b38738aed812eefd4cd8bbe5f8454aa6d36e78295ebf1e995fba41b06fe1d78fb2e6d2eb1f31229bcdcc09 websocketd-0.2.10.tar.gz"