blob: 28e82dac31b8b2025a8223436f4464c785e97505 [file] [log] [blame]
Patrick Williamsac13d5f2023-11-24 18:59:46 -06001SUMMARY = "Real-time performance monitoring"
2DESCRIPTION = "Netdata is high-fidelity infrastructure monitoring and troubleshooting. \
3 Open-source, free, preconfigured, opinionated, and always real-time."
4HOMEPAGE = "https://github.com/netdata/netdata/"
5LICENSE = "GPL-3.0-only"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=fc9b848046ef54b5eaee6071947abd24"
7
8DEPENDS += "libuv util-linux zlib libyaml json-c"
9
10SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BPN}-v${PV}.tar.gz \
11"
12SRC_URI[sha256sum] = "d4a7ea2717ac7c8f04865f18e13aeaa0a36784156059f1b5ced75a44f74afc4d"
13
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/${BPN}/${BPN}/tags"
21UPSTREAM_CHECK_REGEX = "${BPN}/releases/tag/v(?P<pver>\d+(?:\.\d+)*)"
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 ??= "openssl"
46PACKAGECONFIG[cloud] = "--enable-cloud, --disable-cloud,"
47PACKAGECONFIG[lz4] = "--enable-lz4, --disable-lz4, lz4"
48PACKAGECONFIG[openssl] = "--enable-openssl, --disable-openssl, 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
81FILES:${PN} += "${localstatedir}/cache/netdata/ ${localstatedir}/lib/netdata/"
82
Patrick Williams169d7bc2024-01-05 11:33:25 -060083RDEPENDS:${PN} = "bash python3-core zlib"