diff options
Diffstat (limited to 'community/glab/APKBUILD')
-rw-r--r-- | community/glab/APKBUILD | 49 |
1 files changed, 32 insertions, 17 deletions
diff --git a/community/glab/APKBUILD b/community/glab/APKBUILD index f22e2b5ebbc..3b598cb75d8 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.21.1 +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="${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=" -60ecc44c24b5665153b26083a35a5e783142d04476be87306b28642890bf2d923aa85af1912df645d5dc43cb8f9d1c7c63a4378d4c7600ca12a14c69a355fc2f glab-1.21.1.tar.gz +b73e213e4ed8d2bfe4174e5dc3d8ac35d6477060eb0c7a3a9a7b5b27bc5fc4fa6993a3d568c605c8f557db44c3f087198b19827795071388341925c2ec8d6338 glab-1.39.0.tar.gz " |