diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2022-08-08 01:27:48 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2022-08-07 23:32:03 +0000 |
commit | 41e97d848e8e2f1711b80518490d218b28dbca9b (patch) | |
tree | 1b740570b3fac101964fd7e1aec1770aa5a945dc | |
parent | d99efea4a681cebcd049562bb26b90a7bb7aed24 (diff) |
community/pueue: add shell completions
-rw-r--r-- | community/pueue/APKBUILD | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/community/pueue/APKBUILD b/community/pueue/APKBUILD index 4bacfeaf4f3..f0941c7eee2 100644 --- a/community/pueue/APKBUILD +++ b/community/pueue/APKBUILD @@ -10,6 +10,11 @@ arch="all !ppc64le !riscv64 !s390x" license="MIT" checkdepends="bash" makedepends="cargo" +subpackages=" + $pkgname-bash-completion + $pkgname-fish-completion + $pkgname-zsh-completion + " source="https://github.com/Nukesor/pueue/archive/v$pkgver/$pkgname-$pkgver.tar.gz" options="net" @@ -26,6 +31,11 @@ prepare() { build() { cargo build --release --frozen + + mkdir -p target/completion + local sh; for sh in bash fish zsh; do + ./target/release/pueue completions $sh target/completion/ + done } check() { @@ -33,8 +43,14 @@ check() { } package() { - install -D -m755 target/release/pueue -t "$pkgdir"/usr/bin/ - install -D -m755 target/release/pueued -t "$pkgdir"/usr/bin/ + cd target + + install -D -m755 release/pueue -t "$pkgdir"/usr/bin/ + install -D -m755 release/pueued -t "$pkgdir"/usr/bin/ + + install -D -m644 completion/$pkgname.bash "$pkgdir"/usr/share/bash-completion/completions/$pkgname + install -D -m644 completion/*.fish -t "$pkgdir"/usr/share/fish/completions/ + install -D -m644 completion/_* -t "$pkgdir"/usr/share/zsh/site-functions/ } sha512sums=" |