2 # Copyright (C) 2016-2022 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
>
11 PKG_LICENSE
:=GPL-3.0
-or-later
18 PKG_SOURCE_URL
:=https
://gitlab.com
/netify.ai
/public
/netify-agent.git
19 PKG_SOURCE_DATE
:=2022-11-03
20 PKG_SOURCE_VERSION
:=v4.2
.2
21 #PKG_SOURCE_VERSION:=e8d649e170ad3f85017115ea5414ade5f297e9c5
22 PKG_MIRROR_HASH
:=34a9f89aa88f666e6f9e6e8fcbfaa94b02cfc4ce6e76c521377af9492d12a90d
24 include $(INCLUDE_DIR
)/package.mk
26 define Package
/netifyd
30 URL
:=http
://www.netify.ai
/
31 DEPENDS
:=+ca-bundle
+libcurl
+libmnl
+libnetfilter-conntrack
+libpcap
+zlib
+libpthread @
!USE_UCLIBC
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
49 /etc
/netify.d
/agent.uuid
50 /etc
/netify.d
/serial.uuid
51 /etc
/netify.d
/site.uuid
52 /etc
/netify.d
/netify-categories.json
55 TARGET_CFLAGS
+=-ffunction-sections
-fdata-sections
-Wno-psabi
56 TARGET_CXXFLAGS
+=-ffunction-sections
-fdata-sections
-Wno-psabi
57 TARGET_LDFLAGS
+=-Wl
,--gc-sections
60 --sharedstatedir
=/var
/run \
61 --enable-lean-and-mean \
62 --disable-libtcmalloc \
64 --without-systemdsystemunitdir \
67 # Disable configuration file-watch support (deprecated feature).
68 # Not to be confused with kernel/system-level inotify support.
72 ifneq ($(CONFIG_LIBCURL_ZLIB
),y
)
74 --without-libcurl-zlib
77 define Build
/Configure
78 (cd
$(PKG_BUILD_DIR
); .
/autogen.sh
)
79 $(call Build
/Configure
/Default
)
82 define Build
/InstallDev
83 $(INSTALL_DIR
) $(1)/usr
/include/netifyd
84 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/netifyd
/*.h
$(1)/usr
/include/netifyd
85 $(INSTALL_DIR
) $(1)/usr
/include/netifyd
/pcap-compat
86 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/netifyd
/pcap-compat
/*.h
$(1)/usr
/include/netifyd
/pcap-compat
87 $(INSTALL_DIR
) $(1)/usr
/include/netifyd
/nlohmann
88 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/netifyd
/nlohmann
/*.hpp
$(1)/usr
/include/netifyd
/nlohmann
89 $(INSTALL_DIR
) $(1)/usr
/include/ndpi
90 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/ndpi
/*.h
$(1)/usr
/include/ndpi
91 $(INSTALL_DIR
) $(1)/usr
/lib
92 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libnetifyd.
{a
,so
*} $(1)/usr
/lib
93 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
94 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libnetifyd.
pc $(1)/usr
/lib
/pkgconfig
97 define Package
/netifyd
/install
98 $(INSTALL_DIR
) $(1)/etc
99 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/deploy
/netifyd.conf
$(1)/etc
100 $(INSTALL_DIR
) $(1)/etc
/config
101 $(INSTALL_CONF
) .
/files
/netifyd.config
$(1)/etc
/config
/netifyd
102 $(INSTALL_DIR
) $(1)/etc
/init.d
103 $(INSTALL_BIN
) .
/files
/netifyd.init
$(1)/etc
/init.d
/netifyd
104 $(INSTALL_DIR
) $(1)/usr
/sbin
105 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/netifyd
$(1)/usr
/sbin
106 $(INSTALL_DIR
) $(1)/usr
/lib
107 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libnetifyd.so.
* $(1)/usr
/lib
108 $(INSTALL_DIR
) $(1)/etc
/netify.d
109 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/deploy
/netify-apps.conf
$(1)/etc
/netify.d
110 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/deploy
/netify-categories.json
$(1)/etc
/netify.d
111 $(INSTALL_DIR
) $(1)/usr
/share
/netifyd
112 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/deploy
/functions.sh
$(1)/usr
/share
/netifyd
115 $(eval
$(call BuildPackage
,netifyd
))