diff --git a/loop-detector/Makefile b/loop-detector/Makefile new file mode 100644 index 000000000..73637da59 --- /dev/null +++ b/loop-detector/Makefile @@ -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))