netdata_git.bb 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. HOMEPAGE = "https://github.com/firehol/netdata/"
  2. SUMMARY = "Real-time performance monitoring"
  3. LICENSE = "GPLv3"
  4. LIC_FILES_CHKSUM = "file://LICENSE;md5=fc9b848046ef54b5eaee6071947abd24"
  5. SRC_URI = "git://github.com/firehol/netdata.git;protocol=https"
  6. SRCREV = "1be9200ba8e11dc81a2101d85a2725137d43f766"
  7. PV = "1.22.1"
  8. # default netdata.conf for netdata configuration
  9. SRC_URI += "file://netdata.conf"
  10. # file for providing systemd service support
  11. SRC_URI += "file://netdata.service"
  12. S = "${WORKDIR}/git"
  13. DEPENDS += "zlib util-linux libuv"
  14. inherit pkgconfig autotools-brokensep useradd systemd
  15. LIBS_toolchain-clang_x86 = "-latomic"
  16. LIBS_riscv64 = "-latomic"
  17. LIBS_riscv32 = "-latomic"
  18. export LIBS
  19. #systemd
  20. SYSTEMD_PACKAGES = "${PN}"
  21. SYSTEMD_SERVICE_${PN} = "netdata.service"
  22. SYSTEMD_AUTO_ENABLE_${PN} = "enable"
  23. #User specific
  24. USERADD_PACKAGES = "${PN}"
  25. GROUPADD_PARAM_${PN} = "--system netdata"
  26. do_install_append() {
  27. #set S UID for plugins
  28. chmod 4755 ${D}${libexecdir}/netdata/plugins.d/apps.plugin
  29. if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
  30. # Install systemd unit files
  31. install -d ${D}${systemd_unitdir}/system
  32. install -m 0644 ${WORKDIR}/netdata.service ${D}${systemd_unitdir}/system
  33. sed -i -e 's,@@datadir,${datadir_native},g' ${D}${systemd_unitdir}/system/netdata.service
  34. fi
  35. # Install default netdata.conf
  36. install -d ${D}${sysconfdir}/netdata
  37. install -m 0644 ${WORKDIR}/netdata.conf ${D}${sysconfdir}/netdata/
  38. sed -i -e 's,@@sysconfdir,${sysconfdir},g' ${D}${sysconfdir}/netdata/netdata.conf
  39. sed -i -e 's,@@libdir,${libexecdir},g' ${D}${sysconfdir}/netdata/netdata.conf
  40. sed -i -e 's,@@datadir,${datadir},g' ${D}${sysconfdir}/netdata/netdata.conf
  41. }
  42. RDEPENDS_${PN} = "bash zlib"