diff options
Diffstat (limited to 'meta-oe/recipes-extended/collectd/collectd_5.5.0.bb')
| -rw-r--r-- | meta-oe/recipes-extended/collectd/collectd_5.5.0.bb | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/collectd/collectd_5.5.0.bb b/meta-oe/recipes-extended/collectd/collectd_5.5.0.bb new file mode 100644 index 0000000000..feda26be9f --- /dev/null +++ b/meta-oe/recipes-extended/collectd/collectd_5.5.0.bb | |||
| @@ -0,0 +1,80 @@ | |||
| 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://no-gcrypt-badpath.patch \ | ||
| 10 | file://collectd-version.patch \ | ||
| 11 | file://0001-redefine-the-dependence.patch \ | ||
| 12 | file://collectd.init \ | ||
| 13 | file://collectd.service" | ||
| 14 | SRC_URI[md5sum] = "c39305ef5514b44238b0d31f77e29e6a" | ||
| 15 | SRC_URI[sha256sum] = "847684cf5c10de1dc34145078af3fcf6e0d168ba98c14f1343b1062a4b569e88" | ||
| 16 | |||
| 17 | inherit autotools pythonnative update-rc.d pkgconfig systemd | ||
| 18 | |||
| 19 | SYSTEMD_SERVICE_${PN} = "collectd.service" | ||
| 20 | |||
| 21 | # Floatingpoint layout, architecture dependent | ||
| 22 | # 'nothing', 'endianflip' or 'intswap' | ||
| 23 | FPLAYOUT ?= "--with-fp-layout=nothing" | ||
| 24 | |||
| 25 | PACKAGECONFIG ??= "" | ||
| 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-libvirt,--disable-libvirt,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 | |||
| 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 | |||
| 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 | |||
| 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 | |||
| 65 | rmdir "${D}${localstatedir}/run" | ||
| 66 | rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" | ||
| 67 | |||
| 68 | # Install systemd unit files | ||
| 69 | install -d ${D}${systemd_unitdir}/system | ||
| 70 | install -m 0644 ${WORKDIR}/collectd.service ${D}${systemd_unitdir}/system | ||
| 71 | sed -i -e 's,@SBINDIR@,${sbindir},g' \ | ||
| 72 | ${D}${systemd_unitdir}/system/collectd.service | ||
| 73 | } | ||
| 74 | |||
| 75 | INITSCRIPT_NAME = "collectd" | ||
| 76 | INITSCRIPT_PARAMS = "defaults" | ||
| 77 | |||
| 78 | # threshold.so load.so are also provided by gegl | ||
| 79 | # disk.so is also provided by libgphoto2-camlibs | ||
| 80 | PRIVATE_LIBS = "threshold.so load.so disk.so" | ||
