# Contributor: Thomas Boerger # Contributor: Gennady Feldman # Contributor: Sergii Sadovyi # Maintainer: Thomas Boerger pkgname=terraform pkgver=0.12.0 pkgrel=0 pkgdesc="Building, changing and combining infrastructure safely and efficiently" url="https://www.terraform.io/" arch="all !armhf !armv7" 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 list -mod=vendor . | xargs -t -n4 go test -mod=vendor -timeout=2m -parallel=4 bin/$pkgname -v } package() { install -Dm755 "$builddir"/bin/$pkgname "$pkgdir"/usr/bin/$pkgname } sha512sums="2bd05455d3ae541f807d3a6440f63d9d1722625ed3cf04e509c4dd893582dbc2c2718f3705191db1e61093a166a9b5fd10c083ab48fa1718df04d32adeabba43 terraform-0.12.0.tar.gz"