Skip to content

Commit 5d0aff5

Browse files
committed
Merge branch 'standalone_argp' into ci_alpine
2 parents 6586dee + 9a1f072 commit 5d0aff5

File tree

2 files changed

+40
-5
lines changed

2 files changed

+40
-5
lines changed

CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ endif()
4949
pkg_check_modules(SODIUM REQUIRED libsodium)
5050
find_package(Threads REQUIRED)
5151

52+
include(CheckFunctionExists)
5253
include(CheckLibraryExists)
5354
include(CMakePushCheckState)
5455
cmake_push_check_state(RESET)
@@ -60,6 +61,15 @@ if(LIBM)
6061
list(APPEND POW_LIBS "m")
6162
endif()
6263

64+
set(ARGP_LIBS "")
65+
check_function_exists(argp_parse HAVE_ARGP_PARSE)
66+
if(NOT HAVE_ARGP_PARSE)
67+
check_library_exists(argp argp_parse "" ARGP)
68+
if(ARGP)
69+
list(APPEND ARGP_LIBS "argp")
70+
endif()
71+
endif()
72+
6373
cmake_pop_check_state()
6474

6575
add_custom_target(generate_git_version
@@ -95,6 +105,7 @@ target_link_libraries(datum_gateway
95105
PUBLIC
96106
${POW_LIBS}
97107
Threads::Threads
108+
${ARGP_LIBS}
98109
${CURL_LIBRARIES} ${CURL_LDFLAGS} ${CURL_LDFLAGS_OTHER}
99110
${JANSSON_LIBRARIES} ${JANSSON_LDFLAGS} ${JANSSON_LDFLAGS_OTHER}
100111
${SODIUM_LIBRARIES} ${SODIUM_LDFLAGS} ${SODIUM_LDFLAGS_OTHER}

README.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,39 @@ Install and fully sync your Bitcoin full node. Instructions for this are beyond
8282

8383
Configure your node to create block templates as you desire. Be sure to reserve some space for the generation transaction, otherwise your work will not be able to fit a reward split. See node configuration recommendations above.
8484

85-
Install the required libraries and development packages for dependencies: cmake, pkg-config, jansson, libmicrohttpd, libsodium, and libcurl.
85+
Install the required libraries and development packages for dependencies: cmake, pkgconf, libcurl, jansson, libsodium, and libmicrohttpd. You may also need psmisc for your node to send blocknotify signals to the DATUM Gateway.
8686

87-
For Debian/Ubuntu it would be:
87+
For Debian/Ubuntu:
8888

89-
sudo apt install cmake pkgconf libcurl4-openssl-dev libjansson-dev libmicrohttpd-dev libsodium-dev psmisc
89+
sudo apt install cmake pkgconf libcurl4-openssl-dev libjansson-dev libsodium-dev libmicrohttpd-dev psmisc
9090

91-
For RedHat/Fedora it would be:
91+
For Fedora/Amazon Linux:
9292

93-
sudo dnf install cmake pkgconf libcurl-devel jansson-devel libmicrohttpd-devel libsodium-devel psmisc
93+
sudo dnf install cmake pkgconf libcurl-devel jansson-devel libsodium-devel libmicrohttpd-devel psmisc
94+
95+
For Alma Linux:
96+
97+
sudo dnf install epel-release dnf-plugins-core
98+
sudo dnf config-manager --set-enabled crb
99+
sudo dnf install cmake pkgconf libcurl-devel jansson-devel libsodium-devel libmicrohttpd-devel psmisc
100+
101+
For Oracle Linux:
102+
103+
sudo dnf install epel-release dnf-plugins-core
104+
sudo dnf config-manager --set-enabled ol9_codeready_builder
105+
sudo dnf install cmake pkgconf libcurl-devel jansson-devel libsodium-devel libmicrohttpd-devel psmisc
106+
107+
For Alpine (also needs a standalone argp library):
108+
109+
sudo apk add build-base cmake pkgconf argp-standalone curl-dev jansson-dev libsodium-dev libmicrohttpd-dev psmisc
110+
111+
For Arch:
112+
113+
sudo pacman -Syu base-devel cmake pkgconf curl jansson libsodium libmicrohttpd psmisc
114+
115+
For Clear Linux:
116+
117+
sudo swupd bundle-add c-basic cmake pkgconf devpkg-curl devpkg-jansson devpkg-libsodium devpkg-libmicrohttpd psmisc
94118

95119
Compile DATUM by running:
96120

0 commit comments

Comments
 (0)