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.

105 lines
3.2 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.33.1
  10. PKG_RELEASE:=$(AUTORELEASE)
  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://github.com/netdata/netdata/releases/download/v$(PKG_VERSION)
  17. PKG_HASH:=20ba8695d87187787b27128ac3aab9b09aa29ca6b508c48542e0f7d50ec9322b
  18. PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
  19. PKG_INSTALL:=1
  20. PKG_BUILD_PARALLEL:=1
  21. PKG_FIXUP:=autoreconf
  22. PKG_USE_MIPS16:=0
  23. include $(INCLUDE_DIR)/package.mk
  24. define Package/netdata
  25. SECTION:=admin
  26. CATEGORY:=Administration
  27. DEPENDS:=+zlib +libuuid +libuv +libmnl +libjson-c
  28. TITLE:=Real-time performance monitoring tool
  29. URL:=https://www.netdata.cloud/
  30. endef
  31. define Package/netdata/description
  32. netdata is a highly optimized Linux daemon providing real-time performance
  33. monitoring for Linux systems, applications and SNMP devices over the web.
  34. If you want to use Python plugins install python3, python3-yaml and
  35. python3-urllib3
  36. endef
  37. TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
  38. TARGET_CFLAGS += -ffunction-sections -fdata-sections -O3
  39. TARGET_LDFLAGS += -Wl,--gc-sections
  40. CONFIGURE_ARGS += \
  41. --with-zlib \
  42. --with-math \
  43. --disable-x86-sse \
  44. --enable-lto \
  45. --disable-ebpf \
  46. --without-libcap \
  47. --disable-https \
  48. --disable-dbengine \
  49. --disable-compression \
  50. --disable-plugin-nfacct \
  51. --disable-plugin-freeipmi \
  52. --disable-plugin-cups \
  53. --disable-plugin-xenstat \
  54. --disable-backend-prometheus-remote-write \
  55. --disable-unit-tests \
  56. --disable-ml \
  57. --disable-cloud
  58. define Build/Configure
  59. $(SED) 's/m4_esyscmd(\[git describe .*\])/$(PKG_VERSION)/' $(PKG_BUILD_DIR)/configure.ac
  60. $(Build/Configure/Default)
  61. endef
  62. define Package/netdata/conffiles
  63. /etc/netdata/
  64. endef
  65. define Package/netdata/install
  66. $(INSTALL_DIR) $(1)/etc/netdata/custom-plugins.d
  67. $(CP) $(PKG_INSTALL_DIR)/etc/netdata $(1)/etc
  68. $(CP) ./files/netdata.conf $(1)/etc/netdata
  69. touch $(1)/etc/netdata/.opt-out-from-anonymous-statistics
  70. $(INSTALL_DIR) $(1)/usr/lib
  71. $(CP) $(PKG_INSTALL_DIR)/usr/lib/netdata $(1)/usr/lib
  72. $(CP) $(1)/usr/lib/netdata/conf.d/fping.conf $(1)/etc
  73. $(CP) $(1)/usr/lib/netdata/conf.d/health_alarm_notify.conf $(1)/etc
  74. $(CP) $(1)/usr/lib/netdata/plugins.d/tc-qos-helper.sh $(1)/etc
  75. $(INSTALL_DIR) $(1)/usr/sbin
  76. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdata $(1)/usr/sbin
  77. $(INSTALL_DIR) $(1)/usr/share/netdata
  78. $(CP) $(PKG_INSTALL_DIR)/usr/share/netdata $(1)/usr/share
  79. rm $(1)/usr/share/netdata/web/demo*html
  80. rm $(1)/usr/share/netdata/web/fonts/*.svg
  81. rm $(1)/usr/share/netdata/web/fonts/*.ttf
  82. rm $(1)/usr/share/netdata/web/fonts/*.woff
  83. rm $(1)/usr/share/netdata/web/images/*.png
  84. rm $(1)/usr/share/netdata/web/images/*.gif
  85. rm $(1)/usr/share/netdata/web/images/*.ico
  86. rm -rf $(1)/usr/share/netdata/web/old
  87. $(INSTALL_DIR) $(1)/etc/init.d
  88. $(INSTALL_BIN) ./files/netdata.init $(1)/etc/init.d/netdata
  89. endef
  90. $(eval $(call BuildPackage,netdata))