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