# Contributor: Thomas Boerger # Contributor: Gennady Feldman # Contributor: Sergii Sadovyi # Contributor: Galen Abell # Maintainer: Thomas Boerger pkgname=terraform pkgver=0.12.24 pkgrel=1 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" options="chmod-clean" prepare() { mkdir -p ${builddir%/*} mv $srcdir/$pkgname-$pkgver "$builddir"/ default_prepare } build() { GO111MODULE=off GOPATH="$srcdir" go build -v -o bin/$pkgname \ -ldflags "-X main.GitCommit=v$pkgver -X github.com/hashicorp/terraform/version.Prerelease= -s -w" } check() { 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="026b4c30438459d5fa433ea606e8e020f2ff71ba6e14a5caeecef32f5800a0699cb192ece4bf9b5005b8e0fb2e375f70602d44d94b0b8efa3bac20f9a30e14e6 terraform-0.12.24.tar.gz"