From 530eddf30a059fcdeefa96fa8cac20bf263fc39b Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Sat, 2 Mar 2019 23:47:13 +0100 Subject: [PATCH] build-package: add new env. var. TERMUX_PACKAGES_DIRECTORIES Can be set to the path to packages/ directories in other repos (like unstable-package/packages/, termux-root-packages/packages/, ..). buildorder.py then searches these directories for packages and dependencies --- scripts/build/termux_step_setup_variables.sh | 1 + scripts/build/termux_step_start_build.sh | 4 ++-- scripts/buildorder.py | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/build/termux_step_setup_variables.sh b/scripts/build/termux_step_setup_variables.sh index 9327c7921..fd1dc6cfd 100644 --- a/scripts/build/termux_step_setup_variables.sh +++ b/scripts/build/termux_step_setup_variables.sh @@ -15,6 +15,7 @@ termux_step_setup_variables() { : "${TERMUX_INSTALL_DEPS:="false"}" : "${TERMUX_REPO_SIGNING_KEYS:="packages/apt/trusted.gpg packages/termux-keyring/grimler.gpg packages/termux-keyring/xeffyr.gpg"}" : "${TERMUX_PKG_MAINTAINER:="Fredrik Fornwall @fornwall"}" + : "${TERMUX_PACKAGES_DIRECTORIES:="packages"}" if [ -z ${TERMUX_REPO_URL+x} ]; then TERMUX_REPO_URL=(https://termux.net) diff --git a/scripts/build/termux_step_start_build.sh b/scripts/build/termux_step_start_build.sh index 56c558949..526e94754 100644 --- a/scripts/build/termux_step_start_build.sh +++ b/scripts/build/termux_step_start_build.sh @@ -49,7 +49,7 @@ termux_step_start_build() { fi mkdir -p /data/data/.built-packages echo "$DEP_VERSION" > "/data/data/.built-packages/$PKG" - done<<<$(./scripts/buildorder.py -i "$TERMUX_PKG_BUILDER_DIR") + done<<<$(./scripts/buildorder.py -i "$TERMUX_PKG_BUILDER_DIR" $TERMUX_PACKAGES_DIRECTORIES) elif [ "$TERMUX_SKIP_DEPCHECK" = false ] && [ "$TERMUX_INSTALL_DEPS" = false ]; then # Build dependencies while read PKG PKG_DIR; do @@ -59,7 +59,7 @@ termux_step_start_build() { echo "Building dependency $PKG if necessary..." # Built dependencies are put in the default TERMUX_DEBDIR instead of the specified one ./build-package.sh -a $TERMUX_ARCH -s "${PKG_DIR}" - done<<<$(./scripts/buildorder.py "$TERMUX_PKG_BUILDER_DIR") + done<<<$(./scripts/buildorder.py "$TERMUX_PKG_BUILDER_DIR" $TERMUX_PACKAGES_DIRECTORIES) fi TERMUX_PKG_FULLVERSION=$TERMUX_PKG_VERSION diff --git a/scripts/buildorder.py b/scripts/buildorder.py index 770c588cf..2219de753 100755 --- a/scripts/buildorder.py +++ b/scripts/buildorder.py @@ -236,7 +236,9 @@ def main(): args = parser.parse_args() fast_build_mode = args.i package = args.package - packages_directories = args.package_dirs + ['packages'] + packages_directories = args.package_dirs + if 'packages' not in packages_directories: + packages_directories.append('packages') if not package: full_buildorder = True