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
This commit is contained in:
parent
10fdf172d5
commit
530eddf30a
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user