[arch-commits] Commit in cue/repos (community-x86_64 community-x86_64/PKGBUILD)
Christian Rebischke
shibumi at gemini.archlinux.org
Sat Jul 10 16:05:52 UTC 2021
Date: Saturday, July 10, 2021 @ 16:05:51
Author: shibumi
Revision: 976472
archrelease: copy trunk to community-x86_64
Added:
cue/repos/community-x86_64/
cue/repos/community-x86_64/PKGBUILD
(from rev 976471, cue/trunk/PKGBUILD)
----------+
PKGBUILD | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
Copied: cue/repos/community-x86_64/PKGBUILD (from rev 976471, cue/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD (rev 0)
+++ community-x86_64/PKGBUILD 2021-07-10 16:05:51 UTC (rev 976472)
@@ -0,0 +1,42 @@
+# Maintainer: Christian Rebischke <chris.rebischke at archlinux.org>
+
+pkgname=cue
+pkgver=0.4.0
+pkgrel=1
+pkgdesc="Validate and define text-based and dynamic configuration"
+arch=('x86_64')
+url="https://github.com/cue-lang/cue"
+license=('Apache')
+makedepends=('go')
+depends=('glibc')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/cue-lang/cue/archive/v${pkgver}.tar.gz")
+sha512sums=('6454ebb9a9bda3b7c74a8842c0c02f4e394b5f3edbe6d46b196ed6f9d63eab21985d531d93435286ce3d0405b14b21186e5bf34b2eb143f8f688240992ad5326')
+
+build() {
+ cd "${pkgname}-${pkgver}/cmd/cue/"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
+ go build -ldflags "-s -w -linkmode=external " -v .
+ chmod +x cue
+}
+
+check() {
+ cd "${pkgname}-${pkgver}"
+ go test -v ./...
+}
+
+package() {
+ cd "${pkgname}-${pkgver}/cmd/cue/"
+ install -Dsm755 ./cue "${pkgdir}/usr/bin/cue"
+
+ # build bash completions
+ mkdir -p "${pkgdir}/usr/share/bash-completion/completions"
+ ./cue completion bash > "${pkgdir}/usr/share/bash-completion/completions/${pkgname}"
+
+ # build zsh completions
+ mkdir -p "${pkgdir}/usr/share/zsh/site-functions"
+ ./cue completion zsh > "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}"
+}
More information about the arch-commits
mailing list