1################################################################################ 2# 3# netopeer2 4# 5################################################################################ 6 7NETOPEER2_VERSION = 1.1.70 8NETOPEER2_SITE = $(call github,CESNET,Netopeer2,v$(NETOPEER2_VERSION)) 9NETOPEER2_DL_SUBDIR = netopeer2 10NETOPEER2_LICENSE = BSD-3-Clause 11NETOPEER2_LICENSE_FILES = LICENSE 12NETOPEER2_DEPENDENCIES = libnetconf2 libyang sysrepo host-sysrepo 13 14NETOPEER2_CONF_OPTS = -DBUILD_CLI=$(if $(BR2_PACKAGE_NETOPEER2_CLI),ON,OFF) 15 16# Set a build specific SYSREPO_SHM_PREFIX to ensure we can safely delete the 17# files. This also ensures that concurrent parallel builds will not be 18# affected mutualy. 19NETOPEER2_SYSREPO_SHM_PREFIX = sr_buildroot$(subst /,_,$(CONFIG_DIR))_netopeer2 20 21NETOPEER2_MAKE_ENV = \ 22 SYSREPOCTL_EXECUTABLE=$(HOST_DIR)/bin/sysrepoctl \ 23 SYSREPO_SHM_PREFIX=$(NETOPEER2_SYSREPO_SHM_PREFIX) 24 25define NETOPEER2_INSTALL_INIT_SYSV 26 $(INSTALL) -m 755 -D package/netopeer2/S52netopeer2 \ 27 $(TARGET_DIR)/etc/init.d/S52netopeer2 28endef 29 30# The host sysrepo used to install the netopeer2 modules will leave 31# its shared memory files lingering about. Clean up in its stead... 32# We need to clean up both before and after installation, to catch 33# the case of a previous build that failed before we run that hook. 34define NETOPEER2_CLEANUP 35 rm -f /dev/shm/$(NETOPEER2_SYSREPO_SHM_PREFIX)* 36endef 37NETOPEER2_PRE_INSTALL_TARGET_HOOKS += NETOPEER2_CLEANUP 38NETOPEER2_POST_INSTALL_TARGET_HOOKS += NETOPEER2_CLEANUP 39 40$(eval $(cmake-package)) 41