diff options
author | Jack Lloyd <[email protected]> | 2019-07-04 07:08:50 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-07-04 07:08:50 -0400 |
commit | dc5371a442559f18a4c894204b9fe5c7cf940e75 (patch) | |
tree | f7aadd69bbb3451b2318773c45c141440928e499 /src | |
parent | 61787c0dee73cad59912d15e151bc720095e7ee1 (diff) | |
parent | 0533bf55effbcc3aba976ee223a569cecc628c2a (diff) |
Merge GH #2016 Add Docker script to help end users build on Android
Diffstat (limited to 'src')
-rw-r--r-- | src/scripts/Dockerfile.android | 19 | ||||
-rwxr-xr-x | src/scripts/docker-android.sh | 10 |
2 files changed, 29 insertions, 0 deletions
diff --git a/src/scripts/Dockerfile.android b/src/scripts/Dockerfile.android new file mode 100644 index 000000000..4087d6bb3 --- /dev/null +++ b/src/scripts/Dockerfile.android @@ -0,0 +1,19 @@ +FROM debian:stretch AS debian +ARG ANDORID_SDK_VER +ARG ANDROID_ARCH +ARG ANDROID_TOOLCHAIN_SUF +RUN apt-get update && apt-get -y --no-install-recommends install \ + make + +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=${ANDROID_ARCH} --cc=clang --cc-bin=armv7a-linux-android${ANDROID_TOOLCHAIN_SUF}${SDK}-clang++ --ar-command=arm-linux-android${ANDROID_TOOLCHAIN_SUF}-ar +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..ec23a2cd6 --- /dev/null +++ b/src/scripts/docker-android.sh @@ -0,0 +1,10 @@ +VERSION=`./configure.py --version` +mkdir -p docker-builds +docker build -f src/scripts/Dockerfile.android --force-rm -t botan-android-${VERSION} \ + --build-arg ANDROID_SDK_VER=${ANDROID_SDK_VER} \ + --build-arg ANDROID_ARCH=${ANDROID_ARCH} \ + --build-arg ANDROID_TOOLCHAIN_SUF=${ANDROID_TOOLCHAIN_SUF} \ + . +docker create --name botan-android-${VERSION} botan-android-${VERSION} +docker cp botan-android-${VERSION}:/botan/android docker-builds +docker rm -f botan-android-${VERSION} |