blob: 7c48b8a37de6053726621b3087457e16c7965cd6 [file] [log] [blame]
Patrick Williamsddad1a12017-02-23 20:36:32 -06001HOMEPAGE = "https://github.com/firehol/netdata/"
2SUMMARY = "Real-time performance monitoring"
3LICENSE = "GPLv3"
Brad Bishop26bdd442019-08-16 17:08:17 -04004LIC_FILES_CHKSUM = "file://LICENSE;md5=fc9b848046ef54b5eaee6071947abd24"
Patrick Williamsddad1a12017-02-23 20:36:32 -06005
Andrew Geisslerc87764f2020-06-27 00:16:32 -05006SRC_URI = "git://github.com/firehol/netdata.git;protocol=https"
7SRCREV = "1be9200ba8e11dc81a2101d85a2725137d43f766"
8PV = "1.22.1"
Patrick Williamsddad1a12017-02-23 20:36:32 -06009
10# default netdata.conf for netdata configuration
11SRC_URI += "file://netdata.conf"
12
13# file for providing systemd service support
14SRC_URI += "file://netdata.service"
15
16S = "${WORKDIR}/git"
17
Andrew Geisslerc87764f2020-06-27 00:16:32 -050018DEPENDS += "zlib util-linux libuv"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050019
Brad Bishop26bdd442019-08-16 17:08:17 -040020inherit pkgconfig autotools-brokensep useradd systemd
Brad Bishop19323692019-04-05 15:28:33 -040021
Patrick Williams213cb262021-08-07 19:21:33 -050022LIBS:toolchain-clang:x86 = "-latomic"
23LIBS:riscv64 = "-latomic"
24LIBS:riscv32 = "-latomic"
Brad Bishopa891d152019-09-13 06:17:45 -040025export LIBS
26
Patrick Williamsddad1a12017-02-23 20:36:32 -060027#systemd
28SYSTEMD_PACKAGES = "${PN}"
Patrick Williams213cb262021-08-07 19:21:33 -050029SYSTEMD_SERVICE:${PN} = "netdata.service"
30SYSTEMD_AUTO_ENABLE:${PN} = "enable"
Patrick Williamsddad1a12017-02-23 20:36:32 -060031
32#User specific
33USERADD_PACKAGES = "${PN}"
Patrick Williams213cb262021-08-07 19:21:33 -050034GROUPADD_PARAM:${PN} = "--system netdata"
Patrick Williamsddad1a12017-02-23 20:36:32 -060035
Patrick Williams213cb262021-08-07 19:21:33 -050036do_install:append() {
Patrick Williamsddad1a12017-02-23 20:36:32 -060037 #set S UID for plugins
38 chmod 4755 ${D}${libexecdir}/netdata/plugins.d/apps.plugin
39
40 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
41 # Install systemd unit files
42 install -d ${D}${systemd_unitdir}/system
43 install -m 0644 ${WORKDIR}/netdata.service ${D}${systemd_unitdir}/system
44 sed -i -e 's,@@datadir,${datadir_native},g' ${D}${systemd_unitdir}/system/netdata.service
45 fi
46
47 # Install default netdata.conf
48 install -d ${D}${sysconfdir}/netdata
49 install -m 0644 ${WORKDIR}/netdata.conf ${D}${sysconfdir}/netdata/
50 sed -i -e 's,@@sysconfdir,${sysconfdir},g' ${D}${sysconfdir}/netdata/netdata.conf
51 sed -i -e 's,@@libdir,${libexecdir},g' ${D}${sysconfdir}/netdata/netdata.conf
52 sed -i -e 's,@@datadir,${datadir},g' ${D}${sysconfdir}/netdata/netdata.conf
53}
54
Patrick Williams213cb262021-08-07 19:21:33 -050055RDEPENDS:${PN} = "bash zlib"