From 06c89b65879f175d664b0582e1dbb4f6e192adbc Mon Sep 17 00:00:00 2001 From: Dom Cobley Date: Thu, 18 Nov 2021 00:48:15 +0000 Subject: [PATCH] build_rpi_debian_packages.sh: Separate build directory by arch --- build_rpi_debian_packages.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/build_rpi_debian_packages.sh b/build_rpi_debian_packages.sh index eeae61c135523..aca98a6d20a6d 100755 --- a/build_rpi_debian_packages.sh +++ b/build_rpi_debian_packages.sh @@ -1,16 +1,17 @@ #!/bin/bash +ARCH=$(dpkg --print-architecture) REPO_DIR=${REPO_DIR:-$(pwd)} -KODI_BUILD_DIR=${KODI_BUILD_DIR:-"${REPO_DIR}/build"} +KODI_BUILD_DIR=${KODI_BUILD_DIR:-"${REPO_DIR}/build_${ARCH}"} ADDONS_TO_BUILD=${ADDONS_TO_BUILD:-""} -ADDONS_BUILD_DIR=${ADDONS_BUILD_DIR:-"${KODI_BUILD_DIR}/build/addons_build/"} +ADDONS_BUILD_DIR=${ADDONS_BUILD_DIR:-"${KODI_BUILD_DIR}/addons_build/"} ADDONS_BUILD_NUMBER=${ADDONS_BUILD_NUMBER:-"1"} #CPU=${CPU:-"cortex-a7"} BUILD_TYPE=${BUILD_TYPE:-"Release"} -DEB_ARCH=${DEB_ARCH:-"armhf"} +DEB_ARCH=${DEB_ARCH:-${ARCH}} DEB_PACK_VERSION=${DEB_PACK_VERSION:-"1"} DEBUILD_OPTS=${DEBUILD_OPTS:-""} -BUILD_THREADS=$(( $(nproc)+2)) +BUILD_THREADS=$(( $(nproc)*3/2 )) function usage { echo "$0: This script builds a Kodi debian package from a git repository optimized for Raspberry Pi 4.