Ship man page in PKGBUILD

This commit is contained in:
2024-08-06 16:33:34 -04:00
parent bb127860c3
commit 3480fd8fdb
+8 -2
View File
@@ -11,7 +11,7 @@ pkgdesc='A simple, self-hosted, SSH-synchronized password/note manager for the C
arch=('x86_64' 'i686' 'i486' 'pentium4' 'aarch64' 'armv7h' 'riscv64')
url='https://github.com/rwinkhart/MUTN'
license=('MIT')
makedepends=(go util-linux)
makedepends=(go util-linux gzip)
optdepends=(
'wl-clipboard: Wayland clipboard support'
'xclip: X11 clipboard support'
@@ -21,6 +21,11 @@ source=(\""$source"\")
sha512sums=(SKIP)
build() {
cd \${srcdir}/MUTN
# compress man page
gzip -kf ./docs/man
# determine microarchitecture feature level
case \$CARCH in
'x86_64')
@@ -38,7 +43,7 @@ build() {
# TODO check aarch64 feature level
esac
cd \${srcdir}/MUTN
# compile binary
CGO_ENABLED=1 go build -ldflags=\"-s -w\" -trimpath ./mutn.go
}
@@ -48,6 +53,7 @@ package() {
install -Dm644 ./LICENSE \${pkgdir}/usr/share/licenses/mutn/LICENSE
install -Dm644 ./completions/zsh/_mutn \${pkgdir}/usr/share/zsh/site-functions/_mutn
install -Dm644 ./completions/bash/mutn \${pkgdir}/usr/share/bash-completion/completions/mutn
install -Dm644 ./docs/man.gz \${pkgdir}/usr/share/man/man1/mutn.1.gz
}
" > output/PKGBUILD
printf '\nPKGBUILD generated\n\n'