# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=go-sloth
_pkgname=sloth
_vendor="strukturag"
pkgver=0.9.2
pkgrel=2
pkgdesc="A tiny REST framework for Go"
url="https://github.com/$_vendor/$_pkgname"
arch="noarch"
license="MIT"
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.* \
		; do \
		test -e $file && mv $file "$pkgdir"/usr/share/doc/$_vendor/$pkgname
	done
	mv *.go "$pkgdir"/usr/lib/go/src/github.com/$_vendor/$_pkgname
}

sha512sums="2d7550e2cd0f7ae259567a5611886bb70132ca0bf5fc7e85f80f6cb31233cc45120cd8feb862666f31b43fd95de83713e7cfc38687074ea6659b9dd6dbd08332  go-sloth-0.9.2.tar.gz"
