termux-am: Add package
This commit is contained in:
parent
d4c6846b9b
commit
3aa671da67
20
packages/termux-am/build.sh
Normal file
20
packages/termux-am/build.sh
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
TERMUX_PKG_HOMEPAGE=https://github.com/michalbednarski/TermuxAm
|
||||||
|
TERMUX_PKG_DESCRIPTION="Android Oreo-compatible am command reimplementation"
|
||||||
|
TERMUX_PKG_MAINTAINER="Michal Bednarski @michalbednarski"
|
||||||
|
TERMUX_PKG_SRCURL=https://github.com/michalbednarski/TermuxAm/archive/v0.1.zip
|
||||||
|
TERMUX_PKG_SHA256=ed5dcb526d2cabb12754e471f1284822e052550c3206421e1bb889684b97c7b8
|
||||||
|
TERMUX_PKG_VERSION=0.1
|
||||||
|
TERMUX_PKG_PLATFORM_INDEPENDENT=yes
|
||||||
|
TERMUX_PKG_BUILD_IN_SRC=yes
|
||||||
|
TERMUX_PKG_CONFLICTS="termux-tools (<< 0.51)"
|
||||||
|
|
||||||
|
termux_step_make () {
|
||||||
|
export ANDROID_HOME
|
||||||
|
./gradlew :app:assembleRelease
|
||||||
|
}
|
||||||
|
|
||||||
|
termux_step_make_install () {
|
||||||
|
cp $TERMUX_PKG_SRCDIR/am-libexec-packaged $TERMUX_PREFIX/bin/am
|
||||||
|
mkdir -p $TERMUX_PREFIX/libexec/termux-am
|
||||||
|
cp $TERMUX_PKG_SRCDIR/app/build/outputs/apk/release/app-release-unsigned.apk $TERMUX_PREFIX/libexec/termux-am/am.apk
|
||||||
|
}
|
@ -1,21 +1,25 @@
|
|||||||
TERMUX_PKG_HOMEPAGE=https://termux.com/
|
TERMUX_PKG_HOMEPAGE=https://termux.com/
|
||||||
TERMUX_PKG_DESCRIPTION="Basic system tools for Termux"
|
TERMUX_PKG_DESCRIPTION="Basic system tools for Termux"
|
||||||
TERMUX_PKG_VERSION=0.50
|
TERMUX_PKG_VERSION=0.51
|
||||||
TERMUX_PKG_PLATFORM_INDEPENDENT=yes
|
TERMUX_PKG_PLATFORM_INDEPENDENT=yes
|
||||||
TERMUX_PKG_CONFFILES="etc/motd"
|
TERMUX_PKG_CONFFILES="etc/motd"
|
||||||
|
|
||||||
termux_step_make_install () {
|
termux_step_make_install () {
|
||||||
|
mkdir -p $TERMUX_PREFIX/bin/applets
|
||||||
# Remove LD_LIBRARY_PATH from environment to avoid conflicting
|
# Remove LD_LIBRARY_PATH from environment to avoid conflicting
|
||||||
# with system libraries that system binaries may link against:
|
# with system libraries that system binaries may link against:
|
||||||
for tool in am df getprop logcat ping ping6 ip pm settings; do
|
for tool in am df getprop logcat ping ping6 ip pm settings; do
|
||||||
WRAPPER_FILE=$TERMUX_PREFIX/bin/$tool
|
WRAPPER_FILE=$TERMUX_PREFIX/bin/$tool
|
||||||
|
if [ $tool == am ] ; then
|
||||||
|
WRAPPER_FILE=$TERMUX_PREFIX/bin/applets/$tool
|
||||||
|
fi
|
||||||
echo '#!/bin/sh' > $WRAPPER_FILE
|
echo '#!/bin/sh' > $WRAPPER_FILE
|
||||||
echo 'unset LD_LIBRARY_PATH LD_PRELOAD' >> $WRAPPER_FILE
|
echo 'unset LD_LIBRARY_PATH LD_PRELOAD' >> $WRAPPER_FILE
|
||||||
# Some tools require having /system/bin/app_process in the PATH,
|
# Some tools require having /system/bin/app_process in the PATH,
|
||||||
# at least am&pm on a Nexus 6p running Android 6.0:
|
# at least am&pm on a Nexus 6p running Android 6.0:
|
||||||
echo -n 'PATH=$PATH:/system/bin ' >> $WRAPPER_FILE
|
echo -n 'PATH=$PATH:/system/bin ' >> $WRAPPER_FILE
|
||||||
echo "exec /system/bin/$tool \"\$@\"" >> $WRAPPER_FILE
|
echo "exec /system/bin/$tool \"\$@\"" >> $WRAPPER_FILE
|
||||||
chmod +x $TERMUX_PREFIX/bin/$tool
|
chmod +x $WRAPPER_FILE
|
||||||
done
|
done
|
||||||
|
|
||||||
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,login,pkg,termux-open,termux-info} $TERMUX_PREFIX/bin/
|
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,login,pkg,termux-open,termux-info} $TERMUX_PREFIX/bin/
|
||||||
|
Loading…
Reference in New Issue
Block a user