mirror of
https://github.com/vtnerd/monero-lws.git
synced 2025-05-11 21:32:16 +00:00
Update Dockerfile and CMake files to build develop/master (#149)
This commit is contained in:
parent
6af558026f
commit
a5d802cd9b
3 changed files with 24 additions and 13 deletions
|
@ -104,6 +104,9 @@ if(STATIC)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# monero `master` and `release-v0.18` branches use different LIBSODIUM
|
||||||
|
# find routines. So the upstream cmake names differ
|
||||||
|
|
||||||
load_cache(${MONERO_BUILD_DIR} READ_WITH_PREFIX monero_
|
load_cache(${MONERO_BUILD_DIR} READ_WITH_PREFIX monero_
|
||||||
Boost_THREAD_LIBRARY_RELEASE
|
Boost_THREAD_LIBRARY_RELEASE
|
||||||
CMAKE_CXX_COMPILER
|
CMAKE_CXX_COMPILER
|
||||||
|
@ -118,6 +121,7 @@ load_cache(${MONERO_BUILD_DIR} READ_WITH_PREFIX monero_
|
||||||
OPENSSL_CRYPTO_LIBRARY
|
OPENSSL_CRYPTO_LIBRARY
|
||||||
OPENSSL_SSL_LIBRARY
|
OPENSSL_SSL_LIBRARY
|
||||||
sodium_LIBRARY_RELEASE
|
sodium_LIBRARY_RELEASE
|
||||||
|
SODIUM_LIBRARY
|
||||||
UNBOUND_LIBRARIES
|
UNBOUND_LIBRARIES
|
||||||
ZMQ_INCLUDE_PATH
|
ZMQ_INCLUDE_PATH
|
||||||
ZMQ_LIB
|
ZMQ_LIB
|
||||||
|
@ -176,6 +180,11 @@ endif()
|
||||||
set(LMDB_INCLUDE "${monero_LMDB_INCLUDE}")
|
set(LMDB_INCLUDE "${monero_LMDB_INCLUDE}")
|
||||||
set(LMDB_LIB_PATH "monero::lmdb")
|
set(LMDB_LIB_PATH "monero::lmdb")
|
||||||
set(ZMQ_LIB "${monero_ZMQ_LIB}")
|
set(ZMQ_LIB "${monero_ZMQ_LIB}")
|
||||||
|
if (monero_SODIUM_LIBRARY)
|
||||||
|
set(SODIUM_LIBRARY "${monero_SODIUM_LIBRARY}")
|
||||||
|
else ()
|
||||||
|
set(SODIUM_LIBRARY "${monero_sodium_LIBRARY_RELEASE}")
|
||||||
|
endif ()
|
||||||
|
|
||||||
if(NOT ZMQ_LIB)
|
if(NOT ZMQ_LIB)
|
||||||
message(FATAL_ERROR "Could not find required libzmq")
|
message(FATAL_ERROR "Could not find required libzmq")
|
||||||
|
@ -237,6 +246,7 @@ set_property(TARGET monero::libraries PROPERTY
|
||||||
"${MONERO_SOURCE_DIR}/external/supercop/include"
|
"${MONERO_SOURCE_DIR}/external/supercop/include"
|
||||||
"${MONERO_SOURCE_DIR}/src"
|
"${MONERO_SOURCE_DIR}/src"
|
||||||
)
|
)
|
||||||
|
|
||||||
set_property(TARGET monero::libraries PROPERTY
|
set_property(TARGET monero::libraries PROPERTY
|
||||||
INTERFACE_LINK_LIBRARIES
|
INTERFACE_LINK_LIBRARIES
|
||||||
${IMPORTED_MONERO_LIBRARIES}
|
${IMPORTED_MONERO_LIBRARIES}
|
||||||
|
@ -252,7 +262,7 @@ set_property(TARGET monero::libraries PROPERTY
|
||||||
${monero_LIBUDEV_LIBRARY}
|
${monero_LIBUDEV_LIBRARY}
|
||||||
${monero_OPENSSL_SSL_LIBRARY}
|
${monero_OPENSSL_SSL_LIBRARY}
|
||||||
${monero_OPENSSL_CRYPTO_LIBRARY}
|
${monero_OPENSSL_CRYPTO_LIBRARY}
|
||||||
${monero_sodium_LIBRARY_RELEASE}
|
${SODIUM_LIBRARY}
|
||||||
${monero_UNBOUND_LIBRARIES}
|
${monero_UNBOUND_LIBRARIES}
|
||||||
${CMAKE_DL_LIBS}
|
${CMAKE_DL_LIBS}
|
||||||
)
|
)
|
||||||
|
|
24
Dockerfile
24
Dockerfile
|
@ -1,8 +1,8 @@
|
||||||
# Initial base from https://github.com/sethforprivacy/monero-lws/blob/588c7f1965d3afbda8a65dc870645650e063e897/Dockerfile
|
# Initial base from https://github.com/sethforprivacy/monero-lws/blob/588c7f1965d3afbda8a65dc870645650e063e897/Dockerfile
|
||||||
|
|
||||||
# Set monerod version to install from github
|
# Set monerod version to install from github
|
||||||
ARG MONERO_BRANCH=v0.18.2.2
|
ARG MONERO_BRANCH=v0.18.3.4
|
||||||
ARG MONERO_COMMIT_HASH=e06129bb4d1076f4f2cebabddcee09f1e9e30dcc
|
ARG MONERO_COMMIT_HASH=b089f9ee69924882c5d14dd1a6991deb05d9d1cd
|
||||||
|
|
||||||
# Select ubuntu:20.04 for the build image base
|
# Select ubuntu:20.04 for the build image base
|
||||||
FROM ubuntu:20.04 as build
|
FROM ubuntu:20.04 as build
|
||||||
|
@ -52,22 +52,22 @@ ENV USE_SINGLE_BUILDDIR 1
|
||||||
ENV BOOST_DEBUG 1
|
ENV BOOST_DEBUG 1
|
||||||
|
|
||||||
# Build expat, a dependency for libunbound
|
# Build expat, a dependency for libunbound
|
||||||
RUN set -ex && wget https://github.com/libexpat/libexpat/releases/download/R_2_4_8/expat-2.4.8.tar.bz2 && \
|
RUN set -ex && wget https://github.com/libexpat/libexpat/releases/download/R_2_6_3/expat-2.6.3.tar.bz2 && \
|
||||||
echo "a247a7f6bbb21cf2ca81ea4cbb916bfb9717ca523631675f99b3d4a5678dcd16 expat-2.4.8.tar.bz2" | sha256sum -c && \
|
echo "b8baef92f328eebcf731f4d18103951c61fa8c8ec21d5ff4202fb6f2198aeb2d expat-2.6.3.tar.bz2" | sha256sum -c && \
|
||||||
tar -xf expat-2.4.8.tar.bz2 && \
|
tar -xf expat-2.6.3.tar.bz2 && \
|
||||||
rm expat-2.4.8.tar.bz2 && \
|
rm expat-2.6.3.tar.bz2 && \
|
||||||
cd expat-2.4.8 && \
|
cd expat-2.6.3 && \
|
||||||
./configure --enable-static --disable-shared --prefix=/usr && \
|
./configure --enable-static --disable-shared --prefix=/usr && \
|
||||||
make -j${NPROC:-$(nproc)} && \
|
make -j${NPROC:-$(nproc)} && \
|
||||||
make -j${NPROC:-$(nproc)} install
|
make -j${NPROC:-$(nproc)} install
|
||||||
|
|
||||||
# Build libunbound for static builds
|
# Build libunbound for static builds
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
RUN set -ex && wget https://www.nlnetlabs.nl/downloads/unbound/unbound-1.16.1.tar.gz && \
|
RUN set -ex && wget https://www.nlnetlabs.nl/downloads/unbound/unbound-1.22.0.tar.gz && \
|
||||||
echo "2fe4762abccd564a0738d5d502f57ead273e681e92d50d7fba32d11103174e9a unbound-1.16.1.tar.gz" | sha256sum -c && \
|
echo "c5dd1bdef5d5685b2cedb749158dd152c52d44f65529a34ac15cd88d4b1b3d43 unbound-1.22.0.tar.gz" | sha256sum -c && \
|
||||||
tar -xzf unbound-1.16.1.tar.gz && \
|
tar -xzf unbound-1.22.0.tar.gz && \
|
||||||
rm unbound-1.16.1.tar.gz && \
|
rm unbound-1.22.0.tar.gz && \
|
||||||
cd unbound-1.16.1 && \
|
cd unbound-1.22.0 && \
|
||||||
./configure --disable-shared --enable-static --without-pyunbound --with-libexpat=/usr --with-ssl=/usr --with-libevent=no --without-pythonmodule --disable-flto --with-pthreads --with-libunbound-only --with-pic && \
|
./configure --disable-shared --enable-static --without-pyunbound --with-libexpat=/usr --with-ssl=/usr --with-libevent=no --without-pythonmodule --disable-flto --with-pthreads --with-libunbound-only --with-pic && \
|
||||||
make -j${NPROC:-$(nproc)} && \
|
make -j${NPROC:-$(nproc)} && \
|
||||||
make -j${NPROC:-$(nproc)} install
|
make -j${NPROC:-$(nproc)} install
|
||||||
|
|
|
@ -58,6 +58,7 @@ target_link_libraries(monero-lws-daemon-common
|
||||||
${Boost_THREAD_LIBS_INIT}
|
${Boost_THREAD_LIBS_INIT}
|
||||||
${EXTRA_LIBRARIES}
|
${EXTRA_LIBRARIES}
|
||||||
${ZMQ_LIB}
|
${ZMQ_LIB}
|
||||||
|
${SODIUM_LIBRARY}
|
||||||
Threads::Threads
|
Threads::Threads
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue