p11-kit: Update to 0.23.16.1
[feed/packages.git] / net / netifyd / Makefile
1 #
2 # Copyright (C) 2016-2019 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+
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:=2019-01-03
20 PKG_SOURCE_VERSION:=v2.87
21 #PKG_SOURCE_VERSION:=e846598bbe26eb6d631f1eda922c7141245f48e3
22 PKG_MIRROR_HASH:=05af5b4e48ccfccf60cfb3c0b08c8bb3987d8957f17723520da4488798a7b68d
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:=+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.
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 endef
49
50 TARGET_CFLAGS+=-ffunction-sections -fdata-sections
51 TARGET_CXXFLAGS+=-ffunction-sections -fdata-sections
52 TARGET_LDFLAGS+=-Wl,--gc-sections
53
54 CONFIGURE_ARGS+= \
55 --sharedstatedir=/var/run \
56 --enable-lean-and-mean \
57 --disable-ncurses \
58 --disable-libtcmalloc \
59 --without-systemdsystemunitdir \
60 --without-tmpfilesdir
61
62 # Disable configuration file-watch support (deprecated feature).
63 # Not to be confused with kernel/system-level inotify support.
64 CONFIGURE_ARGS+= \
65 --disable-inotify
66
67 ifneq ($(CONFIG_LIBCURL_ZLIB),y)
68 CONFIGURE_ARGS+= \
69 --without-libcurl-zlib
70 endif
71
72 define Build/Configure
73 (cd $(PKG_BUILD_DIR); ./autogen.sh)
74 $(call Build/Configure/Default,$(CONFIGURE_ARGS))
75 endef
76
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/
84 endef
85
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
99 endef
100
101 $(eval $(call BuildPackage,netifyd))