summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 11173980b73c808d415e2f18d4fd7be57b4c661e (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
# Submitter: Sven-Hendrik Haase <svenstaro@gmail.com>
# Maintainer: David "Sid" Olofsson <contact@sidju.se>

pkgname=terraform-git
pkgver=v0.15.0.alpha20210210.r173.ge9c7f37b8c
pkgrel=1
pkgdesc="Tool for building, changing, and versioning infrastructure safely and efficiently"
url='http://www.terraform.io/'
arch=('x86_64')
provides=('terraform')
conflicts=('terraform')
license=('MPL2')
makedepends=('git')
source=("git+https://github.com/hashicorp/terraform.git#branch=main")
sha256sums=('SKIP')

pkgver() {
  cd src/github.com/hashicorp/terraform
  git describe --long | sed 's/v\([^-]*\)-\([^-]*\).*/\1.\2/'
}

prepare() {
  export GOPATH="${srcdir}"
  export PATH="$PATH:$GOPATH/bin"
  mkdir -p src/github.com/hashicorp/
  mv "terraform" src/github.com/hashicorp/terraform
}

build() {
  cd src/github.com/hashicorp/terraform
  go build -o terraform-binary
}

package() {
  cd src/github.com/hashicorp/terraform
  install -Dm755 terraform-binary "$pkgdir/usr/bin/terraform"
}