2021-07-10 19:51:07 +03:00
|
|
|
FROM debian:buster
|
2017-07-01 21:48:32 +03:00
|
|
|
|
2020-10-22 06:30:12 +03:00
|
|
|
ARG THREADS=1
|
2021-07-09 03:25:40 +03:00
|
|
|
ARG ANDROID_NDK_REVISION=21e
|
|
|
|
ARG ANDROID_NDK_HASH=c3ebc83c96a4d7f539bd72c241b2be9dcd29bda9
|
|
|
|
ARG ANDROID_SDK_REVISION=7302050_latest
|
|
|
|
ARG ANDROID_SDK_HASH=7a00faadc0864f78edd8f4908a629a46d622375cbe2e5814e82934aebecdb622
|
2022-11-12 05:10:34 +02:00
|
|
|
ARG QT_VERSION=v5.15.7-lts-lgpl
|
2017-07-01 21:48:32 +03:00
|
|
|
|
2020-10-22 06:30:12 +03:00
|
|
|
WORKDIR /opt/android
|
|
|
|
ENV WORKDIR=/opt/android
|
2017-07-01 21:48:32 +03:00
|
|
|
|
2022-11-12 05:10:34 +02:00
|
|
|
ENV ANDROID_NATIVE_API_LEVEL=30
|
2020-10-22 06:30:12 +03:00
|
|
|
ENV ANDROID_API=android-${ANDROID_NATIVE_API_LEVEL}
|
|
|
|
ENV ANDROID_CLANG=aarch64-linux-android${ANDROID_NATIVE_API_LEVEL}-clang
|
|
|
|
ENV ANDROID_CLANGPP=aarch64-linux-android${ANDROID_NATIVE_API_LEVEL}-clang++
|
|
|
|
ENV ANDROID_NDK_ROOT=${WORKDIR}/android-ndk-r${ANDROID_NDK_REVISION}
|
2021-07-09 03:25:40 +03:00
|
|
|
ENV ANDROID_SDK_ROOT=${WORKDIR}/cmdline-tools
|
2021-07-10 19:51:07 +03:00
|
|
|
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
|
2020-10-22 06:30:12 +03:00
|
|
|
ENV PATH=${JAVA_HOME}/bin:${PATH}
|
|
|
|
ENV PREFIX=${WORKDIR}/prefix
|
|
|
|
ENV TOOLCHAIN_DIR=${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64
|
|
|
|
|
|
|
|
RUN apt-get update \
|
2021-03-16 00:52:22 +02:00
|
|
|
&& apt-get install -y ant automake build-essential ca-certificates-java file gettext git libc6 libncurses5 \
|
2021-07-10 19:51:07 +03:00
|
|
|
libssl-dev libstdc++6 libtinfo5 libtool libz1 openjdk-11-jdk-headless openjdk-11-jre-headless pkg-config python3 \
|
2021-03-16 00:52:22 +02:00
|
|
|
unzip wget
|
2020-10-22 06:30:12 +03:00
|
|
|
|
2021-07-09 03:25:40 +03:00
|
|
|
RUN PACKAGE_NAME=commandlinetools-linux-${ANDROID_SDK_REVISION}.zip \
|
|
|
|
&& wget -q https://dl.google.com/android/repository/${PACKAGE_NAME} \
|
|
|
|
&& echo "${ANDROID_SDK_HASH} ${PACKAGE_NAME}" | sha256sum -c \
|
|
|
|
&& unzip -q ${PACKAGE_NAME} \
|
|
|
|
&& rm -f ${PACKAGE_NAME}
|
2020-10-22 06:30:12 +03:00
|
|
|
|
2021-07-09 03:25:40 +03:00
|
|
|
RUN PACKAGE_NAME=android-ndk-r${ANDROID_NDK_REVISION}-linux-x86_64.zip \
|
|
|
|
&& wget -q https://dl.google.com/android/repository/${PACKAGE_NAME} \
|
|
|
|
&& echo "${ANDROID_NDK_HASH} ${PACKAGE_NAME}" | sha1sum -c \
|
|
|
|
&& unzip -q ${PACKAGE_NAME} \
|
|
|
|
&& rm -f ${PACKAGE_NAME}
|
2020-10-22 06:30:12 +03:00
|
|
|
|
2021-07-09 03:25:40 +03:00
|
|
|
RUN echo y | ${ANDROID_SDK_ROOT}/bin/sdkmanager --sdk_root=${ANDROID_SDK_ROOT} "build-tools;28.0.3" "platforms;${ANDROID_API}" "tools" > /dev/null
|
2020-10-22 06:30:12 +03:00
|
|
|
|
|
|
|
ENV HOST_PATH=${PATH}
|
|
|
|
ENV PATH=${TOOLCHAIN_DIR}/aarch64-linux-android/bin:${TOOLCHAIN_DIR}/bin:${PATH}
|
|
|
|
|
2024-03-09 04:50:46 +02:00
|
|
|
ARG ZLIB_VERSION=1.3.1
|
|
|
|
ARG ZLIB_HASH=9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23
|
|
|
|
RUN wget -q https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz \
|
2021-09-15 18:52:12 +03:00
|
|
|
&& echo "${ZLIB_HASH} zlib-${ZLIB_VERSION}.tar.gz" | sha256sum -c \
|
2020-10-22 06:30:12 +03:00
|
|
|
&& tar -xzf zlib-${ZLIB_VERSION}.tar.gz \
|
|
|
|
&& rm zlib-${ZLIB_VERSION}.tar.gz \
|
|
|
|
&& cd zlib-${ZLIB_VERSION} \
|
|
|
|
&& CC=${ANDROID_CLANG} CXX=${ANDROID_CLANGPP} ./configure --prefix=${PREFIX} --static \
|
|
|
|
&& make -j${THREADS} \
|
|
|
|
&& make -j${THREADS} install \
|
|
|
|
&& rm -rf $(pwd)
|
|
|
|
|
|
|
|
RUN git clone git://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 \
|
2017-07-01 21:48:32 +03:00
|
|
|
&& cd qt5 \
|
2020-10-22 06:30:12 +03:00
|
|
|
&& perl init-repository --module-subset=default,-qtwebengine \
|
|
|
|
&& PATH=${HOST_PATH} ./configure -v -developer-build -release \
|
|
|
|
-xplatform android-clang \
|
2017-07-01 21:48:32 +03:00
|
|
|
-android-ndk-platform ${ANDROID_API} \
|
2020-10-22 06:30:12 +03:00
|
|
|
-android-ndk ${ANDROID_NDK_ROOT} \
|
|
|
|
-android-sdk ${ANDROID_SDK_ROOT} \
|
|
|
|
-android-ndk-host linux-x86_64 \
|
|
|
|
-no-dbus \
|
|
|
|
-opengl es2 \
|
|
|
|
-no-use-gold-linker \
|
|
|
|
-no-sql-mysql \
|
2017-07-01 21:48:32 +03:00
|
|
|
-opensource -confirm-license \
|
2020-10-22 06:30:12 +03:00
|
|
|
-android-arch arm64-v8a \
|
2020-11-08 01:05:26 +02:00
|
|
|
-prefix ${PREFIX} \
|
2020-10-22 06:30:12 +03:00
|
|
|
-nomake tools -nomake tests -nomake examples \
|
|
|
|
-skip qtwebengine \
|
2017-07-01 21:48:32 +03:00
|
|
|
-skip qtserialport \
|
|
|
|
-skip qtconnectivity \
|
|
|
|
-skip qttranslations \
|
2020-10-22 06:30:12 +03:00
|
|
|
-skip qtpurchasing \
|
|
|
|
-skip qtgamepad -skip qtscript -skip qtdoc \
|
|
|
|
-no-warnings-are-errors \
|
|
|
|
&& PATH=${HOST_PATH} make -j${THREADS} \
|
|
|
|
&& PATH=${HOST_PATH} make -j${THREADS} install \
|
2021-03-16 00:52:22 +02:00
|
|
|
&& cd qttools/src/linguist/lrelease \
|
|
|
|
&& ../../../../qtbase/bin/qmake \
|
|
|
|
&& PATH=${HOST_PATH} make -j${THREADS} install \
|
|
|
|
&& cd ../../../.. \
|
|
|
|
&& rm -rf $(pwd)
|
2020-10-22 06:30:12 +03:00
|
|
|
|
|
|
|
ARG ICONV_VERSION=1.16
|
|
|
|
ARG ICONV_HASH=e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04
|
|
|
|
RUN wget -q http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz \
|
|
|
|
&& echo "${ICONV_HASH} libiconv-${ICONV_VERSION}.tar.gz" | sha256sum -c \
|
2017-07-01 21:48:32 +03:00
|
|
|
&& tar -xzf libiconv-${ICONV_VERSION}.tar.gz \
|
2020-10-22 06:30:12 +03:00
|
|
|
&& rm -f libiconv-${ICONV_VERSION}.tar.gz \
|
2017-07-01 21:48:32 +03:00
|
|
|
&& cd libiconv-${ICONV_VERSION} \
|
2020-10-22 06:30:12 +03:00
|
|
|
&& CC=${ANDROID_CLANG} CXX=${ANDROID_CLANGPP} ./configure --build=x86_64-linux-gnu --host=aarch64 --prefix=${PREFIX} --disable-rpath \
|
|
|
|
&& make -j${THREADS} \
|
|
|
|
&& make -j${THREADS} install
|
|
|
|
|
|
|
|
ARG BOOST_VERSION=1_74_0
|
|
|
|
ARG BOOST_VERSION_DOT=1.74.0
|
|
|
|
ARG BOOST_HASH=83bfc1507731a0906e387fc28b7ef5417d591429e51e788417fe9ff025e116b1
|
2021-07-09 03:27:30 +03:00
|
|
|
RUN wget -q https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION_DOT}/source/boost_${BOOST_VERSION}.tar.bz2 \
|
2020-10-22 06:30:12 +03:00
|
|
|
&& echo "${BOOST_HASH} boost_${BOOST_VERSION}.tar.bz2" | sha256sum -c \
|
|
|
|
&& tar -xf boost_${BOOST_VERSION}.tar.bz2 \
|
|
|
|
&& rm -f boost_${BOOST_VERSION}.tar.bz2 \
|
|
|
|
&& cd boost_${BOOST_VERSION} \
|
|
|
|
&& PATH=${HOST_PATH} ./bootstrap.sh --prefix=${PREFIX} \
|
|
|
|
&& PATH=${TOOLCHAIN_DIR}/bin:${HOST_PATH} ./b2 --build-type=minimal link=static runtime-link=static \
|
|
|
|
--with-chrono --with-date_time --with-filesystem --with-program_options --with-regex --with-serialization \
|
|
|
|
--with-system --with-thread --with-locale --build-dir=android --stagedir=android toolset=clang threading=multi \
|
|
|
|
threadapi=pthread target-os=android -sICONV_PATH=${PREFIX} \
|
|
|
|
cflags='--target=aarch64-linux-android' \
|
|
|
|
cxxflags='--target=aarch64-linux-android' \
|
|
|
|
linkflags='--target=aarch64-linux-android --sysroot=${ANDROID_NDK_ROOT}/platforms/${ANDROID_API}/arch-arm64 ${ANDROID_NDK_ROOT}/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_shared.so -nostdlib++' \
|
|
|
|
install -j${THREADS} \
|
|
|
|
&& rm -rf $(pwd)
|
|
|
|
|
2023-04-06 02:24:39 +03:00
|
|
|
ARG OPENSSL_VERSION=1.1.1u
|
|
|
|
ARG OPENSSL_HASH=e2f8d84b523eecd06c7be7626830370300fbcc15386bf5142d72758f6963ebc6
|
2020-10-22 06:30:12 +03:00
|
|
|
RUN wget -q https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \
|
2021-09-15 18:52:12 +03:00
|
|
|
&& echo "${OPENSSL_HASH} openssl-${OPENSSL_VERSION}.tar.gz" | sha256sum -c \
|
2020-10-22 06:30:12 +03:00
|
|
|
&& tar -xzf openssl-${OPENSSL_VERSION}.tar.gz \
|
|
|
|
&& rm openssl-${OPENSSL_VERSION}.tar.gz \
|
|
|
|
&& cd openssl-${OPENSSL_VERSION} \
|
|
|
|
&& ANDROID_NDK_HOME=${ANDROID_NDK_ROOT} ./Configure CC=${ANDROID_CLANG} CXX=${ANDROID_CLANGPP} \
|
2024-01-14 18:08:55 +02:00
|
|
|
android-arm64 no-shared --static \
|
2020-10-22 06:30:12 +03:00
|
|
|
--with-zlib-include=${PREFIX}/include --with-zlib-lib=${PREFIX}/lib \
|
|
|
|
--prefix=${PREFIX} --openssldir=${PREFIX} \
|
|
|
|
&& sed -i 's/CNF_EX_LIBS=-ldl -pthread//g;s/BIN_CFLAGS=-pie $(CNF_CFLAGS) $(CFLAGS)//g' Makefile \
|
|
|
|
&& ANDROID_NDK_HOME=${ANDROID_NDK_ROOT} make -j${THREADS} \
|
|
|
|
&& make -j${THREADS} install \
|
|
|
|
&& rm -rf $(pwd)
|
|
|
|
|
2021-09-13 05:09:24 +03:00
|
|
|
ARG EXPAT_VERSION=2.4.1
|
|
|
|
ARG EXPAT_HASH=2f9b6a580b94577b150a7d5617ad4643a4301a6616ff459307df3e225bcfbf40
|
|
|
|
RUN wget https://github.com/libexpat/libexpat/releases/download/R_2_4_1/expat-${EXPAT_VERSION}.tar.bz2 && \
|
|
|
|
echo "${EXPAT_HASH} expat-${EXPAT_VERSION}.tar.bz2" | sha256sum -c && \
|
|
|
|
tar -xf expat-${EXPAT_VERSION}.tar.bz2 && \
|
|
|
|
rm expat-${EXPAT_VERSION}.tar.bz2 && \
|
|
|
|
cd expat-${EXPAT_VERSION} && \
|
|
|
|
CC=${ANDROID_CLANG} CXX=${ANDROID_CLANGPP} ./configure --enable-static --disable-shared --prefix=${PREFIX} --host=aarch64-linux-android && \
|
|
|
|
make -j$THREADS && \
|
|
|
|
make -j$THREADS install && \
|
|
|
|
rm -rf $(pwd)
|
|
|
|
|
2021-07-09 03:27:30 +03:00
|
|
|
ARG UNBOUND_VERSION=1.16.2
|
|
|
|
ARG UNBOUND_HASH=2e32f283820c24c51ca1dd8afecfdb747c7385a137abe865c99db4b257403581
|
2021-09-13 05:09:24 +03:00
|
|
|
RUN wget https://www.nlnetlabs.nl/downloads/unbound/unbound-${UNBOUND_VERSION}.tar.gz && \
|
|
|
|
echo "${UNBOUND_HASH} unbound-${UNBOUND_VERSION}.tar.gz" | sha256sum -c && \
|
|
|
|
tar -xzf unbound-${UNBOUND_VERSION}.tar.gz && \
|
|
|
|
rm unbound-${UNBOUND_VERSION}.tar.gz && \
|
|
|
|
cd unbound-${UNBOUND_VERSION} && \
|
|
|
|
CC=${ANDROID_CLANG} CXX=${ANDROID_CLANGPP} ./configure --disable-shared --enable-static --without-pyunbound --with-libexpat=${PREFIX} --with-ssl=${PREFIX} --with-libevent=no --without-pythonmodule --disable-flto --with-pthreads --with-libunbound-only --host=aarch64-linux-android --with-pic --prefix=${PREFIX} && \
|
|
|
|
make -j$THREADS && \
|
|
|
|
make -j$THREADS install && \
|
|
|
|
rm -rf $(pwd)
|
|
|
|
|
2021-07-09 03:27:30 +03:00
|
|
|
ARG ZMQ_VERSION=v4.3.4
|
|
|
|
ARG ZMQ_HASH=4097855ddaaa65ed7b5e8cb86d143842a594eebd
|
2020-10-22 06:30:12 +03:00
|
|
|
RUN git clone https://github.com/zeromq/libzmq.git -b ${ZMQ_VERSION} --depth 1 \
|
|
|
|
&& cd libzmq \
|
|
|
|
&& git checkout ${ZMQ_HASH} \
|
|
|
|
&& ./autogen.sh \
|
|
|
|
&& CC=${ANDROID_CLANG} CXX=${ANDROID_CLANGPP} ./configure --prefix=${PREFIX} --host=aarch64-linux-android \
|
|
|
|
--enable-static --disable-shared \
|
|
|
|
&& make -j${THREADS} \
|
|
|
|
&& make -j${THREADS} install \
|
|
|
|
&& rm -rf $(pwd)
|
|
|
|
|
|
|
|
ARG SODIUM_VERSION=1.0.18
|
|
|
|
ARG SODIUM_HASH=4f5e89fa84ce1d178a6765b8b46f2b6f91216677
|
|
|
|
RUN set -ex \
|
|
|
|
&& git clone https://github.com/jedisct1/libsodium.git -b ${SODIUM_VERSION} --depth 1 \
|
|
|
|
&& cd libsodium \
|
|
|
|
&& test `git rev-parse HEAD` = ${SODIUM_HASH} || exit 1 \
|
|
|
|
&& ./autogen.sh \
|
|
|
|
&& CC=${ANDROID_CLANG} CXX=${ANDROID_CLANGPP} ./configure --prefix=${PREFIX} --host=aarch64-linux-android --enable-static --disable-shared \
|
|
|
|
&& make -j${THREADS} install \
|
|
|
|
&& rm -rf $(pwd)
|
|
|
|
|
2021-07-09 03:27:30 +03:00
|
|
|
RUN git clone -b libgpg-error-1.41 --depth 1 git://git.gnupg.org/libgpg-error.git \
|
2020-10-22 06:30:12 +03:00
|
|
|
&& cd libgpg-error \
|
2021-07-09 03:27:30 +03:00
|
|
|
&& git reset --hard 98032624ae89a67ee6fe3b1db5d95032e681d163 \
|
2020-10-22 06:30:12 +03:00
|
|
|
&& ./autogen.sh \
|
|
|
|
&& CC=${ANDROID_CLANG} CXX=${ANDROID_CLANGPP} ./configure --host=aarch64-linux-android --prefix=${PREFIX} --disable-rpath --disable-shared --enable-static --disable-doc --disable-tests \
|
|
|
|
&& PATH=${TOOLCHAIN_DIR}/bin:${HOST_PATH} make -j${THREADS} \
|
|
|
|
&& make -j${THREADS} install \
|
|
|
|
&& rm -rf $(pwd)
|
|
|
|
|
2021-07-09 03:27:30 +03:00
|
|
|
RUN git clone -b libgcrypt-1.10.1 --depth 1 git://git.gnupg.org/libgcrypt.git \
|
2020-10-22 06:30:12 +03:00
|
|
|
&& cd libgcrypt \
|
2021-07-09 03:27:30 +03:00
|
|
|
&& git reset --hard ae0e567820c37f9640440b3cff77d7c185aa6742 \
|
2020-10-22 06:30:12 +03:00
|
|
|
&& ./autogen.sh \
|
|
|
|
&& CC=${ANDROID_CLANG} CXX=${ANDROID_CLANGPP} ./configure --host=aarch64-linux-android --prefix=${PREFIX} --with-gpg-error-prefix=${PREFIX} --disable-shared --enable-static --disable-doc --disable-tests \
|
|
|
|
&& PATH=${TOOLCHAIN_DIR}/bin:${HOST_PATH} make -j${THREADS} \
|
|
|
|
&& make -j${THREADS} install \
|
|
|
|
&& rm -rf $(pwd)
|
|
|
|
|
2021-07-09 03:27:30 +03:00
|
|
|
RUN git clone -b v3.24.2 --depth 1 https://github.com/Kitware/CMake \
|
2021-03-16 00:52:22 +02:00
|
|
|
&& cd CMake \
|
2021-07-09 03:27:30 +03:00
|
|
|
&& git reset --hard 31f835410efeea50acd43512eb9e5646a26ea177 \
|
2021-03-16 00:52:22 +02:00
|
|
|
&& PATH=${HOST_PATH} ./bootstrap \
|
|
|
|
&& PATH=${HOST_PATH} make -j${THREADS} \
|
|
|
|
&& PATH=${HOST_PATH} make -j${THREADS} install \
|
|
|
|
&& rm -rf $(pwd)
|
|
|
|
|
2021-07-11 01:30:09 +03:00
|
|
|
RUN GRADLE_VERSION=5.6.4 \
|
|
|
|
&& GRADLE_HASH=1f3067073041bc44554d0efe5d402a33bc3d3c93cc39ab684f308586d732a80d \
|
|
|
|
&& wget -q https\://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip \
|
|
|
|
&& echo "${GRADLE_HASH} gradle-${GRADLE_VERSION}-bin.zip" | sha256sum -c \
|
|
|
|
&& GRADLE_LOCAL_PATH=gradle/wrapper/dists/gradle-${GRADLE_VERSION}-bin/bxirm19lnfz6nurbatndyydux \
|
|
|
|
&& mkdir -p ${GRADLE_LOCAL_PATH} \
|
|
|
|
&& mv gradle-${GRADLE_VERSION}-bin.zip ${GRADLE_LOCAL_PATH}
|
|
|
|
|
|
|
|
ENV GRADLE_USER_HOME=${WORKDIR}/gradle
|
|
|
|
|
2020-10-22 06:30:12 +03:00
|
|
|
CMD set -ex \
|
|
|
|
&& cd /monero-gui \
|
|
|
|
&& mkdir -p build/Android/release \
|
|
|
|
&& cd build/Android/release \
|
|
|
|
&& cmake \
|
|
|
|
-DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake" \
|
2020-11-08 01:05:26 +02:00
|
|
|
-DCMAKE_PREFIX_PATH="${PREFIX}" \
|
|
|
|
-DCMAKE_FIND_ROOT_PATH="${PREFIX}" \
|
2020-10-22 06:30:12 +03:00
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DARCH="armv8-a" \
|
|
|
|
-DANDROID_NATIVE_API_LEVEL=${ANDROID_NATIVE_API_LEVEL} \
|
|
|
|
-DANDROID_ABI="arm64-v8a" \
|
|
|
|
-DANDROID_TOOLCHAIN=clang \
|
|
|
|
-DBoost_USE_STATIC_RUNTIME=ON \
|
2020-11-08 01:05:26 +02:00
|
|
|
-DLRELEASE_PATH="${PREFIX}/bin" \
|
2020-10-22 06:30:12 +03:00
|
|
|
-DQT_ANDROID_APPLICATION_BINARY="monero-wallet-gui" \
|
2021-07-09 03:25:40 +03:00
|
|
|
-DANDROID_SDK="${ANDROID_SDK_ROOT}" \
|
2020-10-22 06:30:12 +03:00
|
|
|
-DWITH_SCANNER=ON \
|
2022-09-25 12:33:23 +03:00
|
|
|
-DWITH_DESKTOP_ENTRY=OFF \
|
2020-10-22 06:30:12 +03:00
|
|
|
../../.. \
|
|
|
|
&& PATH=${HOST_PATH} make generate_translations_header \
|
|
|
|
&& make -j${THREADS} -C src \
|
|
|
|
&& make -j${THREADS} apk
|