Patrick Williams | ac13d5f | 2023-11-24 18:59:46 -0600 | [diff] [blame] | 1 | SUMMARY = "Real-time performance monitoring" |
| 2 | DESCRIPTION = "Netdata is high-fidelity infrastructure monitoring and troubleshooting. \ |
| 3 | Open-source, free, preconfigured, opinionated, and always real-time." |
| 4 | HOMEPAGE = "https://github.com/netdata/netdata/" |
| 5 | LICENSE = "GPL-3.0-only" |
| 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=fc9b848046ef54b5eaee6071947abd24" |
| 7 | |
| 8 | DEPENDS += "libuv util-linux zlib libyaml json-c" |
| 9 | |
| 10 | SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BPN}-v${PV}.tar.gz \ |
| 11 | " |
| 12 | SRC_URI[sha256sum] = "d4a7ea2717ac7c8f04865f18e13aeaa0a36784156059f1b5ced75a44f74afc4d" |
| 13 | |
| 14 | # default netdata.conf for netdata configuration |
| 15 | SRC_URI += "file://netdata.conf" |
| 16 | |
| 17 | # file for providing systemd service support |
| 18 | SRC_URI += "file://netdata.service" |
| 19 | |
| 20 | UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/tags" |
| 21 | UPSTREAM_CHECK_REGEX = "${BPN}/releases/tag/v(?P<pver>\d+(?:\.\d+)*)" |
| 22 | |
| 23 | S = "${WORKDIR}/${BPN}-v${PV}" |
| 24 | |
| 25 | # Stop sending anonymous statistics to Google Analytics |
| 26 | NETDATA_ANONYMOUS ??= "enabled" |
| 27 | |
| 28 | inherit pkgconfig autotools-brokensep useradd systemd |
| 29 | |
| 30 | LIBS:toolchain-clang:x86 = "-latomic" |
| 31 | LIBS:riscv64 = "-latomic" |
| 32 | LIBS:riscv32 = "-latomic" |
| 33 | LIBS:mips = "-latomic" |
| 34 | export LIBS |
| 35 | |
| 36 | #systemd |
| 37 | SYSTEMD_PACKAGES = "${PN}" |
| 38 | SYSTEMD_SERVICE:${PN} = "netdata.service" |
| 39 | SYSTEMD_AUTO_ENABLE:${PN} = "enable" |
| 40 | |
| 41 | #User specific |
| 42 | USERADD_PACKAGES = "${PN}" |
| 43 | USERADD_PARAM:${PN} = "--system --no-create-home --home-dir ${localstatedir}/run/netdata --user-group netdata" |
| 44 | |
| 45 | PACKAGECONFIG ??= "openssl" |
| 46 | PACKAGECONFIG[cloud] = "--enable-cloud, --disable-cloud," |
| 47 | PACKAGECONFIG[lz4] = "--enable-lz4, --disable-lz4, lz4" |
| 48 | PACKAGECONFIG[openssl] = "--enable-openssl, --disable-openssl, openssl" |
| 49 | |
| 50 | # ebpf doesn't compile (or detect) the cross compilation well |
| 51 | EXTRA_OECONF += "--disable-ebpf" |
| 52 | |
| 53 | do_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 | |
| 81 | FILES:${PN} += "${localstatedir}/cache/netdata/ ${localstatedir}/lib/netdata/" |
| 82 | |
Patrick Williams | 169d7bc | 2024-01-05 11:33:25 -0600 | [diff] [blame] | 83 | RDEPENDS:${PN} = "bash python3-core zlib" |