mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-03-12 00:51:51 +01:00
56 lines
1.7 KiB
Plaintext
56 lines
1.7 KiB
Plaintext
# Maintainer: Leon White <badfunkstripe@gmail.com>
|
|
pkgname=bazel7
|
|
pkgver=7.4.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"
|
|
source="
|
|
https://github.com/bazelbuild/bazel/releases/download/$pkgver/bazel-$pkgver-dist.zip
|
|
0001-off64t-fix.patch
|
|
"
|
|
builddir="$srcdir/"
|
|
|
|
build() {
|
|
EMBED_LABEL=$pkgver-$pkgrel \
|
|
EXTRA_BAZEL_ARGS=--tool_java_runtime_version=local_jdk \
|
|
./compile.sh
|
|
|
|
./output/bazel clean --expunge
|
|
}
|
|
|
|
check() {
|
|
# 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
|
|
}
|
|
|
|
sha512sums="
|
|
0601125c9aea592dbfc28af1540be35a2d35fb50ec8773d6b5eb3bdaf8a22337c84798baa2f3833627f56592b06429cb91ed4f9c2fc197a9c193ed8fa40a98b7 bazel-7.4.1-dist.zip
|
|
942bc9b962637da7bf83aa075d5acba84d2cf6e4b928cc1b0f6fec08f112e67ffec645a9e46be5716be17b5a51b8aee8aca6d7451908ff3532552291b1b10777 0001-off64t-fix.patch
|
|
"
|