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