2019-08-07 20:31:36 +02:00
|
|
|
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"
|
2020-12-23 18:05:18 +01:00
|
|
|
TERMUX_PKG_VERSION=0.4
|
|
|
|
TERMUX_PKG_SRCURL=https://github.com/termux/TermuxAm/archive/v$TERMUX_PKG_VERSION.tar.gz
|
|
|
|
TERMUX_PKG_SHA256=f13e7de6682b2a8303ac69e6a908fc7bd2ae091b3941eb33ecc35f47ea77a435
|
2019-08-12 17:28:41 +02:00
|
|
|
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)"
|
2020-12-23 18:05:18 +01:00
|
|
|
_GRADLE_VERSION=6.5.1
|
2018-02-03 17:13:18 +01:00
|
|
|
|
2019-02-08 10:37:29 +01:00
|
|
|
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 \
|
2020-12-23 18:05:18 +01:00
|
|
|
https://services.gradle.org/distributions/gradle-$_GRADLE_VERSION-bin.zip \
|
|
|
|
$TERMUX_PKG_CACHEDIR/gradle-$_GRADLE_VERSION-bin.zip \
|
|
|
|
50a7d30529fa939721fe9268a0205142f3f2302bcac5fb45b27a3902e58db54a
|
2019-04-21 21:04:49 +02:00
|
|
|
mkdir $TERMUX_PKG_TMPDIR/gradle
|
2020-12-23 18:05:18 +01:00
|
|
|
unzip -q $TERMUX_PKG_CACHEDIR/gradle-$_GRADLE_VERSION-bin.zip -d $TERMUX_PKG_TMPDIR/gradle
|
2019-04-21 21:04:49 +02:00
|
|
|
|
2019-04-22 01:31:54 +02:00
|
|
|
# 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
|
2019-04-22 01:31:54 +02:00
|
|
|
export GRADLE_OPTS="-Dorg.gradle.daemon=false -Xmx1536m"
|
|
|
|
|
2020-12-23 18:05:18 +01:00
|
|
|
$TERMUX_PKG_TMPDIR/gradle/gradle-$_GRADLE_VERSION/bin/gradle \
|
2019-04-21 21:04:49 +02:00
|
|
|
:app:assembleRelease
|
2018-02-03 17:13:18 +01:00
|
|
|
}
|
|
|
|
|
2019-02-08 10:37:29 +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
|
|
|
|
}
|