2022-07-02 12:54:25 +00:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://termux.dev/
|
2016-04-19 14:28:08 +00:00
|
|
|
TERMUX_PKG_DESCRIPTION="Basic system tools for Termux"
|
2019-01-21 14:39:22 +00:00
|
|
|
TERMUX_PKG_LICENSE="GPL-3.0"
|
2022-07-02 12:54:25 +00:00
|
|
|
TERMUX_PKG_VERSION=0.77
|
2019-08-14 11:55:01 +00:00
|
|
|
TERMUX_PKG_SKIP_SRC_EXTRACT=true
|
2019-08-12 15:28:41 +00:00
|
|
|
TERMUX_PKG_PLATFORM_INDEPENDENT=true
|
|
|
|
TERMUX_PKG_ESSENTIAL=true
|
2019-08-05 10:46:51 +00:00
|
|
|
TERMUX_PKG_CONFLICTS="procps (<< 3.3.15-2)"
|
2019-11-13 14:38:40 +00:00
|
|
|
TERMUX_PKG_SUGGESTS="termux-api"
|
|
|
|
TERMUX_PKG_CONFFILES="etc/motd"
|
2019-08-05 10:46:51 +00:00
|
|
|
|
|
|
|
# Some of these packages are not dependencies and used only to ensure
|
|
|
|
# that core packages are installed after upgrading (we removed busybox
|
|
|
|
# from essentials).
|
|
|
|
TERMUX_PKG_DEPENDS="bzip2, coreutils, curl, dash, diffutils, findutils, gawk, grep, gzip, less, procps, psmisc, sed, tar, termux-am, termux-exec, xz-utils"
|
|
|
|
|
|
|
|
# Optional packages that are distributed as part of bootstrap archives.
|
|
|
|
TERMUX_PKG_RECOMMENDS="ed, dos2unix, inetutils, net-tools, patch, unzip, util-linux"
|
2015-06-12 23:03:31 +00:00
|
|
|
|
2019-02-08 09:37:29 +00:00
|
|
|
termux_step_make_install() {
|
2018-02-03 16:13:18 +00:00
|
|
|
mkdir -p $TERMUX_PREFIX/bin/applets
|
2016-03-22 01:34:26 +00:00
|
|
|
# Remove LD_LIBRARY_PATH from environment to avoid conflicting
|
2017-01-08 09:53:36 +00:00
|
|
|
# with system libraries that system binaries may link against:
|
2019-07-01 20:48:41 +00:00
|
|
|
for tool in df getprop logcat mount ping ping6 ip pm settings top umount; do
|
2016-03-22 02:42:11 +00:00
|
|
|
WRAPPER_FILE=$TERMUX_PREFIX/bin/$tool
|
|
|
|
echo '#!/bin/sh' > $WRAPPER_FILE
|
2018-01-24 16:20:25 +00:00
|
|
|
echo 'unset LD_LIBRARY_PATH LD_PRELOAD' >> $WRAPPER_FILE
|
2016-04-11 00:20:17 +00: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 14:28:08 +00:00
|
|
|
echo "exec /system/bin/$tool \"\$@\"" >> $WRAPPER_FILE
|
2018-02-03 16:13:18 +00:00
|
|
|
chmod +x $WRAPPER_FILE
|
2016-03-22 01:34:26 +00:00
|
|
|
done
|
|
|
|
|
2019-09-19 20:57:17 +00:00
|
|
|
for script in chsh dalvikvm login pkg su termux-fix-shebang termux-info \
|
|
|
|
termux-open termux-open-url termux-reload-settings termux-setup-storage \
|
|
|
|
termux-upgrade-repo termux-wake-lock termux-wake-unlock; do
|
|
|
|
install -Dm700 $TERMUX_PKG_BUILDER_DIR/$script $TERMUX_PREFIX/bin/$script
|
|
|
|
perl -p -i -e "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" $TERMUX_PREFIX/bin/$script
|
|
|
|
done
|
2017-02-09 09:28:37 +00:00
|
|
|
|
2019-09-19 20:57:17 +00:00
|
|
|
install -Dm600 $TERMUX_PKG_BUILDER_DIR/motd $TERMUX_PREFIX/etc/motd
|
|
|
|
ln -sfr $TERMUX_PREFIX/bin/termux-open $TERMUX_PREFIX/bin/xdg-open
|
2015-06-12 23:03:31 +00:00
|
|
|
}
|