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
16 PKG_BUILD_FLAGS
:=gc-sections
19 PKG_SOURCE_URL
:=https
://gitlab.com
/netify.ai
/public
/netify-agent.git
20 PKG_SOURCE_DATE
:=2023-03-03
21 PKG_SOURCE_VERSION
:=v4.4
.1
22 PKG_MIRROR_HASH
:=aa3522b6d86e113943abacd50b235738e6452991a36864ec70f5db5b7bec6d13
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
54 TARGET_CFLAGS
+=-Wno-psabi
55 TARGET_CXXFLAGS
+=-std
=c
++11 -Wno-psabi
58 --sharedstatedir
=/var
/run \
59 --enable-lean-and-mean \
60 --disable-libtcmalloc \
62 --without-systemdsystemunitdir \
65 # Disable configuration file-watch support (deprecated feature).
66 # Not to be confused with kernel/system-level inotify support.
70 ifneq ($(CONFIG_LIBCURL_ZLIB
),y
)
72 --without-libcurl-zlib
76 define Build
/InstallDev
77 $(INSTALL_DIR
) $(1)/usr
/include/netifyd
78 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/netifyd
/*.h
$(1)/usr
/include/netifyd
79 $(INSTALL_DIR
) $(1)/usr
/include/netifyd
/pcap-compat
80 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/netifyd
/pcap-compat
/*.h
$(1)/usr
/include/netifyd
/pcap-compat
81 $(INSTALL_DIR
) $(1)/usr
/include/netifyd
/nlohmann
82 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/netifyd
/nlohmann
/*.hpp
$(1)/usr
/include/netifyd
/nlohmann
83 $(INSTALL_DIR
) $(1)/usr
/include/netifyd
/radix
84 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/netifyd
/radix
/*.hpp
$(1)/usr
/include/netifyd
/radix
85 $(INSTALL_DIR
) $(1)/usr
/include/ndpi
86 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/ndpi
/*.h
$(1)/usr
/include/ndpi
87 $(INSTALL_DIR
) $(1)/usr
/lib
88 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libnetifyd.
{a
,so
*} $(1)/usr
/lib
89 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
90 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libnetifyd.
pc $(1)/usr
/lib
/pkgconfig
93 define Package
/netifyd
/install
94 $(INSTALL_DIR
) $(1)/etc
95 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/deploy
/netifyd.conf
$(1)/etc
96 $(INSTALL_DIR
) $(1)/etc
/config
97 $(INSTALL_CONF
) .
/files
/netifyd.config
$(1)/etc
/config
/netifyd
98 $(INSTALL_DIR
) $(1)/etc
/init.d
99 $(INSTALL_BIN
) .
/files
/netifyd.init
$(1)/etc
/init.d
/netifyd
100 $(INSTALL_DIR
) $(1)/usr
/sbin
101 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/netifyd
$(1)/usr
/sbin
102 $(INSTALL_DIR
) $(1)/usr
/lib
103 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libnetifyd.so.
* $(1)/usr
/lib
104 $(INSTALL_DIR
) $(1)/etc
/netify.d
105 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/deploy
/netify-apps.conf
$(1)/etc
/netify.d
106 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/deploy
/netify-categories.json
$(1)/etc
/netify.d
107 $(INSTALL_DIR
) $(1)/usr
/share
/netifyd
108 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/deploy
/functions.sh
$(1)/usr
/share
/netifyd
111 $(eval
$(call BuildPackage
,netifyd
))