build-package.sh: more fixes for variable checking

This commit is contained in:
Leonid Pliushch 2019-08-13 18:43:08 +03:00
parent 75f9142e10
commit c14b5e7334
5 changed files with 6 additions and 6 deletions

View File

@ -2,7 +2,7 @@ termux_step_configure_cmake() {
termux_setup_cmake
local BUILD_TYPE=MinSizeRel
$TERMUX_DEBUG && BUILD_TYPE=Debug
[ "$TERMUX_DEBUG" = "true" ] && BUILD_TYPE=Debug
local CMAKE_PROC=$TERMUX_ARCH
test $CMAKE_PROC == "arm" && CMAKE_PROC='armv7-a'

View File

@ -1,6 +1,6 @@
termux_get_repo_files() {
# Not needed for on-device builds.
$TERMUX_ON_DEVICE_BUILD && return
[ "$TERMUX_ON_DEVICE_BUILD" = "true" ] && return
# Ensure folders present (but not $TERMUX_PKG_SRCDIR, it will be created in build)
mkdir -p "$TERMUX_COMMON_CACHEDIR" \

View File

@ -4,7 +4,7 @@ termux_step_create_debfile() {
TERMUX_PKG_INSTALLSIZE=$(du -sk . | cut -f 1)
# From here on TERMUX_ARCH is set to "all" if TERMUX_PKG_PLATFORM_INDEPENDENT is set by the package
${TERMUX_PKG_PLATFORM_INDEPENDENT-false} && TERMUX_ARCH=all
[ "$TERMUX_PKG_PLATFORM_INDEPENDENT" = "true" ] && TERMUX_ARCH=all
mkdir -p DEBIAN
cat > DEBIAN/control <<-HERE
@ -18,7 +18,7 @@ termux_step_create_debfile() {
test ! -z "$TERMUX_PKG_BREAKS" && echo "Breaks: $TERMUX_PKG_BREAKS" >> DEBIAN/control
test ! -z "$TERMUX_PKG_PRE_DEPENDS" && echo "Pre-Depends: $TERMUX_PKG_PRE_DEPENDS" >> DEBIAN/control
test ! -z "$TERMUX_PKG_DEPENDS" && echo "Depends: $TERMUX_PKG_DEPENDS" >> DEBIAN/control
${TERMUX_PKG_ESSENTIAL-false} && echo "Essential: yes" >> DEBIAN/control
[ "$TERMUX_PKG_ESSENTIAL" = "true" ] && echo "Essential: yes" >> DEBIAN/control
test ! -z "$TERMUX_PKG_CONFLICTS" && echo "Conflicts: $TERMUX_PKG_CONFLICTS" >> DEBIAN/control
test ! -z "$TERMUX_PKG_RECOMMENDS" && echo "Recommends: $TERMUX_PKG_RECOMMENDS" >> DEBIAN/control
test ! -z "$TERMUX_PKG_REPLACES" && echo "Replaces: $TERMUX_PKG_REPLACES" >> DEBIAN/control

View File

@ -1,5 +1,5 @@
termux_step_handle_buildarch() {
$TERMUX_ON_DEVICE_BUILD && return
[ "$TERMUX_ON_DEVICE_BUILD" = "true" ] && return
# If $TERMUX_PREFIX already exists, it may have been built for a different arch
local TERMUX_ARCH_FILE=/data/TERMUX_ARCH

View File

@ -46,7 +46,7 @@ termux_step_start_build() {
termux_get_repo_files
# When doing build on device, ensure that apt lists are up-to-date.
$TERMUX_ON_DEVICE_BUILD && apt update
[ "$TERMUX_ON_DEVICE_BUILD" = "true" ] && apt update
# Download dependencies
while read PKG PKG_DIR; do