diff options
author | Oleg Titov <oleg.titov@gmail.com> | 2019-12-31 21:08:14 -0600 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2020-01-01 17:44:04 +0100 |
commit | 755e4d30662f59972920cc1a97c611fc1acfc359 (patch) | |
tree | 75d88d6407abf696b6b1de5f40f62c51c56f2916 /testing/bazel | |
parent | 1f6aefc41b1a12d505bdea22f58d437145a8f0e7 (diff) | |
download | aports-755e4d30662f59972920cc1a97c611fc1acfc359.tar.bz2 aports-755e4d30662f59972920cc1a97c611fc1acfc359.tar.xz |
testing/bazel: add bash completion
Diffstat (limited to 'testing/bazel')
-rw-r--r-- | testing/bazel/APKBUILD | 21 | ||||
-rw-r--r-- | testing/bazel/bash_completion.patch | 13 |
2 files changed, 33 insertions, 1 deletions
diff --git a/testing/bazel/APKBUILD b/testing/bazel/APKBUILD index 4d9c529975..9909d3f8a1 100644 --- a/testing/bazel/APKBUILD +++ b/testing/bazel/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Oleg Titov <oleg.titov@gmail.com> pkgname=bazel pkgver=2.0.0 -pkgrel=3 +pkgrel=4 pkgdesc="A fast, scalable, multi-language and extensible build system" url="https://bazel.build" arch="x86_64" @@ -12,10 +12,12 @@ makedepends="bash python3 linux-headers protobuf" options="!strip" subpackages=" $pkgname-doc + $pkgname-bash-completion:bashcomp:noarch $pkgname-zsh-completion:zshcomp:noarch $pkgname-examples::noarch " source="https://github.com/bazelbuild/bazel/releases/download/$pkgver/bazel-$pkgver-dist.zip + bash_completion.patch python3.patch" build() { @@ -27,6 +29,12 @@ build() { ./output/bazel shutdown + ./scripts/generate_bash_completion.sh \ + --bazel=output/bazel \ + --output=output/bazel-complete.bash \ + --prepend=scripts/bazel-complete-header.bash \ + --prepend=scripts/bazel-complete-template.bash + echo startup --server_javabase=$JAVA_HOME \ >> scripts/packages/bazel.bazelrc } @@ -52,6 +60,16 @@ package() { install -m644 -D -t "$pkgdir"/usr/share/doc/$pkgname README.md } +bashcomp() { + depends="" + pkgdesc="Bash completion for $pkgname" + install_if="$pkgname=$pkgver-r$pkgrel bash-completion" + + mkdir -p "$subpkgdir"/usr/share/bash-completion/completions + mv "$builddir"/output/bazel-complete.bash \ + "$subpkgdir"/usr/share/bash-completion/completions/bazel +} + zshcomp() { depends="" pkgdesc="Zsh completion for $pkgname" @@ -75,4 +93,5 @@ unpack() { } sha512sums="db609e9d0ee0cdbfb999de850db17907af02dc26e605f4617dfeb2fbac5c30c4c0a9f48c6ba3673ffe8babb5b9e157cc51c32832015b85ed279b6b160506cdae bazel-2.0.0-dist.zip +6eb1fcb553518348f5c2dacf239377dbaa2593b751ba98c0c257d0138c55b159891fa3744168a6cff8b305758c64f9153cdc01dd3394b5fff2168319188288df bash_completion.patch 0f8fddb7a43f6382a003037e1ba0cfc0e7f510f341a4a29c73e13cc7f64862d6156e14111005f300b0dad22815bd95b3670f8e0d33ce3f4388b0990bbbc5c5e6 python3.patch" diff --git a/testing/bazel/bash_completion.patch b/testing/bazel/bash_completion.patch new file mode 100644 index 0000000000..74cedc6a77 --- /dev/null +++ b/testing/bazel/bash_completion.patch @@ -0,0 +1,13 @@ +Bash completion patch to fix error in expr + +--- a/scripts/generate_bash_completion.sh.orig ++++ a/scripts/generate_bash_completion.sh +@@ -34,7 +34,7 @@ + } + + get_optarg() { +- expr -- "${1}" : "[^=]*=\\(.*\\)" ++ expr "${1}" : "[^=]*=\\(.*\\)" + } + + append= |