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.

87 lines
2.7 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.12.2
  10. PKG_RELEASE:=1
  11. PKG_MAINTAINER:=
  12. PKG_LICENSE:=GPL-3.0+
  13. PKG_LICENSE_FILES:=COPYING
  14. PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
  15. PKG_SOURCE_URL:=https://github.com/netdata/netdata/releases/download/v$(PKG_VERSION)
  16. PKG_HASH:=f8cd689ec1ab262903b5a54c8df2fd0fe6e5e7b0ab4a2c60fde4e88f37aa72b5
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
  18. PKG_INSTALL:=1
  19. PKG_FIXUP:=autoreconf
  20. PKG_USE_MIPS16:=0
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/netdata
  23. SECTION:=admin
  24. CATEGORY:=Administration
  25. DEPENDS:=+zlib +libuuid +libmnl
  26. TITLE:=Real-time performance monitoring tool
  27. URL:=https://my-netdata.io/
  28. endef
  29. define Package/netdata/description
  30. netdata is a highly optimized Linux daemon providing real-time performance
  31. monitoring for Linux systems, applications and SNMP devices over the web.
  32. If you want to use Python plugins install python3, python3-yaml and
  33. python3-urllib3
  34. endef
  35. TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
  36. TARGET_CFLAGS += -ffunction-sections -fdata-sections -O3
  37. TARGET_LDFLAGS += -Wl,--gc-sections
  38. CONFIGURE_ARGS += \
  39. --with-zlib \
  40. --with-math \
  41. --disable-x86-sse \
  42. --enable-lto \
  43. --without-libcap \
  44. --disable-plugin-nfacct
  45. define Package/netdata/conffiles
  46. /etc/netdata/
  47. endef
  48. define Package/netdata/install
  49. $(INSTALL_DIR) $(1)/etc/netdata/custom-plugins.d
  50. $(CP) $(PKG_INSTALL_DIR)/etc/netdata $(1)/etc
  51. $(CP) ./files/netdata.conf $(1)/etc/netdata
  52. $(INSTALL_DIR) $(1)/usr/lib
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/netdata $(1)/usr/lib
  54. $(CP) $(1)/usr/lib/netdata/conf.d/fping.conf $(1)/etc
  55. $(CP) $(1)/usr/lib/netdata/conf.d/health_alarm_notify.conf $(1)/etc
  56. rm -rf $(1)/usr/lib/netdata/python.d/python_modules/pyyaml2
  57. rm -rf $(1)/usr/lib/netdata/python.d/python_modules/pyyaml3
  58. rm -rf $(1)/usr/lib/netdata/python.d/python_modules/urllib3
  59. $(CP) $(1)/usr/lib/netdata/plugins.d/tc-qos-helper.sh $(1)/etc
  60. $(INSTALL_DIR) $(1)/usr/sbin
  61. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdata $(1)/usr/sbin
  62. $(INSTALL_DIR) $(1)/usr/share/netdata
  63. $(CP) $(PKG_INSTALL_DIR)/usr/share/netdata $(1)/usr/share
  64. rm $(1)/usr/share/netdata/web/demo*html
  65. rm $(1)/usr/share/netdata/web/fonts/*.svg
  66. rm $(1)/usr/share/netdata/web/fonts/*.ttf
  67. rm $(1)/usr/share/netdata/web/fonts/*.woff
  68. rm $(1)/usr/share/netdata/web/images/*.png
  69. rm $(1)/usr/share/netdata/web/images/*.gif
  70. rm $(1)/usr/share/netdata/web/images/*.ico
  71. $(INSTALL_DIR) $(1)/etc/init.d
  72. $(INSTALL_BIN) ./files/netdata.init $(1)/etc/init.d/netdata
  73. endef
  74. $(eval $(call BuildPackage,netdata))