mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-06 17:22:07 +01:00
67 lines
2.4 KiB
Plaintext
67 lines
2.4 KiB
Plaintext
# Maintainer: Leon White <badfunkstripe@gmail.com>
|
|
pkgname=bazel8
|
|
pkgver=8.3.1
|
|
pkgrel=0
|
|
pkgdesc="Bazel is an open-source build and test tool"
|
|
url="https://bazel.build/"
|
|
arch="x86_64 aarch64"
|
|
license="Apache-2.0"
|
|
depends="bash openjdk21-jdk"
|
|
makedepends="linux-headers python3 unzip zip"
|
|
# Bazel binary is thin C++ client with zip file embedded into the binary,
|
|
# stripping breaks that: https://github.com/bazelbuild/bazel/issues/11842
|
|
options="!strip"
|
|
provides="bazel=$pkgver-r$pkgrel"
|
|
subpackages="$pkgname-bash-completion"
|
|
source="
|
|
https://github.com/bazelbuild/bazel/releases/download/$pkgver/bazel-$pkgver-dist.zip
|
|
bazel-$pkgver-archive.tar.gz::https://github.com/bazelbuild/bazel/archive/refs/tags/$pkgver.tar.gz
|
|
0001-off64t-fix.patch
|
|
0002-bash-completion-busybox.patch
|
|
"
|
|
builddir="$srcdir/"
|
|
|
|
build() {
|
|
EMBED_LABEL=$pkgver-$pkgrel \
|
|
EXTRA_BAZEL_ARGS=--tool_java_runtime_version=local_jdk \
|
|
./compile.sh
|
|
|
|
./output/bazel build //scripts:bazel-complete.bash
|
|
cp bazel-bin/scripts/bazel-complete.bash output/
|
|
|
|
./output/bazel clean --expunge
|
|
}
|
|
|
|
check() {
|
|
ln -s bazel-$pkgver/examples examples
|
|
# shellcheck disable=SC2046
|
|
./output/bazel build $(\
|
|
./output/bazel query --noshow_progress '//examples/...' \
|
|
| grep -vF \
|
|
-e /android/ \
|
|
-e /windows/ \
|
|
-e :hello-error-prone \
|
|
)
|
|
./output/bazel test \
|
|
//examples/cpp:hello-success_test \
|
|
//examples/java-native/src/test/java/com/example/myproject:custom \
|
|
//examples/java-native/src/test/java/com/example/myproject:hello \
|
|
//examples/java-starlark/src/test/java/com/example/myproject:pass \
|
|
//examples/shell:test
|
|
|
|
./output/bazel clean --expunge
|
|
}
|
|
|
|
package() {
|
|
install -Dm 755 -t "$pkgdir/usr/bin" output/bazel
|
|
install -Dm 644 output/bazel-complete.bash \
|
|
"$pkgdir/usr/share/bash-completion/completions/bazel"
|
|
}
|
|
|
|
sha512sums="
|
|
79dd067fafcc322567a78467588849ce21917f9fce28b519c877ea0b5dd4bbe0af0941c9c63aed9b0f887ec34565f2ef9f8eecd7bf01a0cc90b79cecad8ce42c bazel-8.3.1-archive.tar.gz
|
|
d27b58c1694d353a14d40ee96ffe8b2783b8c715318dd55c3a8befd41ab2517730a7fe745237fbb3b94c434b7af2cd5037685d7c5914d8bde7d20a2b9a0bdecb bazel-8.3.1-dist.zip
|
|
8b6ddcda8be35e49f4f5ece03ea1958a5f814b2b361544c1c7ac8f056f3d8282eaf329101d0a16cd2b981e6056b2179a476bd50a22adb81a5d5f663c4e8c15d3 0001-off64t-fix.patch
|
|
b0bae27087f8d1da6a455500fc9fb4758ffdeaa27f0b11de720a0607aa3a4d682adfc1286b6385fe53e67296e7af1f61570b6b3093def1e8cee8531c7f4f5f82 0002-bash-completion-busybox.patch
|
|
"
|