blob: b0f1602528f8fde1cbd7cc69309a2fe6e49c640b [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001HOMEPAGE = "https://github.com/firehol/netdata/"
2SUMMARY = "Real-time performance monitoring"
3LICENSE = "GPLv3"
4LIC_FILES_CHKSUM = "file://LICENSE.md;md5=95b49e9ea979a337578f13c2a3ab9535 \
5 file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
6 "
7
8SRC_URI = "git://github.com/firehol/netdata.git;protocol=https \
9 file://0001-makefile-Do-not-build-contrib-dir.patch \
10"
11SRCREV = "89ed309252981ddd50f697fde4fe93019cb3e652"
12PV = "1.8.0+git${SRCPV}"
13
14# patch to disable timeout because timeout are not available with actual version
15# of core-utils
16SRC_URI += "file://0001-Correct-Timeout-issue.patch"
17
18# default netdata.conf for netdata configuration
19SRC_URI += "file://netdata.conf"
20
21# file for providing systemd service support
22SRC_URI += "file://netdata.service"
23
24S = "${WORKDIR}/git"
25
26DEPENDS += "zlib util-linux"
27
28inherit pkgconfig autotools useradd systemd
29
30#systemd
31SYSTEMD_PACKAGES = "${PN}"
32SYSTEMD_SERVICE_${PN} = "netdata.service"
33SYSTEMD_AUTO_ENABLE_${PN} = "enable"
34
35#User specific
36USERADD_PACKAGES = "${PN}"
37GROUPADD_PARAM_${PN} = "--system netdata"
38
39do_install_append() {
40 #set S UID for plugins
41 chmod 4755 ${D}${libexecdir}/netdata/plugins.d/apps.plugin
42
43 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
44 # Install systemd unit files
45 install -d ${D}${systemd_unitdir}/system
46 install -m 0644 ${WORKDIR}/netdata.service ${D}${systemd_unitdir}/system
47 sed -i -e 's,@@datadir,${datadir_native},g' ${D}${systemd_unitdir}/system/netdata.service
48 fi
49
50 # Install default netdata.conf
51 install -d ${D}${sysconfdir}/netdata
52 install -m 0644 ${WORKDIR}/netdata.conf ${D}${sysconfdir}/netdata/
53 sed -i -e 's,@@sysconfdir,${sysconfdir},g' ${D}${sysconfdir}/netdata/netdata.conf
54 sed -i -e 's,@@libdir,${libexecdir},g' ${D}${sysconfdir}/netdata/netdata.conf
55 sed -i -e 's,@@datadir,${datadir},g' ${D}${sysconfdir}/netdata/netdata.conf
56}
57
58FILES_${PN}-dbg += "${libexecdir}/netdata/plugins.d/.debug"
59RDEPENDS_${PN} = "bash zlib"