C implementation of the Raft consensus protocol
| runtime dependencies | libuv (Libraries/other) |
|---|---|
| make dependencies | libuv1-dev |
mkdir /data/buildroot/package/raft
cat > /data/buildroot/package/raft/Config.in<< 'EOF'
config BR2_PACKAGE_RAFT
bool "raft"
depends on BR2_PACKAGE_LIBUV
help
C implementation of the Raft consensus protocol
EOF
cat > /data/buildroot/package/raft/raft.mk<< 'EOF'
#############################################################
#
# raft
#https://github.com/canonical/raft/archive/v0.11.3.tar.gz
#############################################################
RAFT_VERSION = 0.11.3
RAFT_SOURCE = v$(RAFT_VERSION).tar.gz
RAFT_SITE = https://github.com/canonical
RAFT_DEPENDENCIES = libuv
RAFT_BIN_ARCH_EXCLUDE = /usr/lib
define RAFT_BUILD_CMDS
cd $(@D)/ && \
autoreconf -i && \
./configure --prefix=/usr &&\
make
endef
define RAFT_INSTALL_TARGET_CMDS
cd $(@D)/ && \
make DESTDIR="$(TARGET_DIR)/" install
install -Dm644 $(@D)/LICENSE "$(TARGET_DIR)/usr/share/licenses/raft/LICENSE"
endef
$(eval $(generic-package))
EOF
sed -i '/menu "Custom packages"/a source "package/raft/Config.in"' /data/buildroot/package/Config.in