2021-08-28 15:39:57 -04:00
|
|
|
ARG ANDROID_NDK_ARCH=arm
|
|
|
|
FROM registry.gitlab.com/retroshare/retroshare:android_${ANDROID_NDK_ARCH}_base
|
|
|
|
|
2021-12-01 10:30:28 -05:00
|
|
|
ENV APT_UNAT="--assume-yes --quiet"
|
|
|
|
|
|
|
|
RUN apt-get update $APT_UNAT && apt-get upgrade $APT_UNAT --show-upgraded
|
2021-08-28 15:39:57 -04:00
|
|
|
|
|
|
|
ARG REPO_URL=https://gitlab.com/RetroShare/RetroShare.git
|
|
|
|
ARG REPO_BRANCH=master
|
|
|
|
|
|
|
|
WORKDIR /RetroShare
|
|
|
|
RUN git remote add testing $REPO_URL && \
|
|
|
|
git fetch --tags testing $REPO_BRANCH && \
|
|
|
|
git reset --hard testing/$REPO_BRANCH && \
|
|
|
|
git --no-pager log --max-count 1
|
|
|
|
|
|
|
|
RUN rm -rf /jsonapi-generator-build ; mkdir /jsonapi-generator-build
|
|
|
|
WORKDIR /jsonapi-generator-build/
|
|
|
|
RUN qmake ../RetroShare/jsonapi-generator/src/ \
|
|
|
|
CONFIG+=no_retroshare_plugins \
|
|
|
|
CONFIG+=no_retroshare_service CONFIG+=no_retroshare_gui \
|
2021-10-25 07:32:24 -04:00
|
|
|
CONFIG+=rs_jsonapi CONFIG+=no_rs_sam3_libsam3 && \
|
2021-08-28 15:39:57 -04:00
|
|
|
make -j$(nproc)
|
|
|
|
|
|
|
|
RUN rm -rf /retroshare-service-android-build ; mkdir /retroshare-service-android-build
|
|
|
|
WORKDIR /retroshare-service-android-build
|
|
|
|
|
|
|
|
# ARG declared before FROM get wiped after it, so we need declaring it again
|
|
|
|
ARG ANDROID_NDK_ARCH=arm
|
2021-11-05 08:14:27 -04:00
|
|
|
ARG RS_SERVICE_QMAKE_EXTRA_OPTS
|
2021-08-28 15:39:57 -04:00
|
|
|
RUN $($PREPARE_TOOLCHAIN get_qt_dir | head -n 1)/bin/qmake ../RetroShare \
|
|
|
|
-spec android-clang \
|
|
|
|
CONFIG+=retroshare_service CONFIG+=rs_jsonapi \
|
|
|
|
RS_UPNP_LIB=miniupnpc \
|
|
|
|
JSONAPI_GENERATOR_EXE=/jsonapi-generator-build/jsonapi-generator \
|
|
|
|
NATIVE_LIBS_TOOLCHAIN_PATH=$NATIVE_LIBS_TOOLCHAIN_PATH \
|
|
|
|
CONFIG+=no_retroshare_gui CONFIG+=no_rs_service_webui_terminal_password \
|
2021-10-25 07:32:24 -04:00
|
|
|
CONFIG+=no_rs_service_terminal_login \
|
2021-11-05 08:14:27 -04:00
|
|
|
CONFIG+=no_rs_sam3 CONFIG+=no_rs_sam3_libsam3 \
|
|
|
|
$RS_SERVICE_QMAKE_EXTRA_OPTS
|
2021-08-28 15:39:57 -04:00
|
|
|
RUN make -j$(nproc)
|
|
|
|
RUN make install INSTALL_ROOT=/retroshare-service-android-build/android-build/
|
|
|
|
|
|
|
|
ARG ANDROID_PLATFORM_VER=16
|
|
|
|
RUN $($PREPARE_TOOLCHAIN get_qt_dir | head -n 1)/bin/androiddeployqt \
|
|
|
|
--input retroshare-service/src/android-libretroshare-service.so-deployment-settings.json \
|
|
|
|
--output android-build --android-platform android-$ANDROID_PLATFORM_VER \
|
|
|
|
--jdk $JAVA_HOME --gradle
|