Skip to content

Commit

Permalink
feat: add var XMRIG_BUILD_EXTRA_ARGS
Browse files Browse the repository at this point in the history
  • Loading branch information
lpsm-dev committed Jan 7, 2022
1 parent 0af903a commit aeca91e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FROM alpine:3.15 as build
ARG XMRIG_VERSION=v6.15.3
ARG XMRIG_URL="https://github.com/xmrig/xmrig.git"
ARG XMRIG_BUILD_ARGS="-DXMRIG_DEPS=scripts/deps -DBUILD_STATIC=ON -DCMAKE_BUILD_TYPE=Release -DWITH_HWLOC=OFF -DCMAKE_SYSTEM_NAME=Linux"
ARG XMRIG_BUILD_EXTRA_ARGS=""
RUN set -ex && \
apk add --no-cache git make cmake \
libstdc++ gcc g++ automake libtool libuv-dev \
Expand All @@ -13,9 +14,9 @@ RUN set -ex; \
sed -i "s/kDefaultDonateLevel = 1;/kDefaultDonateLevel = 0;/g" ./xmrig/src/donate.h && \
sed -i "s/kMinimumDonateLevel = 1;/kMinimumDonateLevel = 0;/g" ./xmrig/src/donate.h && \
ARCH=`uname -m` && \
if [ "$ARCH" == "aarch64" ]; then echo "aarch64" && export XMRIG_BUILD_ARGS="${XMRIG_BUILD_ARGS -DARM_TARGET=7 -DCMAKE_SYSTEM_PROCESSOR=arm}"; fi && \
if [ "$ARCH" == "aarch64" ]; then echo "aarch64" && XMRIG_BUILD_EXTRA_ARGS="-DARM_TARGET=7 -DCMAKE_SYSTEM_PROCESSOR=arm"; fi && \
cd xmrig/scripts && ./build_deps.sh && cd ../build && \
cmake .. $XMRIG_BUILD_ARGS && \
cmake .. $XMRIG_BUILD_ARGS &XMRIG_BUILD_EXTRA_ARGS && \
make -j$(nproc)

FROM alpine:3.15
Expand Down

0 comments on commit aeca91e

Please sign in to comment.