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.

100 lines
3.2 KiB

  1. #
  2. # Copyright (C) 2016-2019 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:=2
  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:=2019-08-31
  16. PKG_SOURCE_VERSION:=v2.92
  17. #PKG_SOURCE_VERSION:=cbc5572cde53992b06e5560b6305cbc7d0a8b1c3
  18. PKG_MIRROR_HASH:=99db0e98c3f1529609dfc10fa366217991c79593d185b85e4607528efa723969
  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 +libjson-c +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. endef
  41. TARGET_CFLAGS+=-ffunction-sections -fdata-sections
  42. TARGET_CXXFLAGS+=-ffunction-sections -fdata-sections
  43. TARGET_LDFLAGS+=-Wl,--gc-sections
  44. CONFIGURE_ARGS+= \
  45. --sharedstatedir=/var/run \
  46. --enable-lean-and-mean \
  47. --disable-libtcmalloc \
  48. --without-systemdsystemunitdir \
  49. --without-tmpfilesdir
  50. # Disable configuration file-watch support (deprecated feature).
  51. # Not to be confused with kernel/system-level inotify support.
  52. CONFIGURE_ARGS+= \
  53. --disable-inotify
  54. ifneq ($(CONFIG_LIBCURL_ZLIB),y)
  55. CONFIGURE_ARGS+= \
  56. --without-libcurl-zlib
  57. endif
  58. define Build/Configure
  59. (cd $(PKG_BUILD_DIR); ./autogen.sh)
  60. $(call Build/Configure/Default,$(CONFIGURE_ARGS))
  61. endef
  62. define Build/InstallDev
  63. $(INSTALL_DIR) $(1)/usr/include/netifyd
  64. $(CP) $(PKG_INSTALL_DIR)/usr/include/netifyd/*.h $(1)/usr/include/netifyd
  65. $(INSTALL_DIR) $(1)/usr/lib
  66. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetifyd.{a,so*} $(1)/usr/lib/
  67. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  68. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnetifyd.pc $(1)/usr/lib/pkgconfig/
  69. endef
  70. define Package/netifyd/install
  71. $(INSTALL_DIR) $(1)/etc
  72. $(INSTALL_DATA) $(PKG_BUILD_DIR)/deploy/netifyd.conf $(1)/etc
  73. $(INSTALL_DIR) $(1)/etc/init.d
  74. $(INSTALL_BIN) ./files/netifyd.init $(1)/etc/init.d/netifyd
  75. $(INSTALL_DIR) $(1)/usr/sbin
  76. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netifyd $(1)/usr/sbin
  77. $(INSTALL_DIR) $(1)/usr/lib
  78. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetifyd.so.* $(1)/usr/lib/
  79. $(INSTALL_DIR) $(1)/etc/netify.d
  80. $(INSTALL_DATA) $(PKG_BUILD_DIR)/deploy/netify-sink.conf $(1)/etc/netify.d/netify-sink.conf
  81. $(INSTALL_DIR) $(1)/usr/share/netifyd
  82. $(INSTALL_DATA) $(PKG_BUILD_DIR)/deploy/functions.sh $(1)/usr/share/netifyd
  83. endef
  84. $(eval $(call BuildPackage,netifyd))