# Maintainer: Hao Long # Contributor: Daniel M. Capella pkgname=gitleaks pkgver=8.7.0 pkgrel=1 pkgdesc='Audit Git repos for secrets and keys' url=https://github.com/zricethezav/gitleaks arch=('x86_64' 'i686') license=('MIT') depends=('glibc') makedepends=('go') source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz") b2sums=('f33fada294cca25685d1bda8ce1a7423485e1e99c60bc98c1bb240d2004ce200ee4853b42b3f6dfb3fa47b9e3f31f4a26f65cd677446be1a172858bd4e169e46') build() { cd "$pkgname-$pkgver" export CGO_CPPFLAGS="${CPPFLAGS}" export CGO_CFLAGS="${CFLAGS}" export CGO_CXXFLAGS="${CXXFLAGS}" export CGO_LDFLAGS="${LDFLAGS}" export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" go build . } package() { cd "$pkgname-$pkgver" install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE install -Dm755 "$pkgname" "$pkgdir"/usr/bin/"$pkgname" ./gitleaks completion bash --no-descriptions | install -Dm644 /dev/stdin "$pkgdir"/usr/share/bash-completion/completions/"$pkgname" ./gitleaks completion zsh --no-descriptions | install -Dm644 /dev/stdin "$pkgdir"/usr/share/zsh/site-functions/_"$pkgname" ./gitleaks completion fish --no-descriptions | install -Dm644 /dev/stdin "$pkgdir"/usr/share/fish/vendor_completions.d/"$pkgname".fish } # vim:set ts=2 sw=2 et: