blob: c09b0f2d62f562569c130977600aeefd294e474d (
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
|
# Maintainer: Simon Legner <Simon.Legner@gmail.com>
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Jeremy Asuncion <jeremyasuncion808@gmail.com>
pkgname=lab
pkgver=0.25.1
pkgrel=1
pkgdesc='A hub-like tool for GitLab'
arch=('x86_64')
url="https://zaquestion.github.io/$pkgname"
license=('custom:CC0')
depends=('git')
optdepends=('hub')
makedepends=('go')
source=("$pkgname-$pkgver.tar.gz::https://github.com/zaquestion/$pkgname/archive/v$pkgver.tar.gz")
sha256sums=('f8cccdfbf1ca5a2c76f894321a961dfe0dc7a781d95baff5181eafd155707d79')
prepare() {
cd "$pkgname-$pkgver"
export GOPATH="$srcdir"
go mod download
}
build () {
cd "$pkgname-$pkgver"
export GOPATH="$srcdir"
go build \
-trimpath \
-buildmode=pie \
-mod=readonly \
-modcacherw \
-ldflags "-extldflags \"$LDFLAGS\" -X main.version=$pkgver" \
.
./lab completion bash > completion.bash
./lab completion fish > completion.fish
./lab completion zsh > completion.zsh
}
package() {
cd "$pkgname-$pkgver"
install -Dm755 -t "$pkgdir/usr/bin/" $pkgname
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
install -Dm644 completion.bash "$pkgdir/usr/share/bash-completion/completions/lab"
install -Dm644 completion.fish "$pkgdir/usr/share/fish/vendor_completions.d/lab.fish"
install -Dm644 completion.zsh "$pkgdir/usr/share/zsh/site-functions/_lab"
}
|