collectd_5.12.0.bb 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. SUMMARY = "Collects and summarises system performance statistics"
  2. DESCRIPTION = "collectd is a daemon which collects system performance statistics periodically and provides mechanisms to store the values in a variety of ways, for example in RRD files."
  3. LICENSE = "GPLv2 & MIT"
  4. LIC_FILES_CHKSUM = "file://COPYING;md5=1bd21f19f7f0c61a7be8ecacb0e28854"
  5. DEPENDS = "rrdtool curl libpcap libxml2 yajl libgcrypt libtool lvm2"
  6. SRC_URI = "http://collectd.org/files/collectd-${PV}.tar.bz2 \
  7. file://collectd.init \
  8. file://collectd.service \
  9. file://no-gcrypt-badpath.patch \
  10. file://0001-fix-to-build-with-glibc-2.25.patch \
  11. file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \
  12. file://0005-Disable-new-gcc8-warnings.patch \
  13. file://0006-libcollectdclient-Fix-string-overflow-errors.patch \
  14. file://0001-Remove-including-sys-sysctl.h-on-glibc-based-systems.patch \
  15. "
  16. SRC_URI[md5sum] = "2b23a65960bc323d065234776a542e04"
  17. SRC_URI[sha256sum] = "5bae043042c19c31f77eb8464e56a01a5454e0b39fa07cf7ad0f1bfc9c3a09d6"
  18. inherit autotools python3native update-rc.d pkgconfig systemd
  19. SYSTEMD_SERVICE_${PN} = "collectd.service"
  20. # Floatingpoint layout, architecture dependent
  21. # 'nothing', 'endianflip' or 'intswap'
  22. FPLAYOUT ?= "--with-fp-layout=nothing"
  23. PACKAGECONFIG ??= ""
  24. PACKAGECONFIG[openjdk] = "--with-java=${STAGING_DIR_TARGET}${libdir}/jvm,--without-java,openjdk-7"
  25. PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp --with-libnetsnmp=no,net-snmp"
  26. PACKAGECONFIG[libmemcached] = "--with-libmemcached,--without-libmemcached,libmemcached"
  27. PACKAGECONFIG[iptables] = "--enable-iptables,--disable-iptables,iptables"
  28. PACKAGECONFIG[postgresql] = "--enable-postgresql --with-libpq=yes, \
  29. --disable-postgresql --with-libpq=no,postgresql"
  30. PACKAGECONFIG[mysql] = "--enable-mysql --with-libmysql=yes, \
  31. --disable-mysql --with-libmysql=no,mysql5"
  32. PACKAGECONFIG[dbi] = "--enable-dbi,--disable-dbi,libdbi"
  33. PACKAGECONFIG[modbus] = "--enable-modbus,--disable-modbus,libmodbus"
  34. PACKAGECONFIG[libowcapi] = "--with-libowcapi,--without-libowcapi,owfs"
  35. PACKAGECONFIG[sensors] = "--enable-sensors --with-libsensors=yes, \
  36. --disable-sensors --with-libsensors=no,lmsensors"
  37. PACKAGECONFIG[amqp] = "--enable-amqp --with-librabbitmq=yes, \
  38. --disable-amqp --with-librabbitmq=no,rabbitmq-c"
  39. # protobuf-c, libvirt that are currently only available in meta-virtualization layer
  40. PACKAGECONFIG[pinba] = "--enable-pinba,--disable-pinba,protobuf-c-native protobuf-c"
  41. PACKAGECONFIG[libvirt] = "--enable-virt,--disable-virt,libvirt"
  42. PACKAGECONFIG[libesmtp] = "--with-libesmtp,--without-libesmtp,libesmtp"
  43. PACKAGECONFIG[libmnl] = "--with-libmnl,--without-libmnl,libmnl"
  44. PACKAGECONFIG[libatasmart] = "--with-libatasmart,--without-libatasmart,libatasmart"
  45. PACKAGECONFIG[ldap] = "--enable-openldap --with-libldap,--disable-openldap --without-libldap, openldap"
  46. PACKAGECONFIG[rrdtool] = "--enable-rrdtool,--disable-rrdtool,rrdtool"
  47. PACKAGECONFIG[rrdcached] = "--enable-rrdcached,--disable-rrdcached,rrdcached"
  48. EXTRA_OECONF = " \
  49. ${FPLAYOUT} \
  50. --disable-perl --with-libperl=no --with-perl-bindings=no \
  51. --with-libgcrypt=${STAGING_BINDIR_CROSS}/libgcrypt-config \
  52. --disable-notify_desktop --disable-werror \
  53. "
  54. do_install_append() {
  55. install -d ${D}${sysconfdir}/init.d
  56. install -m 0755 ${WORKDIR}/collectd.init ${D}${sysconfdir}/init.d/collectd
  57. sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/collectd
  58. sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/collectd
  59. sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/collectd
  60. sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/collectd
  61. install -Dm 0640 ${B}/src/collectd.conf ${D}${sysconfdir}/collectd.conf
  62. # Fix configuration file to allow collectd to start up
  63. sed -i 's!^#FQDNLookup[ \t]*true!FQDNLookup false!g' ${D}${sysconfdir}/collectd.conf
  64. rmdir "${D}${localstatedir}/run"
  65. rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
  66. # Install systemd unit files
  67. install -d ${D}${systemd_unitdir}/system
  68. install -m 0644 ${WORKDIR}/collectd.service ${D}${systemd_unitdir}/system
  69. sed -i -e 's,@SBINDIR@,${sbindir},g' \
  70. ${D}${systemd_unitdir}/system/collectd.service
  71. }
  72. CONFFILES_${PN} = "${sysconfdir}/collectd.conf"
  73. INITSCRIPT_NAME = "collectd"
  74. INITSCRIPT_PARAMS = "defaults"
  75. # threshold.so load.so are also provided by gegl
  76. # disk.so is also provided by libgphoto2-camlibs
  77. PRIVATE_LIBS = "threshold.so load.so disk.so"