Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame^] | 1 | HOMEPAGE = "https://github.com/netdata/netdata/" |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 2 | SUMMARY = "Real-time performance monitoring" |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame^] | 3 | DESCRIPTION = "Netdata is high-fidelity infrastructure monitoring and troubleshooting. \ |
| 4 | Open-source, free, preconfigured, opinionated, and always real-time." |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 5 | LICENSE = "GPLv3" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=fc9b848046ef54b5eaee6071947abd24" |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 7 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame^] | 8 | SRC_URI:append = " git://github.com/firehol/netdata.git;protocol=https" |
Andrew Geissler | c87764f | 2020-06-27 00:16:32 -0500 | [diff] [blame] | 9 | SRCREV = "1be9200ba8e11dc81a2101d85a2725137d43f766" |
| 10 | PV = "1.22.1" |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 11 | |
| 12 | # default netdata.conf for netdata configuration |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame^] | 13 | SRC_URI += " file://netdata.conf" |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 14 | |
| 15 | # file for providing systemd service support |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame^] | 16 | SRC_URI += " file://netdata.service" |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 17 | |
| 18 | S = "${WORKDIR}/git" |
| 19 | |
Andrew Geissler | c87764f | 2020-06-27 00:16:32 -0500 | [diff] [blame] | 20 | DEPENDS += "zlib util-linux libuv" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 21 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 22 | inherit pkgconfig autotools-brokensep useradd systemd |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 23 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 24 | LIBS:toolchain-clang:x86 = "-latomic" |
| 25 | LIBS:riscv64 = "-latomic" |
| 26 | LIBS:riscv32 = "-latomic" |
Brad Bishop | a891d15 | 2019-09-13 06:17:45 -0400 | [diff] [blame] | 27 | export LIBS |
| 28 | |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 29 | #systemd |
| 30 | SYSTEMD_PACKAGES = "${PN}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 31 | SYSTEMD_SERVICE:${PN} = "netdata.service" |
| 32 | SYSTEMD_AUTO_ENABLE:${PN} = "enable" |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 33 | |
| 34 | #User specific |
| 35 | USERADD_PACKAGES = "${PN}" |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame^] | 36 | USERADD_PARAM:${PN} = "--system --no-create-home --home-dir ${localstatedir}/run/netdata --user-group netdata" |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 37 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 38 | do_install:append() { |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 39 | #set S UID for plugins |
| 40 | chmod 4755 ${D}${libexecdir}/netdata/plugins.d/apps.plugin |
| 41 | |
| 42 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 43 | # Install systemd unit files |
| 44 | install -d ${D}${systemd_unitdir}/system |
| 45 | install -m 0644 ${WORKDIR}/netdata.service ${D}${systemd_unitdir}/system |
| 46 | sed -i -e 's,@@datadir,${datadir_native},g' ${D}${systemd_unitdir}/system/netdata.service |
| 47 | fi |
| 48 | |
| 49 | # Install default netdata.conf |
| 50 | install -d ${D}${sysconfdir}/netdata |
| 51 | install -m 0644 ${WORKDIR}/netdata.conf ${D}${sysconfdir}/netdata/ |
| 52 | sed -i -e 's,@@sysconfdir,${sysconfdir},g' ${D}${sysconfdir}/netdata/netdata.conf |
| 53 | sed -i -e 's,@@libdir,${libexecdir},g' ${D}${sysconfdir}/netdata/netdata.conf |
| 54 | sed -i -e 's,@@datadir,${datadir},g' ${D}${sysconfdir}/netdata/netdata.conf |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame^] | 55 | |
| 56 | install --group netdata --owner netdata --directory ${D}${localstatedir}/cache/netdata |
| 57 | install --group netdata --owner netdata --directory ${D}${localstatedir}/lib/netdata |
| 58 | |
| 59 | chown -R netdata:netdata ${D}${datadir}/netdata/web |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 60 | } |
| 61 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame^] | 62 | FILES_${PN} += "${localstatedir}/cache/netdata/ ${localstatedir}/lib/netdata/" |
| 63 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 64 | RDEPENDS:${PN} = "bash zlib" |