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