mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-19 11:26:41 +02:00
49 lines
1.3 KiB
Text
49 lines
1.3 KiB
Text
maintainer="Hoang Nguyen <folliekazetani@protonmail.com>"
|
|
pkgname=ghq
|
|
pkgver=1.7.1
|
|
pkgrel=4
|
|
pkgdesc="CLI to manage remote repository clones"
|
|
url="https://github.com/x-motemen/ghq"
|
|
arch="all"
|
|
license="MIT"
|
|
makedepends="asciidoctor go"
|
|
subpackages="
|
|
$pkgname-doc
|
|
$pkgname-bash-completion
|
|
$pkgname-fish-completion
|
|
$pkgname-zsh-completion
|
|
"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/x-motemen/ghq/archive/refs/tags/v$pkgver.tar.gz"
|
|
|
|
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
|
|
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
|
|
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
|
|
|
|
build() {
|
|
go build -v -ldflags "-X main.revision=AlpineLinux"
|
|
|
|
sed -i '1 s/^.*$/= ghq(1)/' README.adoc
|
|
asciidoctor -b manpage README.adoc
|
|
}
|
|
|
|
check() {
|
|
go test ./...
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 ghq -t "$pkgdir"/usr/bin/
|
|
|
|
install -Dvm644 ghq.1 -t "$pkgdir"/usr/share/man/man1/
|
|
install -Dvm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
|
|
|
install -Dm644 misc/bash/_ghq \
|
|
"$pkgdir"/usr/share/bash-completion/completions/ghq
|
|
install -Dm644 misc/fish/ghq.fish \
|
|
"$pkgdir"/usr/share/fish/vendor_completions.d/ghq.fish
|
|
install -Dm644 misc/zsh/_ghq \
|
|
"$pkgdir"/usr/share/zsh/site-functions/_ghq
|
|
}
|
|
|
|
sha512sums="
|
|
335b692c63d4dacd5254f29fc087bc796268cfa4835e8b84c609a6c14c280bfad736d8774fcb00cb67fe1ee828c3d5dff114b858bdcb666550922f672db55421 ghq-1.7.1.tar.gz
|
|
"
|