diff options
author | Andreas 'Segaja' Schleifer | 2020-08-14 14:32:35 +0200 |
---|---|---|
committer | Andreas 'Segaja' Schleifer | 2020-08-14 14:32:35 +0200 |
commit | ae9705940ab5a91e10ce7b295e38a0fe6e9618d4 (patch) | |
tree | 6b3a60a23b80a1d7d1d76f4e1988e8a9ef47cb42 | |
parent | d2ab406fce009cf1852a53be3f90543643c2539c (diff) | |
download | aur-ae9705940ab5a91e10ce7b295e38a0fe6e9618d4.tar.gz |
feat(terragrunt): adapt to latest version of go packaging guidelines from arch
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 55 |
2 files changed, 29 insertions, 33 deletions
@@ -1,15 +1,14 @@ pkgbase = terragrunt pkgdesc = A thin wrapper for Terraform that provides extra tools for working with multiple Terraform modules pkgver = 0.23.33 - pkgrel = 1 + pkgrel = 2 url = https://github.com/gruntwork-io/terragrunt arch = x86_64 license = MIT makedepends = git - makedepends = go-pie + makedepends = go + depends = glibc depends = terraform - provides = terragrunt - conflicts = terragrunt source = terragrunt-0.23.33.tar.gz::https://github.com/gruntwork-io/terragrunt/archive/v0.23.33.tar.gz sha256sums = 28e5a3bc2d9ec9ad8a2037680ba28214267ec974f6d8315ad23730c222c6a1fe @@ -1,49 +1,46 @@ # Maintainer: Benjamin Denhartog <ben@sudoforge.com> +# Contributor: Andreas 'Segaja' Schleifer <archlinux at segaja dot de> pkgname=terragrunt pkgver=0.23.33 -pkgrel=1 +pkgrel=2 pkgdesc="A thin wrapper for Terraform that provides extra tools for working with multiple Terraform modules" url="https://github.com/gruntwork-io/terragrunt" arch=('x86_64') makedepends=( 'git' - 'go-pie' + 'go' ) -depends=('terraform') -conflicts=('terragrunt') -provides=('terragrunt') +depends=('glibc' 'terraform') license=('MIT') -source=("terragrunt-${pkgver}.tar.gz::https://github.com/gruntwork-io/terragrunt/archive/v${pkgver}.tar.gz") +source=(${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz) sha256sums=('28e5a3bc2d9ec9ad8a2037680ba28214267ec974f6d8315ad23730c222c6a1fe') build() { - cd "${srcdir}/${pkgname}-${pkgver}" - - # Set GOPATH to a path within $srcdir so that we don't pollute user's $GOPATH - # (default of $HOME/go) when building this package - export GOPATH="${srcdir}/.go" - - # Build the executable - # Use `-trimpath` to avoid including file system paths in the executable - go build \ - -modcacherw \ - -trimpath \ - -ldflags "-X github.com/gruntwork-io/terragrunt.VERSION=${pkgver}" \ - -o "${pkgname}-${pkgver}" \ - main.go + cd ${pkgname}-${pkgver} + + export GO11MODULE=on + export CGO_LDFLAGS="${LDFLAGS}" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath" + + go build -o "./out/${pkgname}" +} + +check() { + cd ${pkgname}-${pkgver} + + # some tests require AWS credentials and are therefore excluded here + go test ./cli/... ./config/... ./configstack/... ./shell/... ./util/... } package() { - # Install the license file - install -D -m 0644 \ - "${srcdir}/${pkgname}-${pkgver}/LICENSE.txt" \ - "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" - - # Install the executable - install -D -m 0755 \ - "${srcdir}/${pkgname}-${pkgver}/${pkgname}-${pkgver}" \ - "${pkgdir}/usr/bin/${pkgname}" + cd ${pkgname}-${pkgver} + + install -D -m 644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -D -m 755 "./out/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" } # vim:set ts=2 sw=2 et: |