# Maintainer: Michael Beaumont # URL: https://github.com/michaelbeaumont/aur-packages pkgname=sops pkgver=3.7.1 pkgrel=2 pkgdesc='Editor of encrypted files that supports YAML, JSON and BINARY formats' arch=('i686' 'x86_64' 'aarch64') url='https://github.com/mozilla/sops' license=('MPL2') depends=('glibc') makedepends=('go') source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz") sha256sums=( '536ee140d888b53b71c1e8edd669f4c11bc573428983fbea644fbbfcd7d7079a' ) build() { cd "${pkgname}-${pkgver}" export GOPATH="$srcdir"/gopath export CGO_LDFLAGS="$LDFLAGS" export GOFLAGS='-buildmode=pie -modcacherw -trimpath' go build -o "$pkgname" ./cmd/sops/ } check() { cd "${pkgname}-${pkgver}" go test } package() { cd "${pkgname}-${pkgver}" install -Dm755 sops "${pkgdir}/usr/bin/${pkgname}" install -Dm644 README.rst "${pkgdir}/usr/share/doc/${pkgname}/README.rst" }