1 # Maintainer: Christian Rebischke <chris.rebischke@archlinux.org>
5 pkgdesc="CLI tool to ensure K8s manifests and Helm charts follow best practices as well as your organization’s policies"
7 url='https://github.com/datreeio/datree'
10 makedepends=('git' 'go')
11 source=("${pgname}-${pkgver}.tar.gz::https://github.com/datreeio/datree/archive/refs/tags/${pkgver}.tar.gz")
12 sha512sums=('a5b773daf7f67eba844b3f8ff4fc3d93a0e865e1cb82cce1bfe4ea0e5c8bdfafd894bbfa57249f908834fbaadc23f1a2664cf8aee8820170c1a5535156fa4aac')
13 b2sums=('6e66b59ec534e9593d5cb5ce65ccbcfb145f1788b1e860242ae8d8e5ce55c3b1d11ca77b156f7cdc934a1c91e16b14f40919d16e7c12d4df8e88807fee98e668')
17 cd "${pkgname}-${pkgver}"
18 export CGO_LDFLAGS="$LDFLAGS"
19 export CGO_CFLAGS="$CFLAGS"
20 export CGO_CPPFLAGS="$CPPFLAGS"
21 export CGO_CXXFLAGS="$CXXFLAGS"
22 export GOFLAGS='-buildmode=pie -trimpath -modcacherw -mod=readonly'
23 go build -ldflags="-w -s -linkmode=external" -o datree .
27 cd "${pkgname}-${pkgver}"
32 cd "${pkgname}-${pkgver}"
33 install -Dm755 datree "${pkgdir}/usr/bin/datree"