aboutsummaryrefslogtreecommitdiffstats
path: root/community/glab/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/glab/APKBUILD')
-rw-r--r--community/glab/APKBUILD36
1 files changed, 22 insertions, 14 deletions
diff --git a/community/glab/APKBUILD b/community/glab/APKBUILD
index a60275d1394..3b598cb75d8 100644
--- a/community/glab/APKBUILD
+++ b/community/glab/APKBUILD
@@ -1,29 +1,37 @@
# Contributor: solidnerd <niclas@mietz.io>
-# Maintainer: solidnerd <niclas@mietz.io>
+# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=glab
-pkgver=1.22.0
-pkgrel=5
+pkgver=1.39.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="$srcdir/go-cache"
-export GOTMPDIR="$srcdir"
-export GOMODCACHE="$srcdir/go"
+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
@@ -35,13 +43,13 @@ build() {
}
package() {
- install -Dm755 "$builddir"/bin/glab -t "$pkgdir"/usr/bin/
+ install -Dm755 bin/glab -t "$pkgdir"/usr/bin/
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/completions/glab.fish
+ install -Dm644 fish.comp "$pkgdir"/usr/share/fish/vendor_completions.d/glab.fish
}
sha512sums="
-1948e9c330c31240fcfa5fdcae597b4ae11b1df2d3d5d85a095913988a8f5483107202ce66a474c081cc4b8a44cc5b317dc1f65f75f6b0c3e11308e2bb2b91b5 glab-1.22.0.tar.gz
+b73e213e4ed8d2bfe4174e5dc3d8ac35d6477060eb0c7a3a9a7b5b27bc5fc4fa6993a3d568c605c8f557db44c3f087198b19827795071388341925c2ec8d6338 glab-1.39.0.tar.gz
"