# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:
pkgname=go-securecookie
_realname=securecookie
_vendor=gorilla
pkgver=1.1
pkgrel=0
pkgdesc="Encodes and decodes authenticated and optionally encrypted cookie values for Go"
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/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
	mv * "$pkgdir"/usr/lib/go/src/github.com/$_vendor/$_realname || return 1
}

md5sums="3a27b6f3637b50aac6f09a4b0d588800  go-securecookie-1.1.tar.gz"
sha256sums="dd17329e5fc255b1ac9b9a0c40492cb499e24123e9dbb388c9e31ced368e85c7  go-securecookie-1.1.tar.gz"
sha512sums="6473fdeb32f7a5182dc836e9588f3b7c2a29e1a244f36ac2077caad7a60dedeb5acf2da7766d270a5ef0ab1cef2c229e4b296cdf259569af1e9c99a382e31c2b  go-securecookie-1.1.tar.gz"
