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.

71 lines
2.1 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.10.0
  10. PKG_RELEASE:=1
  11. PKG_MAINTAINER:=
  12. PKG_LICENSE:=GPL-3.0
  13. PKG_LICENSE_FILES:=COPYING
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  15. PKG_SOURCE_URL:=https://github.com/firehol/netdata/releases/download/v$(PKG_VERSION)
  16. PKG_HASH:=0514fc002c5c5fb730156b3fe928965b22327833c6c17e22b7097eda657e77a2
  17. PKG_INSTALL:=1
  18. PKG_FIXUP:=autoreconf
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/netdata
  21. SECTION:=admin
  22. CATEGORY:=Administration
  23. DEPENDS:=+zlib +libuuid +libmnl
  24. TITLE:=Real-time performance monitoring tool
  25. URL:=https://my-netdata.io/
  26. endef
  27. define Package/netdata/description
  28. netdata is a highly optimized Linux daemon providing real-time performance
  29. monitoring for Linux systems, applications and SNMP devices over the web.
  30. endef
  31. TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS))
  32. TARGET_CFLAGS += -ffunction-sections -fdata-sections -O3
  33. TARGET_LDFLAGS += -Wl,--gc-sections
  34. CONFIGURE_ARGS += --with-zlib --with-math --disable-x86-sse --disable-lto
  35. define Package/netdata/conffiles
  36. /etc/netdata/
  37. endef
  38. define Package/netdata/install
  39. mkdir -p $(1)/etc/netdata
  40. $(CP) $(PKG_INSTALL_DIR)/etc/netdata $(1)/etc
  41. $(CP) ./files/netdata.conf $(1)/etc/netdata
  42. mkdir -p $(1)/usr/share/netdata
  43. $(CP) $(PKG_INSTALL_DIR)/usr/share/netdata $(1)/usr/share
  44. rm -rf $(1)/usr/share/netdata/web/images
  45. rm -rf $(1)/usr/share/netdata/web/old
  46. rm $(1)/usr/share/netdata/web/demo*html
  47. rm $(1)/usr/share/netdata/web/fonts/*.svg
  48. rm $(1)/usr/share/netdata/web/fonts/*.ttf
  49. rm $(1)/usr/share/netdata/web/fonts/*.woff
  50. mkdir -p $(1)/usr/lib/netdata
  51. $(CP) $(PKG_INSTALL_DIR)/usr/lib/netdata $(1)/usr/lib
  52. rm $(1)/usr/lib/netdata/python.d/python-modules-installer.sh
  53. chmod 4755 $(1)/usr/lib/netdata/plugins.d/apps.plugin
  54. mkdir -p $(1)/etc/init.d
  55. $(INSTALL_BIN) ./files/netdata.init $(1)/etc/init.d/netdata
  56. mkdir -p $(1)/usr/sbin
  57. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdata $(1)/usr/sbin
  58. endef
  59. $(eval $(call BuildPackage,netdata))