# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:
pkgname=go-mux
_realname=mux
_vendor=gorilla
pkgver=1.1
pkgrel=0
pkgdesc="A powerful URL router and dispatcher for golang"
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/gorilla/$_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/$_realname
	done
	mv * "$pkgdir"/usr/lib/go/src/github.com/$_vendor/$_realname || return 1
}

md5sums="6e2b50af81690dd20f08259317ed45c7  go-mux-1.1.tar.gz"
sha256sums="66c6990df41605fd1de54a1d6d4e6460d4c4c00f0ace9fc82f6c2c68b13fb8aa  go-mux-1.1.tar.gz"
sha512sums="8610d69ab2cd58e02084f1860a5de152b27d530962a11f4a7fab1b15d404fb3fa3b159df4178853d1b226a5d2a47171bb7121de49ba4dc18d5d3bc6d5c1f26ac  go-mux-1.1.tar.gz"
