diff options
Diffstat (limited to 'meta-webserver/recipes-webadmin/netdata/netdata_1.22.1.bb')
| -rw-r--r-- | meta-webserver/recipes-webadmin/netdata/netdata_1.22.1.bb | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/meta-webserver/recipes-webadmin/netdata/netdata_1.22.1.bb b/meta-webserver/recipes-webadmin/netdata/netdata_1.22.1.bb new file mode 100644 index 0000000000..fb4d272947 --- /dev/null +++ b/meta-webserver/recipes-webadmin/netdata/netdata_1.22.1.bb | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | HOMEPAGE = "https://github.com/netdata/netdata/" | ||
| 2 | SUMMARY = "Real-time performance monitoring" | ||
| 3 | DESCRIPTION = "Netdata is high-fidelity infrastructure monitoring and troubleshooting. \ | ||
| 4 | Open-source, free, preconfigured, opinionated, and always real-time." | ||
| 5 | LICENSE = "GPLv3" | ||
| 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=fc9b848046ef54b5eaee6071947abd24" | ||
| 7 | |||
| 8 | SRC_URI = "git://github.com/netdata/netdata.git;protocol=https" | ||
| 9 | SRCREV = "1be9200ba8e11dc81a2101d85a2725137d43f766" | ||
| 10 | |||
| 11 | # default netdata.conf for netdata configuration | ||
| 12 | SRC_URI += "file://netdata.conf" | ||
| 13 | |||
| 14 | # file for providing systemd service support | ||
| 15 | SRC_URI += "file://netdata.service" | ||
| 16 | |||
| 17 | S = "${WORKDIR}/git" | ||
| 18 | |||
| 19 | DEPENDS += "zlib util-linux libuv" | ||
| 20 | |||
| 21 | inherit pkgconfig autotools-brokensep useradd systemd | ||
| 22 | |||
| 23 | LIBS:toolchain-clang:x86 = "-latomic" | ||
| 24 | LIBS:riscv64 = "-latomic" | ||
| 25 | LIBS:riscv32 = "-latomic" | ||
| 26 | export LIBS | ||
| 27 | |||
| 28 | #systemd | ||
| 29 | SYSTEMD_PACKAGES = "${PN}" | ||
| 30 | SYSTEMD_SERVICE:${PN} = "netdata.service" | ||
| 31 | SYSTEMD_AUTO_ENABLE:${PN} = "enable" | ||
| 32 | |||
| 33 | #User specific | ||
| 34 | USERADD_PACKAGES = "${PN}" | ||
| 35 | USERADD_PARAM:${PN} = "--system --no-create-home --home-dir ${localstatedir}/run/netdata --user-group netdata" | ||
| 36 | |||
| 37 | do_install:append() { | ||
| 38 | #set S UID for plugins | ||
| 39 | chmod 4755 ${D}${libexecdir}/netdata/plugins.d/apps.plugin | ||
| 40 | |||
| 41 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
| 42 | # Install systemd unit files | ||
| 43 | install -d ${D}${systemd_unitdir}/system | ||
| 44 | install -m 0644 ${WORKDIR}/netdata.service ${D}${systemd_unitdir}/system | ||
| 45 | sed -i -e 's,@@datadir,${datadir_native},g' ${D}${systemd_unitdir}/system/netdata.service | ||
| 46 | fi | ||
| 47 | |||
| 48 | # Install default netdata.conf | ||
| 49 | install -d ${D}${sysconfdir}/netdata | ||
| 50 | install -m 0644 ${WORKDIR}/netdata.conf ${D}${sysconfdir}/netdata/ | ||
| 51 | sed -i -e 's,@@sysconfdir,${sysconfdir},g' ${D}${sysconfdir}/netdata/netdata.conf | ||
| 52 | sed -i -e 's,@@libdir,${libexecdir},g' ${D}${sysconfdir}/netdata/netdata.conf | ||
| 53 | sed -i -e 's,@@datadir,${datadir},g' ${D}${sysconfdir}/netdata/netdata.conf | ||
| 54 | |||
| 55 | install --group netdata --owner netdata --directory ${D}${localstatedir}/cache/netdata | ||
| 56 | install --group netdata --owner netdata --directory ${D}${localstatedir}/lib/netdata | ||
| 57 | |||
| 58 | chown -R netdata:netdata ${D}${datadir}/netdata/web | ||
| 59 | } | ||
| 60 | |||
| 61 | FILES_${PN} += "${localstatedir}/cache/netdata/ ${localstatedir}/lib/netdata/" | ||
| 62 | |||
| 63 | RDEPENDS:${PN} = "bash zlib" | ||
