summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD36
1 files changed, 36 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f6ffce196009
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+pkgname=bazel3
+pkgver=3.7.2
+pkgrel=1
+pkgdesc='Correct, reproducible, and fast builds for everyone'
+arch=('x86_64')
+license=('Apache')
+url='https://bazel.build/'
+depends=('java-environment=11' 'libarchive' 'zip' 'unzip')
+makedepends=('git' 'protobuf' 'python')
+provides=("bazel=${pkgver}")
+conflicts=('bazel')
+options=('!distcc' '!strip')
+source=("https://github.com/bazelbuild/bazel/releases/download/${pkgver}/bazel-${pkgver}-dist.zip"
+ "https://github.com/bazelbuild/bazel/releases/download/${pkgver}/bazel-${pkgver}-dist.zip.sig")
+sha512sums=('e8746ef5ec22feb95e9dbbddb3fb56cf8f49c80f326fc2a4e0ce2619607826fac22f46bfb995daee55bf9ffabb9d646b8454be2bce7b479da5cf2a7e5b3be62b'
+ 'SKIP')
+validpgpkeys=('71A1D0EFCFEB6281FD0437C93D5919B448457EE0')
+
+build() {
+ curl -L https://github.com/ll-h/bazel/commit/c814c1f908801795b99e19c5abc3d29213710a2e.patch|patch -p1
+ EMBED_LABEL=$pkgver EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk" ./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
+}