The build script requires the paths to the NDK and OpenSSL sources. It runs the build in a Docker container, by default. But if the required tools are installed on the system (currently jq, make and perl) it can also be run directly on the system by defining NO_DOCKER. A relatively recent version of the NDK is required (the pre-built toolchains are required).
27 lines
609 B
Docker
27 lines
609 B
Docker
# Container for building OpenSSL's libcrypto for use in strongSwan's Android app
|
|
#
|
|
# Use the script to simplify the process of building the image and running
|
|
# the compilation in the container, e.g.:
|
|
#
|
|
# ANDROID_NDK_ROOT=~/android-ndk OPENSSL_SRC=~/openssl ./build.sh
|
|
|
|
FROM debian:bullseye
|
|
|
|
ARG packages="jq make perl"
|
|
|
|
RUN apt-get update && \
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y \
|
|
--no-install-recommends \
|
|
$packages \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY compile.sh /
|
|
RUN chmod +x /compile.sh
|
|
|
|
ENV ANDROID_NDK_ROOT /ndk
|
|
ENV OUT_DIR /out
|
|
|
|
WORKDIR /src
|
|
|
|
ENTRYPOINT ["/compile.sh"]
|