blob: 79d0b83b8ce4f70d096e32ea0ec50c30afd613c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# Contributor: solidnerd <hi@solidnerd.dev>
# Maintainer: solidnerd <hi@solidnerd.dev>
pkgname=glab
pkgver=1.12.1
pkgrel=2
pkgdesc="Open source GitLab CLI tool written in Go"
url="https://github.com/profclems/glab"
arch="all !mips64" # blocked by go
license="MIT"
makedepends="go"
options="!check chmod-clean" # Need to be run in a git repo
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"
builddir="$srcdir/src/pofclems/glab/$pkgname"
export GOPATH="$srcdir"
export CGO_ENABLED=0
prepare() {
default_prepare
mkdir -p ${builddir%/*}
mv "$srcdir"/$pkgname-$pkgver "$builddir"/
}
build() {
make build
}
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
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
}
sha512sums="34eb532af2c819425fd19e9a59568498eee43c8870295dc38c2da4f97201f9f42314754d7cc307fb7690f748f0049e39778f5369eaf17325f0b63a7dead0c453 glab-1.12.1.tar.gz"
|