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.

96 lines
2.9 KiB

  1. #
  2. # Copyright (C) 2008-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=netdata
  9. PKG_VERSION:=1.22.1
  10. PKG_RELEASE:=1
  11. PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>, Daniel Engberg <daniel.engberg.lists@pyret.net>
  12. PKG_LICENSE:=GPL-3.0-or-later
  13. PKG_LICENSE_FILES:=COPYING
  14. PKG_CPE_ID:=cpe:/a:my-netdata:netdata
  15. PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
  16. PKG_SOURCE_URL:=https://codeload.github.com/netdata/netdata/tar.gz/v$(PKG_VERSION)?
  17. PKG_HASH:=6efd785eab82f98892b4b4017cadfa4ce1688985915499bc75f2f888765a3446
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. PKG_FIXUP:=autoreconf
  21. PKG_USE_MIPS16:=0
  22. include $(INCLUDE_DIR)/package.mk
  23. define Package/netdata
  24. SECTION:=admin
  25. CATEGORY:=Administration
  26. DEPENDS:=+zlib +libuuid +libuv +libmnl +libjson-c
  27. TITLE:=Real-time performance monitoring tool
  28. URL:=https://www.netdata.cloud/
  29. endef
  30. define Package/netdata/description
  31. netdata is a highly optimized Linux daemon providing real-time performance
  32. monitoring for Linux systems, applications and SNMP devices over the web.
  33. If you want to use Python plugins install python3, python3-yaml and
  34. python3-urllib3
  35. endef
  36. TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
  37. TARGET_CFLAGS += -ffunction-sections -fdata-sections -O3
  38. TARGET_LDFLAGS += -Wl,--gc-sections
  39. CONFIGURE_ARGS += \
  40. --with-zlib \
  41. --with-math \
  42. --disable-x86-sse \
  43. --enable-lto \
  44. --without-libcap \
  45. --disable-https \
  46. --disable-dbengine \
  47. --disable-plugin-nfacct \
  48. --disable-plugin-freeipmi \
  49. --disable-plugin-cups \
  50. --disable-plugin-xenstat \
  51. --disable-backend-prometheus-remote-write \
  52. --disable-unit-tests \
  53. --disable-cloud
  54. define Package/netdata/conffiles
  55. /etc/netdata/
  56. endef
  57. define Package/netdata/install
  58. $(INSTALL_DIR) $(1)/etc/netdata/custom-plugins.d
  59. $(CP) $(PKG_INSTALL_DIR)/etc/netdata $(1)/etc
  60. $(CP) ./files/netdata.conf $(1)/etc/netdata
  61. touch $(1)/etc/netdata/.opt-out-from-anonymous-statistics
  62. $(INSTALL_DIR) $(1)/usr/lib
  63. $(CP) $(PKG_INSTALL_DIR)/usr/lib/netdata $(1)/usr/lib
  64. $(CP) $(1)/usr/lib/netdata/conf.d/fping.conf $(1)/etc
  65. $(CP) $(1)/usr/lib/netdata/conf.d/health_alarm_notify.conf $(1)/etc
  66. $(CP) $(1)/usr/lib/netdata/plugins.d/tc-qos-helper.sh $(1)/etc
  67. $(INSTALL_DIR) $(1)/usr/sbin
  68. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdata $(1)/usr/sbin
  69. $(INSTALL_DIR) $(1)/usr/share/netdata
  70. $(CP) $(PKG_INSTALL_DIR)/usr/share/netdata $(1)/usr/share
  71. rm $(1)/usr/share/netdata/web/demo*html
  72. rm $(1)/usr/share/netdata/web/fonts/*.svg
  73. rm $(1)/usr/share/netdata/web/fonts/*.ttf
  74. rm $(1)/usr/share/netdata/web/fonts/*.woff
  75. rm $(1)/usr/share/netdata/web/images/*.png
  76. rm $(1)/usr/share/netdata/web/images/*.gif
  77. rm $(1)/usr/share/netdata/web/images/*.ico
  78. rm -rf $(1)/usr/share/netdata/web/old
  79. $(INSTALL_DIR) $(1)/etc/init.d
  80. $(INSTALL_BIN) ./files/netdata.init $(1)/etc/init.d/netdata
  81. endef
  82. $(eval $(call BuildPackage,netdata))