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