2 # Copyright (C) 2016-2019 eGloo, Incorporated
4 # This is free software, licensed under the GNU General Public License v2.
6 include $(TOPDIR
)/rules.mk
10 PKG_MAINTAINER
:=Darryl Sokoloski
<darryl@egloo.ca
>
18 PKG_SOURCE_URL
:=https
://gitlab.com
/netify.ai
/public
/netify-agent.git
19 PKG_SOURCE_DATE
:=2019-01-03
20 PKG_SOURCE_VERSION
:=v2.87
21 #PKG_SOURCE_VERSION:=e846598bbe26eb6d631f1eda922c7141245f48e3
22 PKG_MIRROR_HASH
:=05af5b4e48ccfccf60cfb3c0b08c8bb3987d8957f17723520da4488798a7b68d
24 include $(INCLUDE_DIR
)/package.mk
26 define Package
/netifyd
30 URL
:=http
://www.netify.ai
/
31 DEPENDS
:=+libcurl
+libmnl
+libnetfilter-conntrack
+libjson-c
+libpcap
+zlib
+libpthread
32 # Explicitly depend on libstdcpp rather than $(CXX_DEPENDS). At the moment
33 # std::unordered_map is only available via libstdcpp which is required for
34 # performance reasons.
38 define Package
/netifyd
/description
39 The Netify Agent is a deep-packet inspection server which detects network
40 protocols and applications. These detections can be saved locally
, served over
41 a UNIX or TCP socket
, and
/or
"pushed" (via HTTP POSTs
) to a remote third-party
42 server. Flow metadata
, network statistics
, and detection classifications are
43 JSON encoded for easy consumption by third-party applications.
46 define Package
/netifyd
/conffiles
50 TARGET_CFLAGS
+=-ffunction-sections
-fdata-sections
51 TARGET_CXXFLAGS
+=-ffunction-sections
-fdata-sections
52 TARGET_LDFLAGS
+=-Wl
,--gc-sections
55 --sharedstatedir
=/var
/run \
56 --enable-lean-and-mean \
58 --disable-libtcmalloc \
59 --without-systemdsystemunitdir \
62 # Disable configuration file-watch support (deprecated feature).
63 # Not to be confused with kernel/system-level inotify support.
67 ifneq ($(CONFIG_LIBCURL_ZLIB
),y
)
69 --without-libcurl-zlib
72 define Build
/Configure
73 (cd
$(PKG_BUILD_DIR
); .
/autogen.sh
)
74 $(call Build
/Configure
/Default
,$(CONFIGURE_ARGS
))
77 define Build
/InstallDev
78 $(INSTALL_DIR
) $(1)/usr
/include/netifyd
79 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/netifyd
/*.h
$(1)/usr
/include/netifyd
80 $(INSTALL_DIR
) $(1)/usr
/lib
81 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libnetifyd.
{a
,so
*} $(1)/usr
/lib
/
82 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
83 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libnetifyd.
pc $(1)/usr
/lib
/pkgconfig
/
86 define Package
/netifyd
/install
87 $(INSTALL_DIR
) $(1)/etc
88 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/deploy
/netifyd.conf
$(1)/etc
89 $(INSTALL_DIR
) $(1)/etc
/init.d
90 $(INSTALL_BIN
) .
/files
/netifyd.init
$(1)/etc
/init.d
/netifyd
91 $(INSTALL_DIR
) $(1)/usr
/sbin
92 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/netifyd
$(1)/usr
/sbin
93 $(INSTALL_DIR
) $(1)/usr
/lib
94 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libnetifyd.so.
* $(1)/usr
/lib
/
95 $(INSTALL_DIR
) $(1)/etc
/netify.d
96 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/deploy
/netify-sink.conf
$(1)/etc
/netify.d
/netify-sink.conf
97 $(INSTALL_DIR
) $(1)/usr
/share
/netifyd
98 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/deploy
/functions.sh
$(1)/usr
/share
/netifyd
101 $(eval
$(call BuildPackage
,netifyd
))