mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
71 lines
1.8 KiB
Makefile
71 lines
1.8 KiB
Makefile
#
|
|
# Copyright (C) 2020-22 IOPSYS Software Solutions AB
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
include $(INCLUDE_DIR)/kernel.mk
|
|
|
|
PKG_NAME:=map-topology
|
|
PKG_VERSION:=2.5.2.1
|
|
|
|
LOCAL_DEV:=0
|
|
ifneq ($(LOCAL_DEV),1)
|
|
PKG_SOURCE_VERSION:=914f1ead2e65c1e24ed2d8786aa883730db2208f
|
|
PKG_SOURCE_PROTO:=git
|
|
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/map-topology.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_BUILD_DEPENDS:=ieee1905
|
|
|
|
PKG_LICENSE:=BSD-3-Clause
|
|
PKG_LICENSE_FILES:=LICENSE
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/map-topology
|
|
CATEGORY:=Utilities
|
|
DEPENDS:=+libubox +ubus +libpthread +libuci +libeasy \
|
|
+libavahi-nodbus-support +libnetfilter-conntrack +libnfnetlink +libmnl
|
|
TITLE:=Utility to build topology of a multi-AP network
|
|
endef
|
|
|
|
define Package/map-topology/config
|
|
source "$(SOURCE)/Config.in"
|
|
endef
|
|
|
|
TARGET_CFLAGS += \
|
|
-Wno-error=deprecated-declarations \
|
|
-I$(STAGING_DIR)/usr/include \
|
|
-I$(STAGING_DIR)/usr/include/libnl3 \
|
|
-I$(STAGING_DIR)/usr/include/libnetfilter_conntrack \
|
|
-D_GNU_SOURCE
|
|
|
|
define Package/map-topology/description
|
|
Constructs network topology and show it as json structure over UBUS
|
|
endef
|
|
|
|
MAKE_PATH:=src
|
|
|
|
ifeq ($(CONFIG_TOPOLOGYD_EASYMESH_VENDOR_EXT),y)
|
|
TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT_OUI=$(CONFIG_TOPOLOGYD_EASYMESH_VENDOR_EXT_OUI)
|
|
endif
|
|
|
|
ifeq ($(CONFIG_TOPOLOGYD_HOST_WAN_STATS),y)
|
|
TARGET_CFLAGS += -DHOST_WAN_STATS
|
|
endif
|
|
|
|
ifeq ($(LOCAL_DEV),1)
|
|
define Build/Prepare
|
|
$(CP) -rf ~/git/map-topology/* $(PKG_BUILD_DIR)/
|
|
endef
|
|
endif
|
|
|
|
define Package/map-topology/install
|
|
$(CP) ./files/* $(1)/
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/topologyd $(1)/usr/sbin/
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,map-topology))
|