2016-04-19 16:28:08 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://termux.com/
|
|
|
|
TERMUX_PKG_DESCRIPTION="Basic system tools for Termux"
|
2016-12-30 04:27:57 +01:00
|
|
|
TERMUX_PKG_VERSION=0.32
|
2016-04-19 16:28:08 +02:00
|
|
|
TERMUX_PKG_PLATFORM_INDEPENDENT=yes
|
2015-06-13 01:03:31 +02:00
|
|
|
|
|
|
|
termux_step_make_install () {
|
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-05-06 01:55:13 +02:00
|
|
|
for tool in am df getprop logcat ping ping6 ip pm settings; do
|
2016-03-22 03:42:11 +01:00
|
|
|
WRAPPER_FILE=$TERMUX_PREFIX/bin/$tool
|
|
|
|
echo '#!/bin/sh' > $WRAPPER_FILE
|
2016-04-11 02:20:17 +02:00
|
|
|
|
|
|
|
# Some of these tools (am,dalvikvm,?) requires LD_LIBRARY_PATH setup on at least some devices:
|
2016-04-18 06:55:28 +02:00
|
|
|
echo 'if [ -f /system/bin/linker64 ]; then BITS=64; else BITS=; fi' >> $WRAPPER_FILE
|
|
|
|
echo -n 'LD_LIBRARY_PATH=/system/lib$BITS ' >> $WRAPPER_FILE
|
2016-04-11 02:20:17 +02:00
|
|
|
|
|
|
|
# Some tools require having /system/bin/app_process in the PATH,
|
|
|
|
# at least am&pm on a Nexus 6p running Android 6.0:
|
|
|
|
echo -n 'PATH=$PATH:/system/bin ' >> $WRAPPER_FILE
|
|
|
|
|
2016-04-19 16:28:08 +02:00
|
|
|
echo "exec /system/bin/$tool \"\$@\"" >> $WRAPPER_FILE
|
2016-03-22 02:34:26 +01:00
|
|
|
chmod +x $TERMUX_PREFIX/bin/$tool
|
|
|
|
done
|
|
|
|
|
2016-12-26 04:29:30 +01:00
|
|
|
cp -p $TERMUX_PKG_BUILDER_DIR/{dalvikvm,su,termux-fix-shebang,termux-reload-settings,termux-setup-storage,chsh,termux-open-url,termux-wake-lock,termux-wake-unlock} $TERMUX_PREFIX/bin/
|
2016-05-06 01:55:13 +02:00
|
|
|
perl -p -i -e "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" $TERMUX_PREFIX/bin/dalvikvm
|
2015-06-13 01:03:31 +02:00
|
|
|
}
|