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 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 8 | SRC_URI = "git://github.com/netdata/netdata.git;protocol=https" |
Andrew Geissler | c87764f | 2020-06-27 00:16:32 -0500 | [diff] [blame] | 9 | SRCREV = "1be9200ba8e11dc81a2101d85a2725137d43f766" |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 10 | |
| 11 | # default netdata.conf for netdata configuration |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 12 | SRC_URI += "file://netdata.conf" |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 13 | |
| 14 | # file for providing systemd service support |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 15 | SRC_URI += "file://netdata.service" |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 16 | |
| 17 | S = "${WORKDIR}/git" |
| 18 | |
Andrew Geissler | c87764f | 2020-06-27 00:16:32 -0500 | [diff] [blame] | 19 | DEPENDS += "zlib util-linux libuv" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 20 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 21 | inherit pkgconfig autotools-brokensep useradd systemd |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 22 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 23 | LIBS:toolchain-clang:x86 = "-latomic" |
| 24 | LIBS:riscv64 = "-latomic" |
| 25 | LIBS:riscv32 = "-latomic" |
Brad Bishop | a891d15 | 2019-09-13 06:17:45 -0400 | [diff] [blame] | 26 | export LIBS |
| 27 | |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 28 | #systemd |
| 29 | SYSTEMD_PACKAGES = "${PN}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 30 | SYSTEMD_SERVICE:${PN} = "netdata.service" |
| 31 | SYSTEMD_AUTO_ENABLE:${PN} = "enable" |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 32 | |
| 33 | #User specific |
| 34 | USERADD_PACKAGES = "${PN}" |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 35 | 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] | 36 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 37 | do_install:append() { |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 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 |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 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 |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 59 | } |
| 60 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 61 | FILES_${PN} += "${localstatedir}/cache/netdata/ ${localstatedir}/lib/netdata/" |
| 62 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 63 | RDEPENDS:${PN} = "bash zlib" |