aboutsummaryrefslogtreecommitdiffstats
path: root/community/glab/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/glab/APKBUILD')
-rw-r--r--community/glab/APKBUILD51
1 files changed, 33 insertions, 18 deletions
diff --git a/community/glab/APKBUILD b/community/glab/APKBUILD
index c090e9b4ed5..ecd2b302181 100644
--- a/community/glab/APKBUILD
+++ b/community/glab/APKBUILD
@@ -1,40 +1,55 @@
# Contributor: solidnerd <niclas@mietz.io>
-# Maintainer: solidnerd <niclas@mietz.io>
+# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=glab
-pkgver=1.20.0
-pkgrel=1
+pkgver=1.40.0
+pkgrel=0
pkgdesc="Open source GitLab CLI tool written in Go"
-url="https://github.com/profclems/glab"
+url="https://gitlab.com/gitlab-org/cli"
arch="all"
license="MIT"
depends="git"
makedepends="go"
-options="!check chmod-clean" # Need to be run in a git repo
+options="!check"
subpackages="
$pkgname-bash-completion
$pkgname-zsh-completion
$pkgname-fish-completion
"
-source="$pkgname-$pkgver.tar.gz::https://github.com/profclems/glab/archive/v$pkgver.tar.gz"
+source="$pkgname-$pkgver.tar.gz::https://gitlab.com/gitlab-org/cli/-/archive/v$pkgver/cli-v$pkgver.tar.gz"
+builddir="$srcdir/cli-v$pkgver"
-export CGO_ENABLED=0
+export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
+export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
+export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
build() {
- make build GLAB_VERSION=$pkgver
+ # date seems a little broken to override
+ go build -ldflags "
+ -X main.debugMode=false
+ -X main.version=v$pkgver
+ -X main.buildDate=$(date -u "+%Y-%m-%d" ${SOURCE_DATE_EPOCH:+-d @$SOURCE_DATE_EPOCH})
+ -extldflags \"$LDFLAGS\"
+ " \
+ -o bin/glab \
+ ./cmd/glab/main.go
+
+ # XXX: When glab is run in fakeroot it segfaults for some reason
+ # on ppc64le. By generating the compilation files here we
+ # workaround that but we need to investigate why it segfaults in
+ # fakeroot eventually.
+ bin/glab completion --shell bash > bash.comp
+ bin/glab completion --shell zsh > zsh.comp
+ bin/glab completion --shell fish > fish.comp
}
package() {
- install -Dm755 "$builddir"/bin/glab -t "$pkgdir"/usr/bin/
-
- mkdir -p \
- "$pkgdir"/usr/share/bash-completion/completions \
- "$pkgdir"/usr/share/zsh/site-functions \
- "$pkgdir"/usr/share/fish/completions
+ install -Dm755 bin/glab -t "$pkgdir"/usr/bin/
- bin/glab completion --shell bash > "$pkgdir"/usr/share/bash-completion/completions/glab.bash
- bin/glab completion --shell zsh > "$pkgdir"/usr/share/zsh/site-functions/_glab
- bin/glab completion --shell fish > "$pkgdir"/usr/share/fish/completions/glab.fish
+ install -Dm644 bash.comp "$pkgdir"/usr/share/bash-completion/completions/glab.bash
+ install -Dm644 zsh.comp "$pkgdir"/usr/share/zsh/site-functions/_glab
+ install -Dm644 fish.comp "$pkgdir"/usr/share/fish/vendor_completions.d/glab.fish
}
+
sha512sums="
-50900aa02117193c5cd86411b415831dec5ba7f6392e04cf7d45b3a7e6fe976fe9da8f49b01fe1e2f69e6379c4ae6ebe52f23cd5805e7b93ef5319900af44f81 glab-1.20.0.tar.gz
+1523f18c6d247572de60a60997651fed8bc2ba0b1426ae12f54758294dfca4dd53095f39b2a62bb806eacbdef978e820bab3c87fea5344efeac6ecf1f6f98b12 glab-1.40.0.tar.gz
"