# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:
pkgname=go-context
_realname=context
_vendor=gorilla
pkgver=1.1
pkgrel=0
pkgdesc="A golang registry for global request variables"
url="http://www.gorillatoolkit.org"
arch="noarch"
license="Custom"
depends=
depends_dev=
makedepends="$depends_dev"
install=
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/$_vendor/$_realname/archive/v$pkgver.tar.gz"
builddir="$srcdir"/$_realname-$pkgver

prepare() {
	cd "$builddir"
}

build() {
	cd "$builddir"
}

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

md5sums="990183c4f2d317c0bee3c6a54d7d9704  go-context-1.1.tar.gz"
sha256sums="12a849b4e9a08619233d4490a281aa2d34a69f9eaf85c2295f5357927e4d1763  go-context-1.1.tar.gz"
sha512sums="a4864abec77e82c63f075c18517b4c486e6196b80f234f667d3d7d29bbd67967f0c0df80a398c0aa9c7a6d4e57326b3c3045f541a258d02c02d6ced5f0bc2327  go-context-1.1.tar.gz"
