pkgname=bazel pkgver=0.6.1 pkgrel=1 pkgdesc="Correct, reproducible, fast builds for everyone." arch=("x86_64") url="https://bazel.build/" license=('Apache') depends=('java-environment>=8' 'libarchive' 'zip' 'unzip') makedepends=('git' 'protobuf' 'python3') source=("https://github.com/bazelbuild/${pkgname}/releases/download/${pkgver}/${pkgname}-${pkgver}-dist.zip") sha256sums=('dada1f60a512789747011184b2767d2b44136ef3b036d86947f1896d200d2ba7') options=('!distcc' '!strip') build() { ./compile.sh ./output/bazel build scripts:bazel-complete.bash cd output ./bazel shutdown } package() { install -Dm755 ${srcdir}/scripts/packages/bazel.sh ${pkgdir}/usr/bin/bazel install -Dm755 ${srcdir}/output/bazel ${pkgdir}/usr/bin/bazel-real install -Dm644 ${srcdir}/bazel-bin/scripts/bazel-complete.bash ${pkgdir}/usr/share/bash-completion/completions/bazel install -Dm644 ${srcdir}/scripts/zsh_completion/_bazel ${pkgdir}/usr/share/zsh/site-functions/_bazel mkdir -p ${pkgdir}/opt/bazel/ for d in examples third_party tools; do cp -r ${srcdir}/${d} ${pkgdir}/opt/bazel/ done }