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
5 TERMUX_PKG_PLATFORM_INDEPENDENT
=true
7 termux_step_make_install
() {
8 # Rewrite packages to avoid using com.android.* classes which may clash with
9 # classes in the Android runtime on devices (see #1801):
10 local JARJAR
=$TERMUX_PKG_CACHEDIR/jarjar.jar
11 local RULEFILE
=$TERMUX_PKG_TMPDIR/jarjar-rule.txt
12 local REWRITTEN_DX
=$TERMUX_PKG_TMPDIR/dx-rewritten.jar
14 http
://central.maven.org
/maven2
/com
/googlecode
/jarjar
/jarjar
/1.3/jarjar-1.3.jar \
16 4225c8ee1bf3079c4b07c76fe03c3e28809a22204db6249c9417efa4f804b3a7
17 echo 'rule com.android.** dx.@1' > $RULEFILE
18 java
-jar
$JARJAR process
$RULEFILE \
19 $ANDROID_HOME/build-tools
/${TERMUX_PKG_VERSION}/lib
/dx.jar \
22 # Dex the rewritten jar file:
23 mkdir
-p
$TERMUX_PREFIX/share
/dex
25 --output
$TERMUX_PREFIX/share
/dex
/dx.dex \
28 install $TERMUX_PKG_BUILDER_DIR/dx
$TERMUX_PREFIX/bin
/dx
29 perl
-p
-i
-e
"s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" $TERMUX_PREFIX/bin
/dx