Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 1 | HOMEPAGE = "https://github.com/firehol/netdata/" |
| 2 | SUMMARY = "Real-time performance monitoring" |
| 3 | LICENSE = "GPLv3" |
| 4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=747afe070ea9d6c2be0a31353609a35b" |
| 5 | |
| 6 | SRC_URI = "git://github.com/firehol/netdata.git;protocol=https" |
| 7 | SRCREV = "36c1304e37094174ea51001903058e65053107ca" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 8 | PV = "1.0.1+git${SRCPV}" |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 9 | |
| 10 | # patch to disable timeout because timeout are not available with actual version |
| 11 | # of core-utils |
| 12 | SRC_URI += "file://0001-Correct-Timeout-issue.patch" |
| 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 | S = "${WORKDIR}/git" |
| 21 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 22 | DEPENDS += "zlib" |
| 23 | |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 24 | inherit pkgconfig autotools useradd systemd |
| 25 | |
| 26 | #systemd |
| 27 | SYSTEMD_PACKAGES = "${PN}" |
| 28 | SYSTEMD_SERVICE_${PN} = "netdata.service" |
| 29 | SYSTEMD_AUTO_ENABLE_${PN} = "enable" |
| 30 | |
| 31 | #User specific |
| 32 | USERADD_PACKAGES = "${PN}" |
| 33 | GROUPADD_PARAM_${PN} = "--system netdata" |
| 34 | |
| 35 | do_install_append() { |
| 36 | #set S UID for plugins |
| 37 | chmod 4755 ${D}${libexecdir}/netdata/plugins.d/apps.plugin |
| 38 | |
| 39 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 40 | # Install systemd unit files |
| 41 | install -d ${D}${systemd_unitdir}/system |
| 42 | install -m 0644 ${WORKDIR}/netdata.service ${D}${systemd_unitdir}/system |
| 43 | sed -i -e 's,@@datadir,${datadir_native},g' ${D}${systemd_unitdir}/system/netdata.service |
| 44 | fi |
| 45 | |
| 46 | # Install default netdata.conf |
| 47 | install -d ${D}${sysconfdir}/netdata |
| 48 | install -m 0644 ${WORKDIR}/netdata.conf ${D}${sysconfdir}/netdata/ |
| 49 | sed -i -e 's,@@sysconfdir,${sysconfdir},g' ${D}${sysconfdir}/netdata/netdata.conf |
| 50 | sed -i -e 's,@@libdir,${libexecdir},g' ${D}${sysconfdir}/netdata/netdata.conf |
| 51 | sed -i -e 's,@@datadir,${datadir},g' ${D}${sysconfdir}/netdata/netdata.conf |
| 52 | } |
| 53 | |
| 54 | FILES_${PN}-dbg += "${libexecdir}/netdata/plugins.d/.debug" |
| 55 | RDEPENDS_${PN} = "bash zlib" |