# # Copyright (C) 2020-2023 IOPSYS Software Solutions AB # include $(TOPDIR)/rules.mk PKG_NAME:=hostmngr PKG_VERSION:=1.1.6 LOCAL_DEV=0 ifneq ($(LOCAL_DEV),1) PKG_SOURCE_PROTO:=git PKG_SOURCE_VERSION:=873d0372a744137bca1150db42998cd355e865a7 PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/hostmngr.git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz PKG_MIRROR_HASH:=skip endif PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_MAINTAINER:=Anjan Chanda PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE include $(INCLUDE_DIR)/package.mk define Package/hostmngr SECTION:=utils CATEGORY:=Utilities TITLE:=Show and manage hosts in the network DEPENDS= +libubox +libuci +libubus +ubus +libeasy +libnl-genl \ +libjson-c +libblobmsg-json +libnfnetlink +libmnl \ +libnetfilter-conntrack \ +HOSTMNGR_PLATFORM_HAS_WIFI:libwifi +libbbfdm-api \ +libwifiutils endef define Package/hostmngr/config source "$(SOURCE)/Config.in" endef define Package/hostmngr/description This package provides hostmngr that can detect and show host devices present in the network. endef TARGET_CFLAGS += \ -I$(STAGING_DIR)/usr/include \ -I$(STAGING_DIR)/usr/include/libnl3 \ -I$(STAGING_DIR)/usr/include/libnetfilter_conntrack \ -D_GNU_SOURCE ifeq ($(CONFIG_HOSTMNGR_PLATFORM_HAS_WIFI),y) TARGET_CFLAGS += -DHAS_WIFI endif MAKE_PATH:=src define Package/hostmngr/install $(CP) ./files/* $(1)/ $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/etc/hostmngr/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/hostmngr $(1)/usr/sbin/ $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/bbf_plugin/libhostmngr.so $(1)/etc/hostmngr/ $(INSTALL_DATA) ./files/etc/hostmngr/input.json $(1)/etc/hostmngr/ $(INSTALL_DIR) $(1)/usr/share/hostmngr $(INSTALL_DATA) ./files/scripts/hosts_acl.sh $(1)/usr/share/hostmngr/ endef ifeq ($(LOCAL_DEV),1) define Build/Prepare rsync -r --exclude=.* ~/git/hostmngr/ $(PKG_BUILD_DIR)/ endef endif $(eval $(call BuildPackage,hostmngr))