blob: 9decb63ddf3554940bb0abf16d777f3fe7255084 [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 \
Patrick Williams03907ee2022-05-01 06:28:52 -050011"
Andrew Geissler615f2f12022-07-15 14:00:58 -050012SRC_URI[sha256sum] = "587f6cce421015f8e0a527e3964a4de8cc17085c354498150bc3ade21606bbf9"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000013
14# default netdata.conf for netdata configuration
15SRC_URI += "file://netdata.conf"
16
17# file for providing systemd service support
18SRC_URI += "file://netdata.service"
19
20UPSTREAM_CHECK_URI = "https://github.com/netdata/netdata/releases"
21
22S = "${WORKDIR}/${BPN}-v${PV}"
23
24# Stop sending anonymous statistics to Google Analytics
25NETDATA_ANONYMOUS ??= "enabled"
26
27inherit pkgconfig autotools-brokensep useradd systemd
28
29LIBS:toolchain-clang:x86 = "-latomic"
30LIBS:riscv64 = "-latomic"
31LIBS:riscv32 = "-latomic"
32LIBS:mips = "-latomic"
33export LIBS
34
35#systemd
36SYSTEMD_PACKAGES = "${PN}"
37SYSTEMD_SERVICE:${PN} = "netdata.service"
38SYSTEMD_AUTO_ENABLE:${PN} = "enable"
39
40#User specific
41USERADD_PACKAGES = "${PN}"
42USERADD_PARAM:${PN} = "--system --no-create-home --home-dir ${localstatedir}/run/netdata --user-group netdata"
43
44PACKAGECONFIG ??= "https"
Andrew Geissler9aee5002022-03-30 16:27:02 +000045PACKAGECONFIG[cloud] = "--enable-cloud, --disable-cloud, json-c"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000046PACKAGECONFIG[compression] = "--enable-compression, --disable-compression, lz4"
47PACKAGECONFIG[https] = "--enable-https, --disable-https, openssl"
48
49# ebpf doesn't compile (or detect) the cross compilation well
50EXTRA_OECONF += "--disable-ebpf"
51
52do_install:append() {
53 #set S UID for plugins
54 chmod 4755 ${D}${libexecdir}/netdata/plugins.d/apps.plugin
55
56 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
57 # Install systemd unit files
58 install -d ${D}${systemd_unitdir}/system
59 install -m 0644 ${WORKDIR}/netdata.service ${D}${systemd_unitdir}/system
60 sed -i -e 's,@@datadir,${datadir_native},g' ${D}${systemd_unitdir}/system/netdata.service
61 fi
62
63 # Install default netdata.conf
64 install -d ${D}${sysconfdir}/netdata
65 install -m 0644 ${WORKDIR}/netdata.conf ${D}${sysconfdir}/netdata/
66 sed -i -e 's,@@sysconfdir,${sysconfdir},g' ${D}${sysconfdir}/netdata/netdata.conf
67 sed -i -e 's,@@libdir,${libexecdir},g' ${D}${sysconfdir}/netdata/netdata.conf
68 sed -i -e 's,@@datadir,${datadir},g' ${D}${sysconfdir}/netdata/netdata.conf
69
70 if [ "${NETDATA_ANONYMOUS}" = "enabled" ]; then
71 touch ${D}${sysconfdir}/netdata/.opt-out-from-anonymous-statistics
72 fi
73
74 install --group netdata --owner netdata --directory ${D}${localstatedir}/cache/netdata
75 install --group netdata --owner netdata --directory ${D}${localstatedir}/lib/netdata
76
77 chown -R netdata:netdata ${D}${datadir}/netdata/web
78}
79
Andrew Geissler9aee5002022-03-30 16:27:02 +000080FILES:${PN} += "${localstatedir}/cache/netdata/ ${localstatedir}/lib/netdata/"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000081
82RDEPENDS:${PN} = "bash zlib"