summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD24
1 files changed, 9 insertions, 15 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 1d7ce2f030e6..e7d7db884411 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,36 +3,30 @@
pkgname=sops
pkgver=3.5.0
-pkgrel=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=('a9c257dc5ddaab736dce08b8c5b1f00e6ca1e3171909b6d7385689044ebe759b')
-prepare() {
- mkdir -p src/go.mozilla.org
- mv ${pkgname}-${pkgver} src/go.mozilla.org/sops
-}
-
build() {
- cd src/go.mozilla.org/sops
- env GO111MODULE=on GOPATH="${srcdir}" go build \
- -asmflags all="-trimpath=${PWD}" \
- -gcflags all="-trimpath=${PWD}" \
- -ldflags all="-extldflags=${LDFLAGS}" \
- ./cmd/sops
+ cd "${pkgname}-${pkgver}"
+ export CGO_LDFLAGS="$LDFLAGS"
+ export GOFLAGS='-buildmode=pie -modcacherw -trimpath'
+ go build -o "$pkgname" ./cmd/sops/
}
check() {
- cd src/go.mozilla.org/sops
- env GO111MODULE=on GOPATH="${srcdir}" go test
+ cd "${pkgname}-${pkgver}"
+ go test
}
package() {
- cd src/go.mozilla.org/sops
+ cd "${pkgname}-${pkgver}"
install -Dm755 sops "${pkgdir}/usr/bin/${pkgname}"
install -Dm644 README.rst "${pkgdir}/usr/share/doc/${pkgname}/README.rst"
}