# Template file for 'otto'
pkgname=otto
version=0.2.0
revision=1
build_style=go
hostmakedepends="git-perl"
go_import_path="github.com/hashicorp/otto"
short_desc="Development and deployment made easy"
maintainer="Diogo Leal <diogo@diogoleal.com>"
license="MPL-2.0"
homepage="https://ottoproject.io/"
distfiles="https://github.com/hashicorp/otto/archive/v${version}.tar.gz"
checksum=3f530c7544e6a88d9fb743e561d3a07456ab7f8cc2460e13ce37ab7cc410659a

do_build() {
	local path="${GOPATH}/src/${go_import_path}"
	mkdir -p "$(dirname ${path})"
	ln -fs $PWD "${path}"

	cd "$GOPATH/src/$go_import_path"
	GOOS= GOARCH= GOARM= make updatedeps
	PATH=$GOPATH/bin:$PATH make generate
	go install
}

post_install() {
	rm $DESTDIR/usr/bin/{go-bindata,gox,stringer}
	vlicense LICENSE
}
