aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2015-04-21 15:42:32 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2015-04-21 15:42:32 +0200
commit3eab3a04e634b5f3ca9f4c8fa4863150f1774bb7 (patch)
treee22407c7192e928a96e49531b7619f68fc3d4b2a
parente6c572bc3a751d5964e00952147211733189f0cb (diff)
downloadaports-3eab3a04e634b5f3ca9f4c8fa4863150f1774bb7.tar.bz2
aports-3eab3a04e634b5f3ca9f4c8fa4863150f1774bb7.tar.xz
testing/websocketd: new aport
-rw-r--r--testing/websocketd/APKBUILD63
1 files changed, 63 insertions, 0 deletions
diff --git a/testing/websocketd/APKBUILD b/testing/websocketd/APKBUILD
new file mode 100644
index 0000000000..7289018a68
--- /dev/null
+++ b/testing/websocketd/APKBUILD
@@ -0,0 +1,63 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=websocketd
+pkgver=0.2.10
+pkgrel=0
+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"
+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"