2015-06-13 01:03:31 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=http://termux.com/
|
|
|
|
TERMUX_PKG_DESCRIPTION="Some tools for Termux"
|
2016-03-23 18:11:21 +01:00
|
|
|
TERMUX_PKG_VERSION=0.21
|
2015-06-13 01:03:31 +02:00
|
|
|
|
|
|
|
termux_step_make_install () {
|
2015-07-23 23:36:10 +02:00
|
|
|
$CXX $CFLAGS $LDFLAGS -std=c++14 -Wall -Wextra -pedantic -Werror $TERMUX_PKG_BUILDER_DIR/*.cpp -o $TERMUX_PREFIX/bin/termux-elf-cleaner
|
2015-06-13 01:03:31 +02:00
|
|
|
|
2016-03-22 02:34:26 +01:00
|
|
|
# Remove LD_LIBRARY_PATH from environment to avoid conflicting
|
|
|
|
# with system libraries that am may link against.
|
2016-03-23 18:11:21 +01:00
|
|
|
for tool in am dalvikvm df getprop logcat ping pm; do
|
2016-03-22 03:42:11 +01:00
|
|
|
WRAPPER_FILE=$TERMUX_PREFIX/bin/$tool
|
|
|
|
echo '#!/bin/sh' > $WRAPPER_FILE
|
|
|
|
if [ $tool = am -o $tool = pm ]; then
|
|
|
|
# These tools require having /system/bin/app_process in the PATH,
|
|
|
|
# at least on a Nexus 6p running Android 6.0.
|
|
|
|
echo -n 'PATH=$PATH:/system/bin ' >> $WRAPPER_FILE
|
|
|
|
fi
|
|
|
|
echo "LD_LIBRARY_PATH= exec /system/bin/$tool \$@" >> $WRAPPER_FILE
|
2016-03-22 02:34:26 +01:00
|
|
|
chmod +x $TERMUX_PREFIX/bin/$tool
|
|
|
|
done
|
|
|
|
|
2016-03-23 18:08:04 +01:00
|
|
|
cp -p $TERMUX_PKG_BUILDER_DIR/{su,termux-fix-shebang,termux-reload-settings,termux-setup-storage,chsh,termux-open-url} $TERMUX_PREFIX/bin/
|
2015-06-13 01:03:31 +02:00
|
|
|
}
|