1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-13 19:03:52 +02:00
openwrt-packages/net/netifyd/Makefile
Darryl Sokoloski c92bb340ab Maintainer: Darryl Sokoloski / @dsokoloski
Compile tested: arm_cortex-a15_neon-vfpv4, TP-Link Archer C2600, master
Run tested: TP-Link Archer C2600

Change log for v2.99:

[FIX] Fixed broken JSON parsing (include missing uuid_site).
[FIX] FreeBSD: Fixed 10x support.
[FIX] OPNsense: Fixed path to xmllint.

[IMP] Switched to libtcmalloc minimal.
[IMP] Added metadata extraction from SSDP queries/responses.
[IMP] Added automatic building of bundled gperftools when enabled.
[IMP] Removed bundled packages that are no longer needed.
[IMP] Always display JSON status even when stale.
[IMP] CentOS: Added support for CentOS 8.
[IMP] CentOS: Removed support for CentOS 6.
[IMP] OPNsense: Added support for OPNsense 19x.

Signed-off-by: Darryl Sokoloski <darryl@sokoloski.ca>
2020-01-28 13:26:48 -05:00

101 lines
3.2 KiB
Makefile

#
# Copyright (C) 2016-2020 eGloo, Incorporated
#
# This is free software, licensed under the GNU General Public License v2.
include $(TOPDIR)/rules.mk
PKG_NAME:=netifyd
PKG_RELEASE:=1
PKG_MAINTAINER:=Darryl Sokoloski <darryl@egloo.ca>
PKG_LICENSE:=GPL-3.0-or-later
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.com/netify.ai/public/netify-agent.git
PKG_SOURCE_DATE:=2020-01-28
PKG_SOURCE_VERSION:=v2.99
#PKG_SOURCE_VERSION:=39e4fa272d8a4c83391e1b7d34cd8e071caef317
PKG_MIRROR_HASH:=86106fc526ffcb3631ee306504874491646e7b2baa273b8e7ea8c411f83ac99d
include $(INCLUDE_DIR)/package.mk
define Package/netifyd
SECTION:=net
CATEGORY:=Network
TITLE:=Netify Agent
URL:=http://www.netify.ai/
DEPENDS:=+ca-bundle +libcurl +libmnl +libnetfilter-conntrack +libpcap +zlib +libpthread @!USE_UCLIBC
# Explicitly depend on libstdcpp rather than $(CXX_DEPENDS). At the moment
# std::unordered_map is only available via libstdcpp which is required for
# performance reasons.
DEPENDS+=+libstdcpp
endef
define Package/netifyd/description
The Netify Agent is a deep-packet inspection server which detects network
protocols and applications. These detections can be saved locally, served over
a UNIX or TCP socket, and/or "pushed" (via HTTP POSTs) to a remote third-party
server. Flow metadata, network statistics, and detection classifications are
JSON encoded for easy consumption by third-party applications.
endef
define Package/netifyd/conffiles
/etc/netifyd.conf
endef
TARGET_CFLAGS+=-ffunction-sections -fdata-sections -Wno-psabi
TARGET_CXXFLAGS+=-ffunction-sections -fdata-sections -Wno-psabi
TARGET_LDFLAGS+=-Wl,--gc-sections
CONFIGURE_ARGS+= \
--sharedstatedir=/var/run \
--enable-lean-and-mean \
--disable-libtcmalloc \
--without-systemdsystemunitdir \
--without-tmpfilesdir
# Disable configuration file-watch support (deprecated feature).
# Not to be confused with kernel/system-level inotify support.
CONFIGURE_ARGS+= \
--disable-inotify
ifneq ($(CONFIG_LIBCURL_ZLIB),y)
CONFIGURE_ARGS+= \
--without-libcurl-zlib
endif
define Build/Configure
(cd $(PKG_BUILD_DIR); ./autogen.sh)
$(call Build/Configure/Default,$(CONFIGURE_ARGS))
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/netifyd
$(CP) $(PKG_INSTALL_DIR)/usr/include/netifyd/*.h $(1)/usr/include/netifyd
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetifyd.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnetifyd.pc $(1)/usr/lib/pkgconfig/
endef
define Package/netifyd/install
$(INSTALL_DIR) $(1)/etc
$(INSTALL_DATA) $(PKG_BUILD_DIR)/deploy/netifyd.conf $(1)/etc
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/netifyd.init $(1)/etc/init.d/netifyd
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netifyd $(1)/usr/sbin
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetifyd.so.* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/etc/netify.d
$(INSTALL_DATA) $(PKG_BUILD_DIR)/deploy/netify-sink.conf $(1)/etc/netify.d/netify-sink.conf
$(INSTALL_DIR) $(1)/usr/share/netifyd
$(INSTALL_DATA) $(PKG_BUILD_DIR)/deploy/functions.sh $(1)/usr/share/netifyd
endef
$(eval $(call BuildPackage,netifyd))