# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=go-websocket
_pkgname=websocket
_vendor=gorilla
pkgver=1.2.0
pkgrel=1
pkgdesc="A WebSocket implementation for Go"
url="http://www.gorillatoolkit.org"
arch="noarch"
license="BSD-2-Clause"
depends="go"
subpackages="$pkgname-doc"
options="!check"
source="$pkgname-$pkgver.tar.gz::https://github.com/$_vendor/$_pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

build() {
	return 0
}

package() {
	cd "$builddir"
	mkdir -p "$pkgdir"/usr/share/doc/$_vendor/$pkgname \
		"$pkgdir"/usr/lib/go/src/github.com/$_vendor/$_pkgname
	for file in \
		LICENSE \
		README.* \
		COPYRIGHT \
		AUTHORS \
		examples \
		; do \
		test -e $file && mv $file "$pkgdir"/usr/share/doc/$_vendor/$pkgname
	done
	mv * "$pkgdir"/usr/lib/go/src/github.com/$_vendor/$_pkgname
}

sha512sums="9d405a83c6a57144af048d84a53dc0bb6f136e9e85eabcbc0d43b0f8d6c699501c99ea70baf903f916999244c53284456686163faccc30e2a19631f18f30d409  go-websocket-1.2.0.tar.gz"
