strongswan: Update to 5.9.9
[feed/packages.git] / net / netifyd / Makefile
1 #
2 # Copyright (C) 2016-2022 eGloo Incorporated
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5
6 include $(TOPDIR)/rules.mk
7
8 PKG_NAME:=netifyd
9 PKG_RELEASE:=1
10 PKG_MAINTAINER:=Darryl Sokoloski <darryl@egloo.ca>
11 PKG_LICENSE:=GPL-3.0-or-later
12
13 PKG_BUILD_PARALLEL:=1
14 PKG_FIXUP:=autoreconf
15 PKG_INSTALL:=1
16
17 PKG_SOURCE_PROTO:=git
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
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/netifyd
27 SECTION:=net
28 CATEGORY:=Network
29 TITLE:=Netify Agent
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.
35 DEPENDS+=+libstdcpp
36 endef
37
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.
44 endef
45
46 define Package/netifyd/conffiles
47 /etc/netifyd.conf
48 /etc/config/netifyd
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
53 endef
54
55 TARGET_CFLAGS+=-ffunction-sections -fdata-sections -Wno-psabi
56 TARGET_CXXFLAGS+=-ffunction-sections -fdata-sections -Wno-psabi
57 TARGET_LDFLAGS+=-Wl,--gc-sections
58
59 CONFIGURE_ARGS+= \
60 --sharedstatedir=/var/run \
61 --enable-lean-and-mean \
62 --disable-libtcmalloc \
63 --disable-jemalloc \
64 --without-systemdsystemunitdir \
65 --without-tmpfilesdir
66
67 # Disable configuration file-watch support (deprecated feature).
68 # Not to be confused with kernel/system-level inotify support.
69 CONFIGURE_ARGS+= \
70 --disable-inotify
71
72 ifneq ($(CONFIG_LIBCURL_ZLIB),y)
73 CONFIGURE_ARGS+= \
74 --without-libcurl-zlib
75 endif
76
77 define Build/Configure
78 (cd $(PKG_BUILD_DIR); ./autogen.sh)
79 $(call Build/Configure/Default)
80 endef
81
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
95 endef
96
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
113 endef
114
115 $(eval $(call BuildPackage,netifyd))