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.

101 lines
3.2 KiB

6 years ago
  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:=1
  8. PKG_MAINTAINER:=Darryl Sokoloski <darryl@egloo.ca>
  9. PKG_LICENSE:=GPL-3.0+
  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-06-06
  16. PKG_SOURCE_VERSION:=v2.88
  17. #PKG_SOURCE_VERSION:=367ddd2fca4b2edd5e71145e2adea1b58f750214
  18. PKG_MIRROR_HASH:=8ead41dc074a71626609bced1d584f8df87e39f5ad76dcca76021c1737150089
  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:=+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-ncurses \
  48. --disable-libtcmalloc \
  49. --without-systemdsystemunitdir \
  50. --without-tmpfilesdir
  51. # Disable configuration file-watch support (deprecated feature).
  52. # Not to be confused with kernel/system-level inotify support.
  53. CONFIGURE_ARGS+= \
  54. --disable-inotify
  55. ifneq ($(CONFIG_LIBCURL_ZLIB),y)
  56. CONFIGURE_ARGS+= \
  57. --without-libcurl-zlib
  58. endif
  59. define Build/Configure
  60. (cd $(PKG_BUILD_DIR); ./autogen.sh)
  61. $(call Build/Configure/Default,$(CONFIGURE_ARGS))
  62. endef
  63. define Build/InstallDev
  64. $(INSTALL_DIR) $(1)/usr/include/netifyd
  65. $(CP) $(PKG_INSTALL_DIR)/usr/include/netifyd/*.h $(1)/usr/include/netifyd
  66. $(INSTALL_DIR) $(1)/usr/lib
  67. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetifyd.{a,so*} $(1)/usr/lib/
  68. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  69. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnetifyd.pc $(1)/usr/lib/pkgconfig/
  70. endef
  71. define Package/netifyd/install
  72. $(INSTALL_DIR) $(1)/etc
  73. $(INSTALL_DATA) $(PKG_BUILD_DIR)/deploy/netifyd.conf $(1)/etc
  74. $(INSTALL_DIR) $(1)/etc/init.d
  75. $(INSTALL_BIN) ./files/netifyd.init $(1)/etc/init.d/netifyd
  76. $(INSTALL_DIR) $(1)/usr/sbin
  77. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netifyd $(1)/usr/sbin
  78. $(INSTALL_DIR) $(1)/usr/lib
  79. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetifyd.so.* $(1)/usr/lib/
  80. $(INSTALL_DIR) $(1)/etc/netify.d
  81. $(INSTALL_DATA) $(PKG_BUILD_DIR)/deploy/netify-sink.conf $(1)/etc/netify.d/netify-sink.conf
  82. $(INSTALL_DIR) $(1)/usr/share/netifyd
  83. $(INSTALL_DATA) $(PKG_BUILD_DIR)/deploy/functions.sh $(1)/usr/share/netifyd
  84. endef
  85. $(eval $(call BuildPackage,netifyd))