blob: b777d208970f4d6d75238283eeafc97e700904dd [file] [log] [blame]
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00001SUMMARY = "Real-time performance monitoring"
2DESCRIPTION = "Netdata is high-fidelity infrastructure monitoring and troubleshooting. \
3 Open-source, free, preconfigured, opinionated, and always real-time."
Andrew Geissler9aee5002022-03-30 16:27:02 +00004HOMEPAGE = "https://github.com/netdata/netdata/"
5LICENSE = "GPL-3.0-only"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00006LIC_FILES_CHKSUM = "file://LICENSE;md5=fc9b848046ef54b5eaee6071947abd24"
7
8DEPENDS += "libuv util-linux zlib"
9
Patrick Williams03907ee2022-05-01 06:28:52 -050010SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BPN}-v${PV}.tar.gz \
11 file://0001-Use-explicit-typecast-to-enum-rrdset_flags.patch \
12"
13SRC_URI[sha256sum] = "8ea0786df0e952209c14efeb02e25339a0769aa3edc029e12816b8ead24a82d7"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000014
15# default netdata.conf for netdata configuration
16SRC_URI += "file://netdata.conf"
17
18# file for providing systemd service support
19SRC_URI += "file://netdata.service"
20
21UPSTREAM_CHECK_URI = "https://github.com/netdata/netdata/releases"
22
23S = "${WORKDIR}/${BPN}-v${PV}"
24
25# Stop sending anonymous statistics to Google Analytics
26NETDATA_ANONYMOUS ??= "enabled"
27
28inherit pkgconfig autotools-brokensep useradd systemd
29
30LIBS:toolchain-clang:x86 = "-latomic"
31LIBS:riscv64 = "-latomic"
32LIBS:riscv32 = "-latomic"
33LIBS:mips = "-latomic"
34export LIBS
35
36#systemd
37SYSTEMD_PACKAGES = "${PN}"
38SYSTEMD_SERVICE:${PN} = "netdata.service"
39SYSTEMD_AUTO_ENABLE:${PN} = "enable"
40
41#User specific
42USERADD_PACKAGES = "${PN}"
43USERADD_PARAM:${PN} = "--system --no-create-home --home-dir ${localstatedir}/run/netdata --user-group netdata"
44
45PACKAGECONFIG ??= "https"
Andrew Geissler9aee5002022-03-30 16:27:02 +000046PACKAGECONFIG[cloud] = "--enable-cloud, --disable-cloud, json-c"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000047PACKAGECONFIG[compression] = "--enable-compression, --disable-compression, lz4"
48PACKAGECONFIG[https] = "--enable-https, --disable-https, openssl"
49
50# ebpf doesn't compile (or detect) the cross compilation well
51EXTRA_OECONF += "--disable-ebpf"
52
53do_install:append() {
54 #set S UID for plugins
55 chmod 4755 ${D}${libexecdir}/netdata/plugins.d/apps.plugin
56
57 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
58 # Install systemd unit files
59 install -d ${D}${systemd_unitdir}/system
60 install -m 0644 ${WORKDIR}/netdata.service ${D}${systemd_unitdir}/system
61 sed -i -e 's,@@datadir,${datadir_native},g' ${D}${systemd_unitdir}/system/netdata.service
62 fi
63
64 # Install default netdata.conf
65 install -d ${D}${sysconfdir}/netdata
66 install -m 0644 ${WORKDIR}/netdata.conf ${D}${sysconfdir}/netdata/
67 sed -i -e 's,@@sysconfdir,${sysconfdir},g' ${D}${sysconfdir}/netdata/netdata.conf
68 sed -i -e 's,@@libdir,${libexecdir},g' ${D}${sysconfdir}/netdata/netdata.conf
69 sed -i -e 's,@@datadir,${datadir},g' ${D}${sysconfdir}/netdata/netdata.conf
70
71 if [ "${NETDATA_ANONYMOUS}" = "enabled" ]; then
72 touch ${D}${sysconfdir}/netdata/.opt-out-from-anonymous-statistics
73 fi
74
75 install --group netdata --owner netdata --directory ${D}${localstatedir}/cache/netdata
76 install --group netdata --owner netdata --directory ${D}${localstatedir}/lib/netdata
77
78 chown -R netdata:netdata ${D}${datadir}/netdata/web
79}
80
Andrew Geissler9aee5002022-03-30 16:27:02 +000081FILES:${PN} += "${localstatedir}/cache/netdata/ ${localstatedir}/lib/netdata/"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000082
83RDEPENDS:${PN} = "bash zlib"