# Contributor: Thomas Boerger # Contributor: Gennady Feldman # Contributor: Sergii Sadovyi # Maintainer: Thomas Boerger pkgname=terraform pkgver=0.11.2 pkgrel=0 pkgdesc="Building, changing, and combining infrastructure safely and efficiently" url="https://www.terraform.io/" arch="all !armhf" license="MPL-2.0" makedepends="go" source="${pkgname}-${pkgver}.tar.gz::https://github.com/hashicorp/terraform/archive/v$pkgver.tar.gz" builddir="$srcdir/src/github.com/hashicorp/$pkgname" prepare() { mkdir -p ${builddir%/*} mv $srcdir/$pkgname-$pkgver "$builddir"/ default_prepare } build() { cd "$builddir" GOPATH="$srcdir" go build -v -o bin/$pkgname \ -ldflags "-X main.GitCommit=v$pkgver -X github.com/hashicorp/terraform/version.Prerelease= -s -w" } check() { cd "$builddir" GOPATH="$srcdir" go test bin/$pkgname -v } package() { install -Dm755 "$builddir"/bin/$pkgname "$pkgdir"/usr/bin/$pkgname } sha512sums="0adf96b2a64e96adb50b3b6d1afdc1c79795428061c4fc389e7ce1d3d79f15dc6419392eb5426f22e0a6c0b0f8b10732f7d0e2694951c97f15c4a8d8460dad19 terraform-0.11.2.tar.gz"