iopsys-feed/hostmngr/Makefile
Vivek Kumar Dutta 20e5110ac5
hostmngr: 1.0.12
2023-11-22 12:25:35 +05:30

75 lines
1.9 KiB
Makefile

#
# Copyright (C) 2020-2023 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=hostmngr
PKG_VERSION:=1.0.12
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=77d5b236e8ccba15cd75b4e1dcd0c5ea1d6b9291
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 <anjan.chanda@iopsys.eu>
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
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_DATA) ./files/lib/hosts/hosts_acl.sh $(1)/lib/hosts/
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -r --exclude=.* ~/git/hostmngr/ $(PKG_BUILD_DIR)/
endef
endif
$(eval $(call BuildPackage,hostmngr))