From 8f1810d1e2a1c69ec8b7f48236ae21dcd2611ec6 Mon Sep 17 00:00:00 2001 From: Benjamin Henrion Date: Wed, 16 Dec 2015 11:58:44 +0100 Subject: [PATCH] Add a Dockerfile to build libzmq for android --- builds/android/Dockerfile | 22 ++++++++++++++++++++++ builds/android/build.sh | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 builds/android/Dockerfile diff --git a/builds/android/Dockerfile b/builds/android/Dockerfile new file mode 100644 index 00000000..75060f75 --- /dev/null +++ b/builds/android/Dockerfile @@ -0,0 +1,22 @@ +FROM ubuntu:14.04 +MAINTAINER Benjamin Henrion + +RUN DEBIAN_FRONTEND=noninteractive apt-get update -y -q +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --force-yes tar git curl nano wget dialog net-tools build-essential vim emacs apt-utils file uuid-dev cmake asciidoc python autoconf automake libtool pkg-config xmlto sudo gettext apt-utils + +RUN useradd -d /home/zmq -m -s /bin/bash zmq +RUN echo "zmq ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/zmq +RUN chmod 0440 /etc/sudoers.d/zmq + +USER zmq +# install android-ndk +RUN cd ~ && wget -q http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin -O android-ndk-r10e-linux-x86_64.bin && chmod +x android-ndk-r10e-linux-x86_64.bin +RUN cd ~ && ./android-ndk-r10e-linux-x86_64.bin +ENV ANDROID_NDK_ROOT /home/zmq/android-ndk-r10e +ENV TOOLCHAIN_NAME arm-linux-androideabi-4.9 +ENV TOOLCHAIN_HOST arm-linux-androideabi +ENV TOOLCHAIN_PATH ${ANDROID_NDK_ROOT}/toolchains/${TOOLCHAIN_NAME}/prebuilt/linux-x86_64/bin +ENV TOOLCHAIN_ARCH arm +# build libzmq for android +RUN cd ~ && git clone https://github.com/zeromq/libzmq.git +RUN cd ~/libzmq/builds/android && ./build.sh diff --git a/builds/android/build.sh b/builds/android/build.sh index 3d4e6057..6d849e23 100755 --- a/builds/android/build.sh +++ b/builds/android/build.sh @@ -55,5 +55,5 @@ LIBTOOL_EXTRA_LDFLAGS='-avoid-version' ## # Verify shared libraries in prefix -android_build_verify_so "libsodium.so" android_build_verify_so "libzmq.so" "libsodium.so" +echo "libzmq android build succeeded"