mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
74 lines
1.8 KiB
Makefile
74 lines
1.8 KiB
Makefile
#
|
|
# Copyright (C) 2020-2023 IOPSYS Software Solutions AB
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=hostmngr
|
|
PKG_VERSION:=1.0.3
|
|
|
|
LOCAL_DEV=0
|
|
ifneq ($(LOCAL_DEV),1)
|
|
PKG_SOURCE_PROTO:=git
|
|
PKG_SOURCE_VERSION:=bfb9098121d665a324c86a2a9ee0971871d6c22e
|
|
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/
|
|
endef
|
|
|
|
ifeq ($(LOCAL_DEV),1)
|
|
define Build/Prepare
|
|
rsync -r --exclude=.* ~/git/hostmngr/ $(PKG_BUILD_DIR)/
|
|
endef
|
|
endif
|
|
|
|
$(eval $(call BuildPackage,hostmngr))
|