aboutsummaryrefslogtreecommitdiffstats
path: root/community/terraform/APKBUILD
blob: b26b90db6c431cbe7d8c1a1ad629f4555c1669f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Contributor: Thomas Boerger <thomas@webhippie.de>
# Contributor: Gennady Feldman <gena01@gmail.com>
# Contributor: Sergii Sadovyi <serg.sadovoi@gmail.com>
# Maintainer: Thomas Boerger <thomas@webhippie.de>
pkgname=terraform
pkgver=0.11.7
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="0ee0317bbca8b59698ae58cc090b7f6e11631885327bdcb805859312895c0f61e8eb87aa2fd4cd4ed7e4835fe50941a3f678b85aae8fc8b4585f9403d5c06de3  terraform-0.11.7.tar.gz"