1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
Description: Install into proper Debian packaging directory
Author: Olek Wojnar <olek@debian.org>
Forwarded: not-needed
Last-Update: 2020-11-08
--- a/compile.sh
+++ b/compile.sh
@@ -31,7 +31,9 @@
source scripts/bootstrap/buildenv.sh
-mkdir -p output
+mkdir -p output/usr/share/bazel
+mkdir -p output/usr/bin
+mkdir -p output/etc/bazel
: ${BAZEL:=}
#
@@ -71,10 +73,10 @@
bazel_bin_path="$(get_bazel_bin_path)/src/bazel_nojdk${EXE_EXT}"
[ -e "$bazel_bin_path" ] \
|| fail "Could not find freshly built Bazel binary at '$bazel_bin_path'"
-cp -f "$bazel_bin_path" "output/bazel${EXE_EXT}" \
- || fail "Could not copy '$bazel_bin_path' to 'output/bazel${EXE_EXT}'"
-chmod 0755 "output/bazel${EXE_EXT}"
-BAZEL="$(pwd)/output/bazel${EXE_EXT}"
+cp -f "$bazel_bin_path" "output/usr/bin/bazel-4" \
+ || fail "Could not copy '$bazel_bin_path' to 'output/usr/bin/'"
+chmod 0755 "output/usr/bin/bazel-4"
+BAZEL="$(pwd)/output/usr/bin/bazel-4"
clear_log
display "Build successful! Binary is here: ${BAZEL}"
--- a/src/package-bazel.sh
+++ b/src/package-bazel.sh
@@ -106,6 +106,10 @@
# Zero timestamps.
(cd $PACKAGE_DIR; xargs touch -t 198001010000.00) < files.list
+(cd $PACKAGE_DIR; cp -r -t "${WORKDIR}/output/usr/share/bazel" *)
+cp debian/bazelrc ${WORKDIR}/output/etc/bazel/bazelrc
+cp scripts/packages/bazel.sh ${WORKDIR}/output/usr/bin/bazel
+
if [[ "$DEV_BUILD" -eq 1 ]]; then
# Create output zip with lowest compression, but fast.
ZIP_ARGS="-q1DX@"
|