aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
Diffstat (limited to 'community')
-rw-r--r--community/yash/APKBUILD31
1 files changed, 30 insertions, 1 deletions
diff --git a/community/yash/APKBUILD b/community/yash/APKBUILD
index 1cf22ca625..142d1153c2 100644
--- a/community/yash/APKBUILD
+++ b/community/yash/APKBUILD
@@ -10,9 +10,22 @@ license="GPL-2.0-or-later"
depends="$pkgname-completion"
makedepends="ncurses-dev"
install="$pkgname.post-install $pkgname.pre-deinstall"
-subpackages="$pkgname-completion::noarch $pkgname-doc"
+subpackages="$pkgname-doc"
source="https://github.com/magicant/yash/releases/download/$pkgver/yash-$pkgver.tar.xz"
+_compdir="usr/share/yash/completion"
+
+# Move some bigger completion files to separate subpackages.
+_comps="git:git:git[gkx]:git-*
+ openssh-client:ssh:ssh-*
+ subversion:svn
+ valgrind:valgrind
+ "
+for _i in $_comps; do
+ subpackages="$subpackages ${_i%%:*}-yash-completion:_completion:noarch"
+done
+subpackages="$subpackages $pkgname-completion::noarch"
+
prepare() {
default_prepare
@@ -45,6 +58,22 @@ package() {
rm -Rf "$pkgdir"/usr/share/man/ja
}
+_completion() {
+ local name="${subpkgname%-yash-completion}"
+ pkgdesc="Yash completions for $name"
+ depends="$pkgname-completion"
+ install_if="$pkgname-completion=$pkgver-r$pkgrel $name"
+
+ local files=$(printf '%s\n' $_comps \
+ | sed -En "s|^$name:(.*)|\1|p" \
+ | tr : ' ')
+ [ "$files" ] || die "$name not found in \$_comps"
+
+ local f; for f in $files; do
+ amove usr/share/yash/completion/$f
+ done
+}
+
completion() {
pkgdesc="$pkgdesc (command-line completion)"
depends=""