diff options
-rw-r--r-- | main/ninja/APKBUILD | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/main/ninja/APKBUILD b/main/ninja/APKBUILD index 462c08cb91..2fba8a602f 100644 --- a/main/ninja/APKBUILD +++ b/main/ninja/APKBUILD @@ -2,22 +2,25 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=ninja pkgver=1.9.0 -pkgrel=2 +pkgrel=3 pkgdesc="Small build system with a focus on speed" url="https://ninja-build.org/" arch="all" license="Apache-2.0" checkdepends="gtest" makedepends="asciidoctor python3 re2c" -subpackages="$pkgname-doc" +subpackages=" + $pkgname-doc + $pkgname-bash-completion:bashcomp:noarch + $pkgname-zsh-completion:zshcomp:noarch + " source=" $pkgname-$pkgver.tar.gz::https://github.com/martine/ninja/archive/v$pkgver.tar.gz fix-musl.patch " -builddir="$srcdir"/${pkgname}-${pkgver} _py3_sitelib() { - python3 -c 'import sysconfig; print(sysconfig.get_path("platlib"))' + python3 -c 'import sysconfig; print(sysconfig.get_path("platlib"))' } build() { @@ -41,12 +44,27 @@ package() { install -m644 -D doc/manual.html \ "$pkgdir/usr/share/doc/ninja/manual.html" - install -m644 -D misc/bash-completion \ - "$pkgdir/usr/share/bash-completion/completions/ninja" - install -m644 -D misc/ninja_syntax.py \ "${pkgdir}$(_py3_sitelib)/ninja_syntax.py" } +bashcomp() { + depends="" + pkgdesc="Bash completions for $pkgname" + install_if="$pkgname=$pkgver-r$pkgrel bash-completion" + + install -m644 -D "$builddir"/misc/bash-completion \ + "$subpkgdir"/usr/share/bash-completion/completions/ninja +} + +zshcomp() { + depends="" + pkgdesc="Zsh compltions for $pkgname" + install_if="$pkgname=$pkgver-r$pkgrel zsh" + + install -Dm644 "$builddir"/misc/zsh-completion \ + "$subpkgdir"/usr/share/zsh/site-functions/_ninja +} + sha512sums="a8b5ad00b60bddbdb8439a6092c91a65d093f9bcd6241f69088eb35bea2847efe673c3107a130dc754c747c7712b839d8f88e88d8389520cf7143668ee053feb ninja-1.9.0.tar.gz 09159f24a0446eff7e1d0b306911fd1a1e96257f02a32d6b241c5d60e3350126a7859f0edf0a2f858214c5c5af23f886289ce2e9c77f0e8e2257fab931933de2 fix-musl.patch" |