termux-packages/packages/termux-am/build.sh

37 lines
1.5 KiB
Bash
Raw Normal View History

TERMUX_PKG_HOMEPAGE=https://github.com/termux/TermuxAm
2018-02-03 17:13:18 +01:00
TERMUX_PKG_DESCRIPTION="Android Oreo-compatible am command reimplementation"
2019-01-21 13:53:58 +01:00
TERMUX_PKG_LICENSE="Apache-2.0"
2018-02-03 17:13:18 +01:00
TERMUX_PKG_MAINTAINER="Michal Bednarski @michalbednarski"
TERMUX_PKG_VERSION=0.3
TERMUX_PKG_SHA256=3abfaca319f59fa769480c33d50e2ee1ff73122eac7c658f9e2a66a2da29ebb7
TERMUX_PKG_SRCURL=https://github.com/termux/TermuxAm/archive/v$TERMUX_PKG_VERSION.zip
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_BUILD_IN_SRC=true
2018-02-03 17:13:18 +01:00
TERMUX_PKG_CONFLICTS="termux-tools (<< 0.51)"
termux_step_make() {
2019-04-21 21:04:49 +02:00
# Download and use a new enough gradle version to avoid the process hanging after running:
termux_download \
https://services.gradle.org/distributions/gradle-5.4-bin.zip \
$TERMUX_PKG_CACHEDIR/gradle-5.4-bin.zip \
c8c17574245ecee9ed7fe4f6b593b696d1692d1adbfef425bef9b333e3a0e8de
mkdir $TERMUX_PKG_TMPDIR/gradle
unzip -q $TERMUX_PKG_CACHEDIR/gradle-5.4-bin.zip -d $TERMUX_PKG_TMPDIR/gradle
# Avoid spawning the gradle daemon due to org.gradle.jvmargs
# being set (https://github.com/gradle/gradle/issues/1434):
rm gradle.properties
2018-02-03 17:13:18 +01:00
export ANDROID_HOME
export GRADLE_OPTS="-Dorg.gradle.daemon=false -Xmx1536m"
$TERMUX_PKG_TMPDIR/gradle/gradle-5.4/bin/gradle \
2019-04-21 21:04:49 +02:00
:app:assembleRelease
2018-02-03 17:13:18 +01:00
}
termux_step_make_install() {
2018-02-03 17:13:18 +01:00
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
}