You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
3.4 KiB

  1. #
  2. # Copyright (C) 2016-2020 eGloo, Incorporated
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=netifyd
  7. PKG_RELEASE:=1
  8. PKG_MAINTAINER:=Darryl Sokoloski <darryl@egloo.ca>
  9. PKG_LICENSE:=GPL-3.0-or-later
  10. PKG_BUILD_PARALLEL:=1
  11. PKG_FIXUP:=autoreconf
  12. PKG_INSTALL:=1
  13. PKG_SOURCE_PROTO:=git
  14. PKG_SOURCE_URL:=https://gitlab.com/netify.ai/public/netify-agent.git
  15. PKG_SOURCE_DATE:=2020-04-29
  16. PKG_SOURCE_VERSION:=v3.00
  17. #PKG_SOURCE_VERSION:=6f739939e19d8713edc99c2c601df3d5ba7a0d2e
  18. PKG_MIRROR_HASH:=c9a3da698e5014eeff8e6b4089d09c2a98a2e2e4dce15b7d4e3df6dd0379fcb4
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/netifyd
  21. SECTION:=net
  22. CATEGORY:=Network
  23. TITLE:=Netify Agent
  24. URL:=http://www.netify.ai/
  25. DEPENDS:=+ca-bundle +libcurl +libmnl +libnetfilter-conntrack +libpcap +zlib +libpthread @!USE_UCLIBC
  26. # Explicitly depend on libstdcpp rather than $(CXX_DEPENDS). At the moment
  27. # std::unordered_map is only available via libstdcpp which is required for
  28. # performance reasons.
  29. DEPENDS+=+libstdcpp
  30. endef
  31. define Package/netifyd/description
  32. The Netify Agent is a deep-packet inspection server which detects network
  33. protocols and applications. These detections can be saved locally, served over
  34. a UNIX or TCP socket, and/or "pushed" (via HTTP POSTs) to a remote third-party
  35. server. Flow metadata, network statistics, and detection classifications are
  36. JSON encoded for easy consumption by third-party applications.
  37. endef
  38. define Package/netifyd/conffiles
  39. /etc/netifyd.conf
  40. /etc/config/netifyd
  41. /etc/netify.d/agent.uuid
  42. /etc/netify.d/serial.uuid
  43. /etc/netify.d/site.uuid
  44. endef
  45. TARGET_CFLAGS+=-ffunction-sections -fdata-sections -Wno-psabi
  46. TARGET_CXXFLAGS+=-ffunction-sections -fdata-sections -Wno-psabi
  47. TARGET_LDFLAGS+=-Wl,--gc-sections
  48. CONFIGURE_ARGS+= \
  49. --sharedstatedir=/var/run \
  50. --enable-lean-and-mean \
  51. --disable-libtcmalloc \
  52. --without-systemdsystemunitdir \
  53. --without-tmpfilesdir
  54. # Disable configuration file-watch support (deprecated feature).
  55. # Not to be confused with kernel/system-level inotify support.
  56. CONFIGURE_ARGS+= \
  57. --disable-inotify
  58. ifneq ($(CONFIG_LIBCURL_ZLIB),y)
  59. CONFIGURE_ARGS+= \
  60. --without-libcurl-zlib
  61. endif
  62. define Build/Configure
  63. (cd $(PKG_BUILD_DIR); ./autogen.sh)
  64. $(call Build/Configure/Default,$(CONFIGURE_ARGS))
  65. endef
  66. define Build/InstallDev
  67. $(INSTALL_DIR) $(1)/usr/include/netifyd
  68. $(CP) $(PKG_INSTALL_DIR)/usr/include/netifyd/*.h $(1)/usr/include/netifyd
  69. $(INSTALL_DIR) $(1)/usr/lib
  70. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetifyd.{a,so*} $(1)/usr/lib/
  71. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  72. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnetifyd.pc $(1)/usr/lib/pkgconfig/
  73. endef
  74. define Package/netifyd/install
  75. $(INSTALL_DIR) $(1)/etc
  76. $(INSTALL_DATA) $(PKG_BUILD_DIR)/deploy/netifyd.conf $(1)/etc
  77. $(INSTALL_DIR) $(1)/etc/config
  78. $(INSTALL_CONF) ./files/netifyd.config $(1)/etc/config/netifyd
  79. $(INSTALL_DIR) $(1)/etc/init.d
  80. $(INSTALL_BIN) ./files/netifyd.init $(1)/etc/init.d/netifyd
  81. $(INSTALL_DIR) $(1)/usr/sbin
  82. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netifyd $(1)/usr/sbin
  83. $(INSTALL_DIR) $(1)/usr/lib
  84. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetifyd.so.* $(1)/usr/lib/
  85. $(INSTALL_DIR) $(1)/etc/netify.d
  86. $(INSTALL_DATA) $(PKG_BUILD_DIR)/deploy/netify-sink.conf $(1)/etc/netify.d/netify-sink.conf
  87. $(INSTALL_DIR) $(1)/usr/share/netifyd
  88. $(INSTALL_DATA) $(PKG_BUILD_DIR)/deploy/functions.sh $(1)/usr/share/netifyd
  89. endef
  90. $(eval $(call BuildPackage,netifyd))