Generate and install shell completion files

This commit is contained in:
Hauke Stieler 2025-03-16 11:33:50 +01:00
parent 4a861f0de5
commit eef80a050f
No known key found for this signature in database
GPG key ID: 1C242A9080C2A8F0

View file

@ -1,16 +1,15 @@
# Maintainer: Hauke Stieler <mail@hauke-stieler.d>
pkgname=wiki2book
pkgver=0.3.0
pkgver=0.4.0
pkgrel=1
pkgdesc="Wiki2book is a CLI tool to convert one or multiple Wikipedia articles into an eBook."
arch=("any")
url="https://github.com/hauke96/wiki2book"
license=("GPL-3.0")
depends=("imagemagick")
depends=("imagemagick" "pandoc")
optdepends=(
"ttf-dejavu: Font used in the default style"
"pandoc: Used as one possible way to create EPUB files"
"librsvg: Tool used to convert SVGs into raster images")
makedepends=("go>=1.22")
backup=()
@ -32,6 +31,10 @@ build() {
# Build wiki2book and place it into the current working dir.
./build.sh -o linux -a $CARCH -f wiki2book-bin
./wiki2book-bin completion bash > wiki2book-completion-bash
./wiki2book-bin completion fish > wiki2book-completion-fish
./wiki2book-bin completion zsh > wiki2book-completion-zsh
}
package() {
@ -41,4 +44,8 @@ package() {
install -d "${pkgdir}"/usr/share/wiki2book/
install -Dm644 wiki2book/configs/* "${pkgdir}"/usr/share/wiki2book/
install -Dm644 wiki2book/wiki2book-completion-bash"${pkgdir}"/usr/share/bash-completion/completions/wiki2book
install -Dm644 wiki2book/wiki2book-completion-bash"${pkgdir}"/usr/share/fish/vendor_completions.d/wiki2book.fish
install -Dm644 wiki2book/wiki2book-completion-bash"${pkgdir}"/usr/share/zsh/site-functions/_wiki2book
}