collectd_5.8.1.bb 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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-conditionally-check-libvirt.patch \
  11. file://0001-fix-to-build-with-glibc-2.25.patch \
  12. file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \
  13. file://0005-Disable-new-gcc8-warnings.patch \
  14. file://0006-libcollectdclient-Fix-string-overflow-errors.patch \
  15. file://0001-Remove-including-sys-sysctl.h-on-glibc-based-systems.patch \
  16. "
  17. SRC_URI[md5sum] = "bfce96c42cede5243028510bcc57c1e6"
  18. SRC_URI[sha256sum] = "e796fda27ce06377f491ad91aa286962a68c2b54076aa77a29673d53204453da"
  19. inherit autotools python3native update-rc.d pkgconfig systemd
  20. SYSTEMD_SERVICE_${PN} = "collectd.service"
  21. # Floatingpoint layout, architecture dependent
  22. # 'nothing', 'endianflip' or 'intswap'
  23. FPLAYOUT ?= "--with-fp-layout=nothing"
  24. PACKAGECONFIG ??= ""
  25. PACKAGECONFIG[openjdk] = "--with-java=${STAGING_DIR_TARGET}${libdir}/jvm,--without-java,openjdk-7"
  26. PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp --with-libnetsnmp=no,net-snmp"
  27. PACKAGECONFIG[libmemcached] = "--with-libmemcached,--without-libmemcached,libmemcached"
  28. PACKAGECONFIG[iptables] = "--enable-iptables,--disable-iptables,iptables"
  29. PACKAGECONFIG[postgresql] = "--enable-postgresql --with-libpq=yes, \
  30. --disable-postgresql --with-libpq=no,postgresql"
  31. PACKAGECONFIG[mysql] = "--enable-mysql --with-libmysql=yes, \
  32. --disable-mysql --with-libmysql=no,mysql5"
  33. PACKAGECONFIG[dbi] = "--enable-dbi,--disable-dbi,libdbi"
  34. PACKAGECONFIG[modbus] = "--enable-modbus,--disable-modbus,libmodbus"
  35. PACKAGECONFIG[libowcapi] = "--with-libowcapi,--without-libowcapi,owfs"
  36. PACKAGECONFIG[sensors] = "--enable-sensors --with-libsensors=yes, \
  37. --disable-sensors --with-libsensors=no,lmsensors"
  38. PACKAGECONFIG[amqp] = "--enable-amqp --with-librabbitmq=yes, \
  39. --disable-amqp --with-librabbitmq=no,rabbitmq-c"
  40. # protobuf-c, libvirt that are currently only available in meta-virtualization layer
  41. PACKAGECONFIG[pinba] = "--enable-pinba,--disable-pinba,protobuf-c-native protobuf-c"
  42. PACKAGECONFIG[libvirt] = "--enable-virt,--disable-virt,libvirt"
  43. PACKAGECONFIG[libesmtp] = "--with-libesmtp,--without-libesmtp,libesmtp"
  44. PACKAGECONFIG[libmnl] = "--with-libmnl,--without-libmnl,libmnl"
  45. PACKAGECONFIG[libatasmart] = "--with-libatasmart,--without-libatasmart,libatasmart"
  46. PACKAGECONFIG[ldap] = "--enable-openldap --with-libldap,--disable-openldap --without-libldap, openldap"
  47. EXTRA_OECONF = " \
  48. ${FPLAYOUT} \
  49. --disable-perl --with-libperl=no --with-perl-bindings=no \
  50. --with-libgcrypt=${STAGING_BINDIR_CROSS}/libgcrypt-config \
  51. --disable-notify_desktop \
  52. "
  53. do_install_append() {
  54. install -d ${D}${sysconfdir}/init.d
  55. install -m 0755 ${WORKDIR}/collectd.init ${D}${sysconfdir}/init.d/collectd
  56. sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/collectd
  57. sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/collectd
  58. sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/collectd
  59. sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/collectd
  60. install -Dm 0640 ${B}/src/collectd.conf ${D}${sysconfdir}/collectd.conf
  61. # Fix configuration file to allow collectd to start up
  62. sed -i 's!^#FQDNLookup[ \t]*true!FQDNLookup false!g' ${D}${sysconfdir}/collectd.conf
  63. rmdir "${D}${localstatedir}/run"
  64. rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
  65. # Install systemd unit files
  66. install -d ${D}${systemd_unitdir}/system
  67. install -m 0644 ${WORKDIR}/collectd.service ${D}${systemd_unitdir}/system
  68. sed -i -e 's,@SBINDIR@,${sbindir},g' \
  69. ${D}${systemd_unitdir}/system/collectd.service
  70. }
  71. CONFFILES_${PN} = "${sysconfdir}/collectd.conf"
  72. INITSCRIPT_NAME = "collectd"
  73. INITSCRIPT_PARAMS = "defaults"
  74. # threshold.so load.so are also provided by gegl
  75. # disk.so is also provided by libgphoto2-camlibs
  76. PRIVATE_LIBS = "threshold.so load.so disk.so"