: ${NDK:="${HOME}/lib/android-ndk"}
: ${TERMUX_MAKE_PROCESSES:='4'}
: ${TERMUX_TOPDIR:="$HOME/.termux-build"}
-: ${TERMUX_ARCH:="aarch64"} # (arm|aarch64|i686|x86_64) - the x86_64 arch is not yet used or tested.
+: ${TERMUX_ARCH:="aarch64"} # arm, aarch64, i686 or x86_64.
: ${TERMUX_PREFIX:='/data/data/com.termux/files/usr'}
: ${TERMUX_ANDROID_HOME:='/data/data/com.termux/files/home'}
: ${TERMUX_DEBUG:=""}
: ${TERMUX_PROCESS_DEB:=""}
: ${TERMUX_API_LEVEL:="21"}
: ${TERMUX_ANDROID_BUILD_TOOLS_VERSION:="24.0.1"}
-: ${TERMUX_NDK_VERSION:="12"}
+: ${TERMUX_NDK_VERSION:="13"}
# Handle command-line arguments:
show_usage () {
# Handle 'all' arch:
if [ $TERMUX_ARCH = 'all' ]; then
- for arch in 'arm' 'i686' 'aarch64'; do
+ for arch in 'arm' 'i686' 'aarch64' 'x86_64'; do
./build-package.sh -a $arch $1
done
exit
TERMUX_PKG_DEVPACKAGE_DEPENDS=""
# Set if a host build should be done in TERMUX_PKG_HOSTBUILD_DIR:
TERMUX_PKG_HOSTBUILD=""
-TERMUX_PKG_MAINTAINER="Fredrik Fornwall <fredrik@fornwall.net>"
+TERMUX_PKG_MAINTAINER="Fredrik Fornwall @fornwall"
TERMUX_PKG_CLANG=no
# Cleanup old state
find . -name '*.la' -delete
fi
- # .. move over sbin to bin
+ # Move over sbin to bin:
for file in sbin/*; do if test -f $file; then mv $file bin/; fi; done
# Remove world permissions and add write permissions.
find . -type f | xargs -r file | grep -E "(executable|shared object)" | grep ELF | cut -f 1 -d : | \
xargs -r $STRIP --strip-unneeded --preserve-dates
set -e -o pipefail
- # Remove DT_ entries which the android 5.1 linker warns about:
- find . -type f -print0 | xargs -r -0 $TERMUX_ELF_CLEANER
fi
- # Fix shebang paths:
- for file in `find -L . -type f`; do
- head -c 100 $file | grep -E "^#\!.*\\/bin\\/.*" | grep -q -E -v "^#\! ?\\/system" && sed --follow-symlinks -i -E "1 s@^#\!(.*)/bin/(.*)@#\!$TERMUX_PREFIX/bin/\2@" $file
- done
+ # Remove DT_ entries which the android 5.1 linker warns about:
+ find . -type f -print0 | xargs -r -0 $TERMUX_ELF_CLEANER
+
+ # Fix shebang paths:
+ for file in `find -L . -type f`; do
+ head -c 100 $file | grep -E "^#\!.*\\/bin\\/.*" | grep -q -E -v "^#\! ?\\/system" && sed --follow-symlinks -i -E "1 s@^#\!(.*)/bin/(.*)@#\!$TERMUX_PREFIX/bin/\2@" $file
+ done
test ! -z "$TERMUX_PKG_RM_AFTER_INSTALL" && rm -Rf $TERMUX_PKG_RM_AFTER_INSTALL
fi
if [ -n "$TERMUX_DEBUG" ]; then
- CFLAGS+=" -g3 -Og -fstack-protector --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
+ CFLAGS+=" -g3 -O1 -fstack-protector --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
else
CFLAGS+=" -Os"
fi