1 TERMUX_PKG_HOMEPAGE
=http
://developer.android.com
/tools
/help/index.html
2 TERMUX_PKG_DESCRIPTION
="Command which takes in class files and reformulates them for usage on Android"
3 TERMUX_PKG_VERSION
=$TERMUX_ANDROID_BUILD_TOOLS_VERSION
4 TERMUX_PKG_PLATFORM_INDEPENDENT
=true
6 termux_step_make_install
() {
7 # Rewrite packages to avoid using com.android.* classes which may clash with
8 # classes in the Android runtime on devices (see #1801):
9 local JARJAR
=$TERMUX_PKG_CACHEDIR/jarjar.jar
10 local RULEFILE
=$TERMUX_PKG_TMPDIR/jarjar-rule.txt
11 local REWRITTEN_DX
=$TERMUX_PKG_TMPDIR/dx-rewritten.jar
13 http
://central.maven.org
/maven2
/com
/googlecode
/jarjar
/jarjar
/1.3/jarjar-1.3.jar \
15 4225c8ee1bf3079c4b07c76fe03c3e28809a22204db6249c9417efa4f804b3a7
16 echo 'rule com.android.** dx.@1' > $RULEFILE
17 java
-jar
$JARJAR process
$RULEFILE \
18 $ANDROID_HOME/build-tools
/${TERMUX_PKG_VERSION}/lib
/dx.jar \
21 # Dex the rewritten jar file:
22 mkdir
-p
$TERMUX_PREFIX/share
/dex
24 --output
$TERMUX_PREFIX/share
/dex
/dx.dex \
27 install $TERMUX_PKG_BUILDER_DIR/dx
$TERMUX_PREFIX/bin
/dx
28 perl
-p
-i
-e
"s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" $TERMUX_PREFIX/bin
/dx