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-08-10
21 PKG_SOURCE_VERSION
:=v4.4
.7
22 PKG_MIRROR_HASH
:=389fb77e4d6920e94ab9c6febd0049ecd3a34c6b073f3dfb7f204775f3389f07
24 PKG_CONFIG_DEPENDS
:= \
25 CONFIG_NETIFYD_BUILD_SHARED_LIBRARY \
26 CONFIG_NETIFYD_WITH_LOCAL_LIBGCRYPT
28 include $(INCLUDE_DIR
)/package.mk
30 define Package
/netifyd
34 URL
:=http
://www.netify.ai
/
35 DEPENDS
:=+ca-bundle
+libatomic
+libcurl
+libmnl
+libnetfilter-conntrack
+libpcap
+zlib
+libpthread @
!USE_UCLIBC
36 # Explicitly depend on libstdcpp rather than $(CXX_DEPENDS). At the moment
37 # std::unordered_map is only available via libstdcpp which is required for
38 # performance reasons.
40 DEPENDS
+=+NETIFYD_WITH_LOCAL_LIBGCRYPT
:libgcrypt
43 define Package
/netifyd
/description
44 The Netify Agent is a deep-packet inspection server which detects network
45 protocols and applications. These detections can be saved locally
, served over
46 a UNIX or TCP socket
, and
/or
"pushed" (via HTTP POSTs
) to a remote third-party
47 server. Flow metadata
, network statistics
, and detection classifications are
48 JSON encoded for easy consumption by third-party applications.
51 define Package
/netifyd
/config
52 source
"$(SOURCE)/Config.in"
55 define Package
/netifyd
/conffiles
58 /etc
/netify.d
/agent.uuid
59 /etc
/netify.d
/serial.uuid
60 /etc
/netify.d
/site.uuid
63 TARGET_CFLAGS
+=-Wno-psabi
64 TARGET_CXXFLAGS
+=-std
=c
++11 -Wno-psabi
67 $(if
$(CONFIG_NETIFYD_BUILD_SHARED_LIBRARY
),--enable-shared
,--disable-shared
) \
68 $(if
$(CONFIG_NETIFYD_WITH_LOCAL_LIBGCRYPT
),--with-local-libgcrypt
,--without-local-libgcrypt
) \
69 --sharedstatedir
=/var
/run \
70 --enable-lean-and-mean \
71 --disable-libtcmalloc \
73 --without-systemdsystemunitdir \
76 # Disable configuration file-watch support (deprecated feature).
77 # Not to be confused with kernel/system-level inotify support.
81 ifneq ($(CONFIG_LIBCURL_ZLIB
),y
)
83 --without-libcurl-zlib
86 define Build
/InstallDev
87 $(INSTALL_DIR
) $(1)/usr
/include/netifyd
88 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/netifyd
/*.h
$(1)/usr
/include/netifyd
89 $(INSTALL_DIR
) $(1)/usr
/include/netifyd
/pcap-compat
90 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/netifyd
/pcap-compat
/*.h
$(1)/usr
/include/netifyd
/pcap-compat
91 $(INSTALL_DIR
) $(1)/usr
/include/netifyd
/nlohmann
92 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/netifyd
/nlohmann
/*.hpp
$(1)/usr
/include/netifyd
/nlohmann
93 $(INSTALL_DIR
) $(1)/usr
/include/netifyd
/radix
94 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/netifyd
/radix
/*.hpp
$(1)/usr
/include/netifyd
/radix
95 $(INSTALL_DIR
) $(1)/usr
/include/ndpi
96 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/ndpi
/*.h
$(1)/usr
/include/ndpi
97 $(INSTALL_DIR
) $(1)/usr
/lib
98 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libnetifyd.a
$(1)/usr
/lib
99 $(if
$(CONFIG_NETIFYD_BUILD_SHARED_LIBRARY
),$(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libnetifyd.so.
* $(1)/usr
/lib
,)
100 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
101 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libnetifyd.
pc $(1)/usr
/lib
/pkgconfig
104 define Package
/netifyd
/install
105 $(INSTALL_DIR
) $(1)/etc
106 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/deploy
/netifyd.conf
$(1)/etc
107 $(INSTALL_DIR
) $(1)/etc
/config
108 $(INSTALL_CONF
) .
/files
/netifyd.config
$(1)/etc
/config
/netifyd
109 $(INSTALL_DIR
) $(1)/etc
/init.d
110 $(INSTALL_BIN
) .
/files
/netifyd.init
$(1)/etc
/init.d
/netifyd
111 $(INSTALL_DIR
) $(1)/usr
/sbin
112 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/netifyd
$(1)/usr
/sbin
113 $(INSTALL_DIR
) $(1)/usr
/lib
114 $(if
$(CONFIG_NETIFYD_BUILD_SHARED_LIBRARY
),$(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libnetifyd.so.
* $(1)/usr
/lib
,)
115 $(INSTALL_DIR
) $(1)/etc
/netify.d
116 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/deploy
/netify-apps.conf
$(1)/etc
/netify.d
117 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/deploy
/netify-categories.json
$(1)/etc
/netify.d
118 $(INSTALL_DIR
) $(1)/usr
/share
/netifyd
119 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/deploy
/functions.sh
$(1)/usr
/share
/netifyd
122 $(eval
$(call BuildPackage
,netifyd
))