diff options
author | David Carlier <[email protected]> | 2019-07-03 14:03:14 +0000 |
---|---|---|
committer | David Carlier <[email protected]> | 2019-07-03 14:03:14 +0000 |
commit | 8393ac028fac8c3519ca0c291546806099b22d12 (patch) | |
tree | 2f769d9d5355b84aafa9ae16fa664de178114ad5 /src/scripts | |
parent | 110af949412e7c4b28b447a3600a947ddf2a2f2f (diff) |
Android docker build proposal.
Using external image just for the NDK and focusing on the two
most popular architectures.
Diffstat (limited to 'src/scripts')
-rw-r--r-- | src/scripts/Dockerfile.android | 22 | ||||
-rwxr-xr-x | src/scripts/docker-android.sh | 6 |
2 files changed, 28 insertions, 0 deletions
diff --git a/src/scripts/Dockerfile.android b/src/scripts/Dockerfile.android new file mode 100644 index 000000000..57514532c --- /dev/null +++ b/src/scripts/Dockerfile.android @@ -0,0 +1,22 @@ +FROM debian:stretch AS debian +ARG SDK +RUN apt-get update && apt-get -y --no-install-recommends install \ + libboost-all-dev \ + make \ + python3-sphinx + +RUN mkdir -p /botan/android +WORKDIR /botan +COPY --from=bitriseio/android-ndk /opt/android-ndk android-ndk +COPY configure.py configure.py +COPY src src +COPY doc doc +COPY license.txt license.txt +COPY news.rst news.rst +ENV PATH=$PATH:android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/ +RUN ./configure.py --prefix=android/arm --os=android --cpu=arm --cc=clang --cc-bin=armv7a-linux-androideabi${SDK}-clang++ --ar-command=arm-linux-androideabi-ar --with-sphinx +RUN make -j`getconf _NPROCESSORS_ONLN` +RUN make install && make clean +RUN ./configure.py --prefix=android/arm64 --os=android --cpu=arm64 --cc=clang --cc-bin=aarch64-linux-android${SDK}-clang++ --ar-command=aarch64-linux-android-ar --with-sphinx +RUN make -j`getconf _NPROCESSORS_ONLN` +RUN make install diff --git a/src/scripts/docker-android.sh b/src/scripts/docker-android.sh new file mode 100755 index 000000000..1428c5526 --- /dev/null +++ b/src/scripts/docker-android.sh @@ -0,0 +1,6 @@ +VERSION=`./configure.py --version` +mkdir -p docker-builds +docker build -f src/scripts/Dockerfile.android --force-rm -t botan-android-${VERSION} --build-arg SDK=${SDK} . +docker create --name botan-android-${VERSION} botan-android-${VERSION} +docker cp botan-android-${VERSION}:/botan/android docker-builds +docker rm -f botan-android-${VERSION} |