diff --git a/build.sh b/build.sh index aa4dfa4776efe5b865a34211a6535e93c3afaceb..f88e0911ed8fad4c8defb0b1ec38ca26fb59c837 100755 --- a/build.sh +++ b/build.sh @@ -183,7 +183,13 @@ if [ -z "$(reprepro listfilter reform "\$Source (== box64)")" ]; then git checkout upstream git checkout master pristine-tar checkout ../box64_0.1.8.orig.tar.xz - sbuild --host="$HOST_ARCH" --no-arch-all --arch-any $COMMON_SBUILD_OPTS --extra-repository="$SRC_LIST_PATCHED" + ret=0 + sbuild --host="$HOST_ARCH" --arch-all --arch-any $COMMON_SBUILD_OPTS --extra-repository="$SRC_LIST_PATCHED" || ret=$? + if [ "$ret" -ne 0 ]; then + # cross building failed -- try building + # "natively" with qemu-user + sbuild --build="$HOST_ARCH" --host="$HOST_ARCH" --arch-all --arch-any $COMMON_SBUILD_OPTS --extra-repository="$SRC_LIST_PATCHED" + fi reprepro include "$OURSUITE" ../box64_0.1.8-1_arm64.changes cd .. )