testing/git-bug: add webui and completion & doc subpackages

This commit is contained in:
Matthias Ahouansou 2023-12-17 19:20:10 +00:00 committed by omni
parent a1c7f9b66b
commit fea1e2c971

View File

@ -2,18 +2,27 @@
# Maintainer: Thomas Kienlen <kommander@laposte.net>
pkgname=git-bug
pkgver=0.8.0
pkgrel=8
pkgrel=9
pkgdesc="Distributed, offline-first bug tracker embedded in git, with bridges"
url="https://github.com/MichaelMure/git-bug"
arch="all"
license="GPL-3.0-or-later"
makedepends="go"
options="net"
makedepends="
go
npm
"
subpackages="
$pkgname-doc
$pkgname-bash-completion
$pkgname-zsh-completion
$pkgname-fish-completion
"
source="
git-bug-$pkgver.tar.gz::https://github.com/MichaelMure/git-bug/archive/v$pkgver.tar.gz
fix-tests.patch
Makefile.patch
"
options="net"
export GIT_COMMIT=v$pkgver
export GIT_LAST_TAG=v$pkgver
@ -24,16 +33,31 @@ export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
prepare() {
default_prepare
npm ci --prefix webui
}
build() {
make pack-webui
make
}
check() {
make test
cd webui
make test
}
package() {
install -Dm755 git-bug "$pkgdir"/usr/bin/git-bug
install -Dm 644 misc/completion/bash/git-bug "$pkgdir"/usr/share/bash-completion/completions/git-bug
install -Dm 644 misc/completion/fish/git-bug "$pkgdir"/usr/share/fish/vendor_completions.d/git-bug.fish
install -Dm 644 misc/completion/zsh/git-bug "$pkgdir"/usr/share/zsh/site-functions/_git-bug
install -Dm 644 doc/man/*.1 -t "$pkgdir"/usr/share/man/man1
}
sha512sums="