initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
comment "netopeer2 needs a toolchain w/ gcc >= 4.8, C++, threads, dynamic library"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP \
|
||||
|| !BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
|
||||
|
||||
config BR2_PACKAGE_NETOPEER2
|
||||
bool "netopeer2"
|
||||
depends on BR2_USE_MMU # libnetconf2, libssh, sysrepo
|
||||
depends on !BR2_STATIC_LIBS # libnetconf2, libssh, libyang, sysrepo
|
||||
depends on BR2_INSTALL_LIBSTDCPP # sysrepo
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # sysrepo
|
||||
select BR2_PACKAGE_LIBNETCONF2
|
||||
select BR2_PACKAGE_LIBSSH
|
||||
select BR2_PACKAGE_LIBSSH_SERVER # For libnetconf2 to have SSH
|
||||
select BR2_PACKAGE_LIBYANG
|
||||
select BR2_PACKAGE_OPENSSL # For libnetconf2 to have TLS
|
||||
select BR2_PACKAGE_SYSREPO
|
||||
help
|
||||
Netopeer2 is a set of tools implementing network configuration
|
||||
tools based on the NETCONF Protocol.
|
||||
|
||||
This is the server part.
|
||||
|
||||
https://github.com/CESNET/Netopeer2
|
||||
|
||||
if BR2_PACKAGE_NETOPEER2
|
||||
|
||||
config BR2_PACKAGE_NETOPEER2_CLI
|
||||
bool "cli"
|
||||
help
|
||||
Enable netopeer2 CLI.
|
||||
|
||||
endif
|
||||
@@ -0,0 +1,50 @@
|
||||
#!/bin/sh
|
||||
|
||||
DAEMON="netopeer2-server"
|
||||
PIDFILE="/var/run/$DAEMON.pid"
|
||||
|
||||
NETOPEER2_SERVER_ARGS=""
|
||||
|
||||
start() {
|
||||
printf 'Starting %s: ' "$DAEMON"
|
||||
|
||||
start-stop-daemon -S -b -q -p $PIDFILE -x "/usr/bin/$DAEMON" \
|
||||
-- $NETOPEER2_SERVER_ARGS
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf 'Stopping %s: ' "$DAEMON"
|
||||
start-stop-daemon -K -q -p $PIDFILE
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
}
|
||||
|
||||
reload() {
|
||||
# we do not support real reload .. just restart
|
||||
restart
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start|stop|restart|reload)
|
||||
"$1";;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload}"
|
||||
esac
|
||||
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 7fc1a3520ee4bb488112f502e34cea465464dc933d2a5742a72eb32a6dfe3b3f netopeer2-1.1.70.tar.gz
|
||||
sha256 b46f161fbdcf127d3ef22602e15958c3092fe3294f71a2dc8cdf8f6689cba95b LICENSE
|
||||
@@ -0,0 +1,40 @@
|
||||
################################################################################
|
||||
#
|
||||
# netopeer2
|
||||
#
|
||||
################################################################################
|
||||
|
||||
NETOPEER2_VERSION = 1.1.70
|
||||
NETOPEER2_SITE = $(call github,CESNET,Netopeer2,v$(NETOPEER2_VERSION))
|
||||
NETOPEER2_DL_SUBDIR = netopeer2
|
||||
NETOPEER2_LICENSE = BSD-3-Clause
|
||||
NETOPEER2_LICENSE_FILES = LICENSE
|
||||
NETOPEER2_DEPENDENCIES = libnetconf2 libyang sysrepo host-sysrepo
|
||||
|
||||
NETOPEER2_CONF_OPTS = -DBUILD_CLI=$(if $(BR2_PACKAGE_NETOPEER2_CLI),ON,OFF)
|
||||
|
||||
# Set a build specific SYSREPO_SHM_PREFIX to ensure we can safely delete the
|
||||
# files. This also ensures that concurrent parallel builds will not be
|
||||
# affected mutualy.
|
||||
NETOPEER2_SYSREPO_SHM_PREFIX = sr_buildroot$(subst /,_,$(CONFIG_DIR))_netopeer2
|
||||
|
||||
NETOPEER2_MAKE_ENV = \
|
||||
SYSREPOCTL_EXECUTABLE=$(HOST_DIR)/bin/sysrepoctl \
|
||||
SYSREPO_SHM_PREFIX=$(NETOPEER2_SYSREPO_SHM_PREFIX)
|
||||
|
||||
define NETOPEER2_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -m 755 -D package/netopeer2/S52netopeer2 \
|
||||
$(TARGET_DIR)/etc/init.d/S52netopeer2
|
||||
endef
|
||||
|
||||
# The host sysrepo used to install the netopeer2 modules will leave
|
||||
# its shared memory files lingering about. Clean up in its stead...
|
||||
# We need to clean up both before and after installation, to catch
|
||||
# the case of a previous build that failed before we run that hook.
|
||||
define NETOPEER2_CLEANUP
|
||||
rm -f /dev/shm/$(NETOPEER2_SYSREPO_SHM_PREFIX)*
|
||||
endef
|
||||
NETOPEER2_PRE_INSTALL_TARGET_HOOKS += NETOPEER2_CLEANUP
|
||||
NETOPEER2_POST_INSTALL_TARGET_HOOKS += NETOPEER2_CLEANUP
|
||||
|
||||
$(eval $(cmake-package))
|
||||
Reference in New Issue
Block a user