2019-05-15 01:37:52 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://elinux.org/Android_aapt
|
2015-06-13 01:03:31 +02:00
|
|
|
TERMUX_PKG_DESCRIPTION="Android Asset Packaging Tool"
|
2019-01-20 22:39:59 +01:00
|
|
|
TERMUX_PKG_LICENSE="Apache-2.0"
|
2020-12-20 14:16:34 +01:00
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2017-08-19 11:31:02 +02:00
|
|
|
_TAG_VERSION=7.1.2
|
2021-02-22 16:15:59 +01:00
|
|
|
_TAG_REVISION=33
|
2016-09-10 17:01:10 +02:00
|
|
|
TERMUX_PKG_VERSION=${_TAG_VERSION}.${_TAG_REVISION}
|
2021-06-26 22:46:23 +02:00
|
|
|
TERMUX_PKG_REVISION=13
|
2019-08-14 13:27:16 +02:00
|
|
|
TERMUX_PKG_SKIP_SRC_EXTRACT=true
|
2019-08-12 17:28:41 +02:00
|
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
2019-06-19 20:12:28 +02:00
|
|
|
TERMUX_PKG_DEPENDS="libc++, libexpat, libpng, libzopfli, zlib"
|
2015-06-13 01:03:31 +02:00
|
|
|
|
2019-08-08 14:25:54 +02:00
|
|
|
termux_step_pre_configure() {
|
|
|
|
# Certain packages are not safe to build on device because their
|
|
|
|
# build.sh script deletes specific files in $TERMUX_PREFIX.
|
2019-08-12 17:28:41 +02:00
|
|
|
if $TERMUX_ON_DEVICE_BUILD; then
|
2019-08-08 14:25:54 +02:00
|
|
|
termux_error_exit "Package '$TERMUX_PKG_NAME' is not safe for on-device builds."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2019-02-08 10:37:29 +01:00
|
|
|
termux_step_make_install() {
|
2017-12-05 22:48:12 +01:00
|
|
|
# FIXME: We would like to enable checksums when downloading
|
|
|
|
# tar files, but they change each time as the tar metadata
|
|
|
|
# differs: https://github.com/google/gitiles/issues/84
|
|
|
|
|
2016-09-10 17:01:10 +02:00
|
|
|
local _TAGNAME=${_TAG_VERSION}_r${_TAG_REVISION}
|
2015-06-13 01:03:31 +02:00
|
|
|
|
2016-09-04 17:07:13 +02:00
|
|
|
SYSTEM_CORE_INCLUDE_TARFILE=$TERMUX_PKG_CACHEDIR/system_core_include_${_TAGNAME}.tar.gz
|
|
|
|
test ! -f $SYSTEM_CORE_INCLUDE_TARFILE && termux_download \
|
|
|
|
"https://android.googlesource.com/platform/system/core/+archive/android-$_TAGNAME/include.tar.gz" \
|
2018-08-21 00:35:50 +02:00
|
|
|
$SYSTEM_CORE_INCLUDE_TARFILE \
|
|
|
|
SKIP_CHECKSUM
|
2016-09-04 17:07:13 +02:00
|
|
|
|
|
|
|
ANDROIDFW_INCLUDE_TARFILE=$TERMUX_PKG_CACHEDIR/androidfw_include_${_TAGNAME}.tar.gz
|
|
|
|
test ! -f $ANDROIDFW_INCLUDE_TARFILE && termux_download \
|
|
|
|
"https://android.googlesource.com/platform/frameworks/base/+archive/android-$_TAGNAME/include/androidfw.tar.gz" \
|
2018-08-21 00:35:50 +02:00
|
|
|
$ANDROIDFW_INCLUDE_TARFILE \
|
|
|
|
SKIP_CHECKSUM
|
2016-09-04 17:07:13 +02:00
|
|
|
|
|
|
|
ANDROID_BASE_INCLUDE_TARFILE=$TERMUX_PKG_CACHEDIR/android_base_include_${_TAGNAME}.tar.gz
|
|
|
|
test ! -f $ANDROID_BASE_INCLUDE_TARFILE && termux_download \
|
|
|
|
"https://android.googlesource.com/platform/system/core/+archive/android-$_TAGNAME/base/include/android-base.tar.gz" \
|
2018-08-21 00:35:50 +02:00
|
|
|
$ANDROID_BASE_INCLUDE_TARFILE \
|
|
|
|
SKIP_CHECKSUM
|
2016-09-04 17:07:13 +02:00
|
|
|
|
|
|
|
local AOSP_INCLUDE_DIR=$TERMUX_PREFIX/include/aosp
|
|
|
|
mkdir -p $AOSP_INCLUDE_DIR
|
|
|
|
cd $AOSP_INCLUDE_DIR
|
|
|
|
rm -Rf *
|
|
|
|
tar xf $SYSTEM_CORE_INCLUDE_TARFILE
|
|
|
|
mkdir -p androidfw
|
|
|
|
cd androidfw
|
|
|
|
tar xf $ANDROIDFW_INCLUDE_TARFILE
|
|
|
|
cd ..
|
|
|
|
mkdir -p android-base
|
|
|
|
cd android-base
|
|
|
|
tar xf $ANDROID_BASE_INCLUDE_TARFILE
|
2017-03-04 22:03:54 +01:00
|
|
|
cd ../log
|
|
|
|
patch -p0 < $TERMUX_PKG_BUILDER_DIR/log.h.patch.txt
|
2016-09-04 17:07:13 +02:00
|
|
|
|
2018-09-20 22:46:51 +02:00
|
|
|
CXXFLAGS+=" -fPIC"
|
|
|
|
|
2016-09-04 17:07:13 +02:00
|
|
|
# Build libcutils:
|
|
|
|
mkdir -p $TERMUX_PKG_SRCDIR/{libcutils,androidfw}
|
|
|
|
cd $TERMUX_PKG_SRCDIR/libcutils
|
2015-06-13 01:03:31 +02:00
|
|
|
LIBCUTILS_TARFILE=$TERMUX_PKG_CACHEDIR/libcutils_${_TAGNAME}.tar.gz
|
2016-09-04 17:07:13 +02:00
|
|
|
test ! -f $LIBCUTILS_TARFILE && termux_download \
|
|
|
|
"https://android.googlesource.com/platform/system/core/+archive/android-$_TAGNAME/libcutils.tar.gz" \
|
2018-08-21 00:35:50 +02:00
|
|
|
$LIBCUTILS_TARFILE \
|
|
|
|
SKIP_CHECKSUM
|
2016-09-04 17:07:13 +02:00
|
|
|
tar xf $LIBCUTILS_TARFILE
|
2017-06-28 15:43:54 +02:00
|
|
|
patch -p0 < $TERMUX_PKG_BUILDER_DIR/libcutils-patch.txt
|
2016-10-06 23:20:34 +02:00
|
|
|
$CXX $CXXFLAGS -isystem $AOSP_INCLUDE_DIR -c -o sockets.o sockets.cpp
|
|
|
|
$CXX $CXXFLAGS -isystem $AOSP_INCLUDE_DIR -c -o sockets_unix.o sockets_unix.cpp
|
2016-09-04 17:07:13 +02:00
|
|
|
sed -i 's%include <sys/_system_properties.h>%include <sys/system_properties.h>%' properties.c
|
|
|
|
# From Android.mk:
|
|
|
|
libcutils_common_sources="\
|
|
|
|
config_utils.c \
|
|
|
|
fs_config.c \
|
|
|
|
canned_fs_config.c \
|
|
|
|
hashmap.c \
|
|
|
|
iosched_policy.c \
|
|
|
|
load_file.c \
|
|
|
|
native_handle.c \
|
|
|
|
open_memstream.c \
|
|
|
|
process_name.c \
|
|
|
|
record_stream.c \
|
|
|
|
sched_policy.c \
|
|
|
|
sockets.o \
|
|
|
|
strdup16to8.c \
|
|
|
|
strdup8to16.c \
|
|
|
|
strlcpy.c \
|
|
|
|
threads.c"
|
|
|
|
libcutils_nonwindows_sources="\
|
|
|
|
fs.c \
|
|
|
|
multiuser.c \
|
|
|
|
socket_inaddr_any_server_unix.c \
|
|
|
|
socket_local_client_unix.c \
|
|
|
|
socket_local_server_unix.c \
|
|
|
|
socket_loopback_client_unix.c \
|
|
|
|
socket_loopback_server_unix.c \
|
|
|
|
socket_network_client_unix.c \
|
|
|
|
sockets_unix.o \
|
|
|
|
str_parms.c"
|
2021-10-22 10:01:44 +02:00
|
|
|
$CC $CPPFLAGS $LDFLAGS \
|
2016-09-04 17:07:13 +02:00
|
|
|
-Dchar16_t=uint16_t \
|
|
|
|
-std=c11 \
|
|
|
|
-isystem $AOSP_INCLUDE_DIR \
|
|
|
|
$libcutils_common_sources \
|
|
|
|
$libcutils_nonwindows_sources \
|
|
|
|
trace-host.c \
|
|
|
|
properties.c \
|
2016-09-10 17:01:10 +02:00
|
|
|
-llog \
|
2016-09-04 17:07:13 +02:00
|
|
|
-shared \
|
|
|
|
-o $TERMUX_PREFIX/lib/libandroid-cutils.so
|
|
|
|
|
|
|
|
# Build libutil:
|
|
|
|
local LIBUTILS_TARFILE=$TERMUX_PKG_CACHEDIR/libutils_${_TAGNAME}.tar.gz
|
|
|
|
test ! -f $LIBUTILS_TARFILE && termux_download \
|
|
|
|
"https://android.googlesource.com/platform/system/core/+archive/android-$_TAGNAME/libutils.tar.gz" \
|
2018-08-21 00:35:50 +02:00
|
|
|
$LIBUTILS_TARFILE \
|
|
|
|
SKIP_CHECKSUM
|
2016-09-04 17:07:13 +02:00
|
|
|
|
|
|
|
local SAFE_IOP_TARFILE=$TERMUX_PKG_CACHEDIR/safe_iop.tar.gz
|
|
|
|
test ! -f $SAFE_IOP_TARFILE && termux_download \
|
|
|
|
https://android.googlesource.com/platform/external/safe-iop/+archive/cd76f998688d145235de78ecd5b340d0eac9239d.tar.gz \
|
2018-08-21 00:35:50 +02:00
|
|
|
$SAFE_IOP_TARFILE \
|
|
|
|
SKIP_CHECKSUM
|
2016-09-04 17:07:13 +02:00
|
|
|
local SAFE_IOP_DIR=$TERMUX_PKG_TMPDIR/safe-iop
|
|
|
|
mkdir -p $SAFE_IOP_DIR
|
|
|
|
cd $SAFE_IOP_DIR
|
|
|
|
tar xf $SAFE_IOP_TARFILE
|
|
|
|
mv src/safe_iop.c src/safe_iop.cpp
|
|
|
|
|
|
|
|
mkdir $TERMUX_PKG_SRCDIR/libutils
|
|
|
|
cd $TERMUX_PKG_SRCDIR/libutils
|
|
|
|
tar xf $LIBUTILS_TARFILE
|
|
|
|
# From Android.mk:
|
|
|
|
#CallStack.cpp \
|
2017-03-04 22:03:54 +01:00
|
|
|
#SystemClock.cpp \
|
2016-09-04 17:07:13 +02:00
|
|
|
commonSources="\
|
|
|
|
FileMap.cpp \
|
|
|
|
JenkinsHash.cpp \
|
|
|
|
LinearTransform.cpp \
|
|
|
|
Log.cpp \
|
|
|
|
NativeHandle.cpp \
|
|
|
|
Printer.cpp \
|
|
|
|
PropertyMap.cpp \
|
|
|
|
RefBase.cpp \
|
|
|
|
SharedBuffer.cpp \
|
|
|
|
Static.cpp \
|
|
|
|
StopWatch.cpp \
|
|
|
|
String8.cpp \
|
|
|
|
String16.cpp \
|
|
|
|
Threads.cpp \
|
|
|
|
Timers.cpp \
|
|
|
|
Tokenizer.cpp \
|
|
|
|
Unicode.cpp \
|
|
|
|
VectorImpl.cpp \
|
|
|
|
misc.cpp"
|
|
|
|
$CXX $CXXFLAGS $CPPFLAGS $LDFLAGS \
|
|
|
|
-std=c++11 \
|
2016-10-06 23:20:34 +02:00
|
|
|
'-DALOG_ASSERT(a,...)=' \
|
2016-09-04 17:07:13 +02:00
|
|
|
-Dtypeof=decltype \
|
|
|
|
-isystem $TERMUX_PREFIX/include/aosp \
|
|
|
|
-isystem $SAFE_IOP_DIR/include \
|
|
|
|
$SAFE_IOP_DIR/src/safe_iop.cpp \
|
|
|
|
$commonSources \
|
|
|
|
-landroid-cutils \
|
2016-09-10 17:01:10 +02:00
|
|
|
-llog \
|
2016-09-04 17:07:13 +02:00
|
|
|
-shared \
|
|
|
|
-o $TERMUX_PREFIX/lib/libandroid-utils.so
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Build libbase:
|
|
|
|
local LIBBASE_TARFILE=$TERMUX_PKG_CACHEDIR/libbase_${_TAGNAME}.tar.gz
|
|
|
|
test ! -f $LIBBASE_TARFILE && termux_download \
|
|
|
|
"https://android.googlesource.com/platform/system/core/+archive/android-${_TAGNAME}/base.tar.gz" \
|
2018-08-21 00:35:50 +02:00
|
|
|
$LIBBASE_TARFILE \
|
|
|
|
SKIP_CHECKSUM
|
2016-09-04 17:07:13 +02:00
|
|
|
mkdir -p $TERMUX_PKG_SRCDIR/libbase
|
|
|
|
cd $TERMUX_PKG_SRCDIR/libbase
|
|
|
|
tar xf $LIBBASE_TARFILE
|
|
|
|
rm -Rf $TERMUX_PREFIX/include/aosp/android-base
|
|
|
|
mv include/android-base $TERMUX_PREFIX/include/aosp
|
|
|
|
patch -p1 < $TERMUX_PKG_BUILDER_DIR/libbase-patch.txt
|
2017-03-04 22:03:54 +01:00
|
|
|
#logging.cpp \
|
2016-09-04 17:07:13 +02:00
|
|
|
libbase_src_files="\
|
|
|
|
file.cpp \
|
|
|
|
parsenetaddress.cpp \
|
|
|
|
stringprintf.cpp \
|
|
|
|
strings.cpp \
|
|
|
|
test_utils.cpp"
|
|
|
|
libbase_linux_src_files="\
|
|
|
|
errors_unix.cpp"
|
|
|
|
# __USE_BSD for DEFFILEMODE to be defined by <sys/stat.h>.
|
2017-07-14 00:23:37 +02:00
|
|
|
$CXX $CXXFLAGS $CPPFLAGS \
|
2019-03-10 23:42:51 +01:00
|
|
|
$LDFLAGS \
|
2017-07-14 00:23:37 +02:00
|
|
|
-std=c++11 \
|
|
|
|
-include memory \
|
2016-09-04 17:07:13 +02:00
|
|
|
-D__USE_BSD \
|
|
|
|
-isystem $AOSP_INCLUDE_DIR \
|
|
|
|
$libbase_src_files $libbase_linux_src_files \
|
2016-09-10 17:01:10 +02:00
|
|
|
-llog \
|
2016-09-04 17:07:13 +02:00
|
|
|
-shared \
|
|
|
|
-o $TERMUX_PREFIX/lib/libandroid-base.so
|
|
|
|
|
|
|
|
|
|
|
|
# Build libziparchive:
|
2015-06-13 01:03:31 +02:00
|
|
|
LIBZIPARCHIVE_TARFILE=$TERMUX_PKG_CACHEDIR/libziparchive_${_TAGNAME}.tar.gz
|
2016-09-04 17:07:13 +02:00
|
|
|
test ! -f $LIBZIPARCHIVE_TARFILE && termux_download \
|
|
|
|
"https://android.googlesource.com/platform/system/core/+archive/android-$_TAGNAME/libziparchive.tar.gz" \
|
2018-08-21 00:35:50 +02:00
|
|
|
$LIBZIPARCHIVE_TARFILE \
|
|
|
|
SKIP_CHECKSUM
|
2016-09-04 17:07:13 +02:00
|
|
|
mkdir -p $TERMUX_PKG_SRCDIR/libziparchive
|
|
|
|
cd $TERMUX_PKG_SRCDIR/libziparchive
|
2015-06-13 01:03:31 +02:00
|
|
|
tar xf $LIBZIPARCHIVE_TARFILE
|
2016-09-04 17:07:13 +02:00
|
|
|
libziparchive_source_files="\
|
|
|
|
zip_archive.cc \
|
|
|
|
zip_archive_stream_entry.cc \
|
|
|
|
zip_writer.cc"
|
2017-08-23 21:59:09 +02:00
|
|
|
patch -p0 < $TERMUX_PKG_BUILDER_DIR/libziparchive.patch.txt
|
2019-04-14 19:05:50 +02:00
|
|
|
$CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -std=c++11 \
|
2016-09-04 17:07:13 +02:00
|
|
|
-DZLIB_CONST \
|
|
|
|
-isystem $AOSP_INCLUDE_DIR \
|
|
|
|
$libziparchive_source_files \
|
|
|
|
-landroid-base \
|
2016-09-11 14:34:07 +02:00
|
|
|
-landroid-utils \
|
|
|
|
-lz \
|
2016-09-10 17:01:10 +02:00
|
|
|
-llog \
|
2016-09-04 17:07:13 +02:00
|
|
|
-shared \
|
|
|
|
-o $TERMUX_PREFIX/lib/libandroid-ziparchive.so
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Build libandroidfw:
|
|
|
|
ANDROIDFW_TARFILE=$TERMUX_PKG_CACHEDIR/androidfw_${_TAGNAME}.tar.gz
|
|
|
|
test ! -f $ANDROIDFW_TARFILE && termux_download \
|
|
|
|
https://android.googlesource.com/platform/frameworks/base/+archive/android-$_TAGNAME/libs/androidfw.tar.gz \
|
2018-08-21 00:35:50 +02:00
|
|
|
$ANDROIDFW_TARFILE \
|
|
|
|
SKIP_CHECKSUM
|
2016-09-04 17:07:13 +02:00
|
|
|
mkdir -p $TERMUX_PKG_SRCDIR/androidfw
|
|
|
|
cd $TERMUX_PKG_SRCDIR/androidfw
|
|
|
|
tar xf $ANDROIDFW_TARFILE
|
|
|
|
commonSources="\
|
|
|
|
Asset.cpp \
|
|
|
|
AssetDir.cpp \
|
|
|
|
AssetManager.cpp \
|
|
|
|
LocaleData.cpp \
|
|
|
|
misc.cpp \
|
|
|
|
ObbFile.cpp \
|
|
|
|
ResourceTypes.cpp \
|
|
|
|
StreamingZipInflater.cpp \
|
|
|
|
TypeWrappers.cpp \
|
|
|
|
ZipFileRO.cpp \
|
|
|
|
ZipUtils.cpp"
|
|
|
|
sed -i 's%#include <binder/TextOutput.h>%%' ResourceTypes.cpp
|
2017-06-28 15:43:54 +02:00
|
|
|
$CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -isystem $AOSP_INCLUDE_DIR \
|
2016-09-04 17:07:13 +02:00
|
|
|
-std=c++11 \
|
2017-07-14 00:23:37 +02:00
|
|
|
-include memory \
|
2016-09-04 17:07:13 +02:00
|
|
|
$commonSources \
|
2016-09-11 14:34:07 +02:00
|
|
|
-landroid-cutils \
|
|
|
|
-landroid-utils \
|
|
|
|
-landroid-ziparchive \
|
|
|
|
-llog \
|
|
|
|
-lz \
|
2016-09-04 17:07:13 +02:00
|
|
|
-shared \
|
|
|
|
-o $TERMUX_PREFIX/lib/libandroid-fw.so
|
|
|
|
|
|
|
|
# Build aapt:
|
|
|
|
AAPT_TARFILE=$TERMUX_PKG_CACHEDIR/aapt_${_TAGNAME}.tar.gz
|
|
|
|
test ! -f $AAPT_TARFILE && termux_download \
|
|
|
|
"https://android.googlesource.com/platform/frameworks/base/+archive/android-$_TAGNAME/tools/aapt.tar.gz" \
|
2018-08-21 00:35:50 +02:00
|
|
|
$AAPT_TARFILE \
|
|
|
|
SKIP_CHECKSUM
|
2016-09-04 17:07:13 +02:00
|
|
|
mkdir $TERMUX_PKG_SRCDIR/aapt
|
|
|
|
cd $TERMUX_PKG_SRCDIR/aapt
|
|
|
|
tar xf $AAPT_TARFILE
|
2016-10-07 21:36:03 +02:00
|
|
|
sed "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" $TERMUX_PKG_BUILDER_DIR/aapt-Main.cpp.patch.txt | patch -p1
|
2016-09-04 17:07:13 +02:00
|
|
|
$CXX $CXXFLAGS $CPPFLAGS $LDFLAGS \
|
|
|
|
-std=c++11 \
|
2017-07-14 00:23:37 +02:00
|
|
|
-include memory \
|
2016-09-04 17:07:13 +02:00
|
|
|
-DANDROID_SMP=1 \
|
2015-06-13 01:03:31 +02:00
|
|
|
-DNDEBUG=1 \
|
2016-09-04 17:07:13 +02:00
|
|
|
-DHAVE_ENDIAN_H=1 -DHAVE_POSIX_FILEMAP=1 -DHAVE_OFF64_T=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_PTHREADS=1 \
|
|
|
|
-isystem $AOSP_INCLUDE_DIR \
|
|
|
|
*.cpp \
|
|
|
|
-landroid-cutils -landroid-utils -landroid-fw -landroid-ziparchive \
|
|
|
|
-llog \
|
|
|
|
-lm -lz -lpng -lexpat \
|
|
|
|
-pie \
|
|
|
|
-o $TERMUX_PREFIX/bin/aapt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Build zipalign:
|
|
|
|
ZIPALIGN_TARFILE=$TERMUX_PKG_CACHEDIR/zipalign_${_TAGNAME}.tar.gz
|
2020-01-20 02:26:54 +01:00
|
|
|
ZOPFLI_VER=$(bash -c ". $TERMUX_SCRIPTDIR/packages/libzopfli/build.sh; echo \$TERMUX_PKG_VERSION")
|
|
|
|
ZOPFLI_SHA256=$(bash -c ". $TERMUX_SCRIPTDIR/packages/libzopfli/build.sh; echo \$TERMUX_PKG_SHA256")
|
|
|
|
ZOPFLI_TARFILE=$TERMUX_PKG_CACHEDIR/zopfli-${ZOPFLI_VER}.tar.gz
|
|
|
|
termux_download \
|
|
|
|
"https://github.com/google/zopfli/archive/zopfli-${ZOPFLI_VER}.tar.gz" \
|
|
|
|
$ZOPFLI_TARFILE \
|
|
|
|
$ZOPFLI_SHA256
|
2016-09-04 17:07:13 +02:00
|
|
|
test ! -f $ZIPALIGN_TARFILE && termux_download \
|
|
|
|
"https://android.googlesource.com/platform/build.git/+archive/android-$_TAGNAME/tools/zipalign.tar.gz" \
|
2018-08-21 00:35:50 +02:00
|
|
|
$ZIPALIGN_TARFILE \
|
|
|
|
SKIP_CHECKSUM
|
2016-09-04 17:07:13 +02:00
|
|
|
mkdir $TERMUX_PKG_SRCDIR/zipalign
|
2020-01-20 02:26:54 +01:00
|
|
|
cd $TERMUX_PKG_SRCDIR/zipalign
|
2016-09-04 17:07:13 +02:00
|
|
|
tar xf $ZIPALIGN_TARFILE
|
2020-01-20 02:26:54 +01:00
|
|
|
tar xf $ZOPFLI_TARFILE
|
|
|
|
mv zopfli-zopfli-$ZOPFLI_VER zopfli
|
|
|
|
|
|
|
|
$CXX $CXXFLAGS $CPPFLAGS -Izopfli/src $LDFLAGS \
|
2016-09-04 17:07:13 +02:00
|
|
|
-isystem $AOSP_INCLUDE_DIR \
|
|
|
|
-std=c++11 \
|
|
|
|
ZipAlign.cpp ZipEntry.cpp ZipFile.cpp \
|
|
|
|
-landroid-cutils -landroid-utils -landroid-fw \
|
|
|
|
-lm -lz -llog \
|
|
|
|
-lzopfli \
|
|
|
|
-pie \
|
|
|
|
-o $TERMUX_PREFIX/bin/zipalign
|
|
|
|
|
|
|
|
|
|
|
|
# Remove this one for now:
|
|
|
|
rm -Rf $AOSP_INCLUDE_DIR
|
2016-10-07 21:36:03 +02:00
|
|
|
|
|
|
|
# Create an android.jar with AndroidManifest.xml and resources.arsc:
|
|
|
|
cd $TERMUX_PKG_TMPDIR
|
|
|
|
rm -rf android-jar
|
|
|
|
mkdir android-jar
|
|
|
|
cd android-jar
|
2019-01-27 09:02:45 +01:00
|
|
|
cp $ANDROID_HOME/platforms/android-28/android.jar .
|
2016-10-07 21:36:03 +02:00
|
|
|
unzip -q android.jar
|
|
|
|
mkdir -p $TERMUX_PREFIX/share/aapt
|
2017-11-21 05:26:30 +01:00
|
|
|
jar cfM $TERMUX_PREFIX/share/aapt/android.jar AndroidManifest.xml resources.arsc
|
2015-06-13 01:03:31 +02:00
|
|
|
}
|