diff options
Diffstat (limited to 'testing/terraform')
-rw-r--r-- | testing/terraform/APKBUILD | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/testing/terraform/APKBUILD b/testing/terraform/APKBUILD new file mode 100644 index 0000000000..8ff388167a --- /dev/null +++ b/testing/terraform/APKBUILD @@ -0,0 +1,78 @@ +# Contributor: Thomas Boerger <thomas@webhippie.de> +# Maintainer: Thomas Boerger <thomas@webhippie.de> +pkgname=terraform +pkgver=0.6.16 +pkgrel=0 +pkgdesc="Building, changing, and combining infrastructure safely and efficiently" +url="https://www.terraform.io/" +arch="all" +license="MPL 2.0" +depends="" +depends_dev="" +makedepends="$depends_dev go go-tools bash" +install="" +subpackages="" +source="${pkgname}-${pkgver}.tar.gz::https://github.com/hashicorp/terraform/archive/v$pkgver.tar.gz" + +_builddir="${srcdir}/terraform-${pkgver}" +_godir="${srcdir}/go" +_gourl="github.com/hashicorp/terraform" + +_providers="provider-atlas provider-aws provider-azure provider-azurerm provider-chef provider-clc provider-cloudflare provider-cloudstack provider-cobbler provider-consul provider-datadog provider-digitalocean provider-dme provider-dnsimple provider-docker provider-dyn provider-fastly provider-github provider-google provider-heroku provider-influxdb provider-librato provider-mailgun provider-mysql provider-null provider-openstack provider-packet provider-postgresql provider-powerdns provider-rundeck provider-softlayer provider-statuscake provider-template provider-terraform provider-tls provider-triton provider-ultradns provider-vcd provider-vsphere" +_provisioners="provisioner-chef provisioner-file provisioner-local-exec provisioner-remote-exec" + +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + mkdir -p ${_godir}/bin ${_godir}/src/github.com/hashicorp + ln -sf ${_builddir} ${_godir}/src/github.com/hashicorp/terraform + + cd ${_godir}/src/${_gourl} + export GOPATH="${_godir}" + + go generate $(go list ./... | grep -v /vendor/) + go install -v ${_gourl} + + for binary in ${_providers} + do + go install -v ${_gourl}/builtin/bins/${binary} + done + + for binary in ${_provisioners} + do + go install -v ${_gourl}/builtin/bins/${binary} + done +} + +package() { + cd "$_godir"/bin + + ls + + install -Dm755 terraform \ + "${pkgdir}/usr/bin/terraform" || return 1 + + for binary in ${_providers} + do + install -Dm755 ${binary} \ + "${pkgdir}/usr/bin/terraform-${binary}" || return 1 + done + + for binary in ${_provisioners} + do + install -Dm755 ${binary} \ + "${pkgdir}/usr/bin/terraform-${binary}" || return 1 + done +} + +md5sums="708618e86b8c6e33cf5553dd16810e85 terraform-0.6.16.tar.gz" +sha256sums="c84bae32a170d993982de9c537eac74f70601e7a667dc2ea9803b86e04b1221d terraform-0.6.16.tar.gz" +sha512sums="9eab68c4ffe7a187703ec970e6d5812261b819fd20ff2f24751e9f4472caa3e06315db0a07056a777454eda45b6ee6d4d3210307eaff8aab06406eaa48ac9082 terraform-0.6.16.tar.gz" |