loop-detector package

This commit is contained in:
Sukru Senli 2017-11-01 13:58:19 +01:00
parent bd6352dfcb
commit 509d9dfca8

46
loop-detector/Makefile Normal file
View file

@ -0,0 +1,46 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=loop-detector
PKG_VERSION:=1.0
PKG_SOURCE_VERSION:=2e8584ae8a6d2e089f7a6db7628b218792a35c99
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=http://public.inteno.se:/loop-detector
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/loop-detector
SECTION:=utils
CATEGORY:=Utilities
TITLE:=L2 Loop detector
DEPENDS:= +libpcap +libuci +libpthread
endef
define Package/loop-detector/description
L2 Loop detection package
endef
TARGET_CFLAGS += \
-D_GNU_SOURCE
TARGET_LDFLAGS += \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
CONFIGURE_ARGS += \
--with-uci-include-path=$(STAGING_DIR)/usr/include \
--with-libubox-include-path=$(STAGING_DIR)/usr/include \
--with-libubus-include-path=$(STAGING_DIR)/usr/include
define Package/loop-detector/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/loop-detector $(1)/sbin/
#$(INSTALL_DIR) $(1)/etc/config
#$(CP) $(PKG_BUILD_DIR)/config/loopDetect $(1)/etc/config
endef
$(eval $(call BuildPackage,loop-detector))