2020-06-16 14:16:45 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# netopeer2
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2021-11-25 13:56:03 +01:00
|
|
|
NETOPEER2_VERSION = 2.0.35
|
2020-06-16 14:16:45 +02:00
|
|
|
NETOPEER2_SITE = $(call github,CESNET,Netopeer2,v$(NETOPEER2_VERSION))
|
|
|
|
NETOPEER2_DL_SUBDIR = netopeer2
|
|
|
|
NETOPEER2_LICENSE = BSD-3-Clause
|
|
|
|
NETOPEER2_LICENSE_FILES = LICENSE
|
2021-02-06 11:57:37 +01:00
|
|
|
NETOPEER2_DEPENDENCIES = libnetconf2 libyang sysrepo host-sysrepo
|
2020-06-16 14:16:45 +02:00
|
|
|
|
2022-01-25 22:08:00 +01:00
|
|
|
NETOPEER2_CONF_OPTS = \
|
|
|
|
-DBUILD_CLI=$(if $(BR2_PACKAGE_NETOPEER2_CLI),ON,OFF) \
|
|
|
|
-DENABLE_TESTS=OFF
|
2020-06-16 14:16:45 +02:00
|
|
|
|
2021-02-06 11:57:35 +01:00
|
|
|
# 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)
|
2021-02-06 11:57:37 +01:00
|
|
|
|
2020-06-16 14:16:45 +02:00
|
|
|
define NETOPEER2_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -m 755 -D package/netopeer2/S52netopeer2 \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S52netopeer2
|
|
|
|
endef
|
|
|
|
|
2021-02-06 11:57:35 +01:00
|
|
|
# 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
|
|
|
|
|
2020-06-16 14:16:45 +02:00
|
|
|
$(eval $(cmake-package))
|