Android dockerfile: add zmq dependency

This commit is contained in:
MoroccanMalinois 2017-11-20 00:36:11 +00:00
parent dc6a8014bd
commit c256a248a5
No known key found for this signature in database
GPG Key ID: A63BDCF76B8B38BD
2 changed files with 27 additions and 2 deletions

View File

@ -1,6 +1,6 @@
FROM debian:jessie FROM debian:jessie
RUN apt-get update && apt-get install -y unzip automake build-essential curl file pkg-config git python RUN apt-get update && apt-get install -y unzip automake build-essential curl file pkg-config git python libtool
WORKDIR /opt/android WORKDIR /opt/android
## INSTALL ANDROID SDK ## INSTALL ANDROID SDK
@ -72,10 +72,23 @@ RUN curl -s -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
&& make build_crypto build_ssl \ && make build_crypto build_ssl \
&& cd .. && mv openssl-${OPENSSL_VERSION} openssl && cd .. && mv openssl-${OPENSSL_VERSION} openssl
# ZMQ
RUN git clone https://github.com/zeromq/zeromq4-1.git \
&& git clone https://github.com/zeromq/cppzmq.git \
&& cd zeromq4-1 \
&& ./autogen.sh \
&& CC=clang CXX=clang++ ./configure --host=arm-none-linux-gnueabi \
&& make
RUN ln -s /opt/android/openssl/libcrypto.a /opt/android/openssl/libssl.a /opt/android/toolchain-arm/arm-linux-androideabi/lib/armv7-a
RUN git clone https://github.com/monero-project/monero.git \ RUN git clone https://github.com/monero-project/monero.git \
&& cd monero \ && cd monero \
&& mkdir -p build/release \ && mkdir -p build/release \
&& CC=clang CXX=clang++ \ && CC=clang CXX=clang++ \
BOOST_ROOT=${WORKDIR}/boost_${BOOST_VERSION} BOOST_LIBRARYDIR=${WORKDIR}/boost_${BOOST_VERSION}/android32/lib/ \ BOOST_ROOT=${WORKDIR}/boost_${BOOST_VERSION} BOOST_LIBRARYDIR=${WORKDIR}/boost_${BOOST_VERSION}/android32/lib/ \
OPENSSL_ROOT_DIR=${WORKDIR}/openssl/ \ OPENSSL_ROOT_DIR=${WORKDIR}/openssl/ \
CMAKE_INCLUDE_PATH=${WORKDIR}/cppzmq/ \
CMAKE_LIBRARY_PATH=${WORKDIR}/zeromq4-1/.libs \
CXXFLAGS="-I ${WORKDIR}/zeromq4-1/include/" \
make release-static-android make release-static-android

View File

@ -1,6 +1,6 @@
FROM debian:jessie FROM debian:jessie
RUN apt-get update && apt-get install -y unzip automake build-essential curl file pkg-config git python RUN apt-get update && apt-get install -y unzip automake build-essential curl file pkg-config git python libtool
WORKDIR /opt/android WORKDIR /opt/android
## INSTALL ANDROID SDK ## INSTALL ANDROID SDK
@ -72,6 +72,15 @@ RUN curl -s -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
&& make build_crypto build_ssl \ && make build_crypto build_ssl \
&& cd .. && mv openssl-${OPENSSL_VERSION} openssl && cd .. && mv openssl-${OPENSSL_VERSION} openssl
RUN git clone https://github.com/zeromq/zeromq4-1.git \
&& git clone https://github.com/zeromq/cppzmq.git \
&& cd zeromq4-1 \
&& ./autogen.sh \
&& CC=clang CXX=clang++ ./configure --host=aarch64-linux-android \
&& make
RUN ln -s /opt/android/openssl/libcrypto.a /opt/android/openssl/libssl.a /opt/android/toolchain-arm/aarch64-linux-android/lib
RUN git clone https://github.com/monero-project/monero.git \ RUN git clone https://github.com/monero-project/monero.git \
&& cd monero \ && cd monero \
&& mkdir -p build/release \ && mkdir -p build/release \
@ -79,5 +88,8 @@ RUN git clone https://github.com/monero-project/monero.git \
&& CC=clang CXX=clang++ \ && CC=clang CXX=clang++ \
BOOST_ROOT=${WORKDIR}/boost_${BOOST_VERSION} BOOST_LIBRARYDIR=${WORKDIR}/boost_${BOOST_VERSION}/android64/lib/ \ BOOST_ROOT=${WORKDIR}/boost_${BOOST_VERSION} BOOST_LIBRARYDIR=${WORKDIR}/boost_${BOOST_VERSION}/android64/lib/ \
OPENSSL_ROOT_DIR=${WORKDIR}/openssl/ \ OPENSSL_ROOT_DIR=${WORKDIR}/openssl/ \
CMAKE_INCLUDE_PATH=${WORKDIR}/cppzmq/ \
CMAKE_LIBRARY_PATH=${WORKDIR}/zeromq4-1/.libs \
CXXFLAGS="-I ${WORKDIR}/zeromq4-1/include/" \
cmake -D BUILD_TESTS=OFF -D ARCH="armv8-a" -D STATIC=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release -D ANDROID=true -D INSTALL_VENDORED_LIBUNBOUND=ON -D BUILD_TAG="android" ../.. \ cmake -D BUILD_TESTS=OFF -D ARCH="armv8-a" -D STATIC=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release -D ANDROID=true -D INSTALL_VENDORED_LIBUNBOUND=ON -D BUILD_TAG="android" ../.. \
&& make -j3 && make -j3