2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2012-05-11 05:29:31 +02:00
|
|
|
#
|
|
|
|
# collectd
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2012-05-11 05:29:31 +02:00
|
|
|
|
2019-10-04 20:31:07 +02:00
|
|
|
COLLECTD_VERSION = 5.9.2
|
2019-10-11 19:01:07 +02:00
|
|
|
COLLECTD_SITE = \
|
|
|
|
https://github.com/collectd/collectd/releases/download/collectd-$(COLLECTD_VERSION)
|
|
|
|
COLLECTD_SOURCE = collectd-$(COLLECTD_VERSION).tar.bz2
|
2012-05-11 05:29:31 +02:00
|
|
|
COLLECTD_CONF_ENV = ac_cv_lib_yajl_yajl_alloc=yes
|
2013-02-14 05:11:21 +01:00
|
|
|
COLLECTD_INSTALL_STAGING = YES
|
2018-06-24 14:03:23 +02:00
|
|
|
COLLECTD_LICENSE = MIT (daemon, plugins), GPL-2.0 (plugins), LGPL-2.1 (plugins)
|
2019-08-04 17:09:57 +02:00
|
|
|
COLLECTD_LICENSE_FILES = COPYING
|
2019-08-06 19:41:55 +02:00
|
|
|
# We're patching configure.ac
|
|
|
|
COLLECTD_AUTORECONF = YES
|
2012-05-11 05:29:31 +02:00
|
|
|
|
|
|
|
# These require unmet dependencies, are fringe, pointless or deprecated
|
2014-12-30 08:36:23 +01:00
|
|
|
COLLECTD_PLUGINS_DISABLE = \
|
2019-06-09 18:57:30 +02:00
|
|
|
apple_sensors aquaero ascent barometer dbi dpdkstat email \
|
2019-10-28 16:29:35 +01:00
|
|
|
gmond hddtemp intel_rdt ipmi java lpar \
|
2016-12-22 02:59:19 +01:00
|
|
|
madwifi mbmon mic multimeter netapp notify_desktop numa \
|
2019-06-10 17:45:29 +02:00
|
|
|
nut oracle perl pf pinba powerdns python routeros \
|
2015-03-03 14:18:16 +01:00
|
|
|
rrdcached sigrok tape target_v5upgrade teamspeak2 ted \
|
2015-06-25 23:53:02 +02:00
|
|
|
tokyotyrant turbostat uuid varnish virt vserver write_kafka \
|
2019-06-10 00:51:19 +02:00
|
|
|
write_mongodb xencpu xmms zfs_arc zone
|
2012-05-11 05:29:31 +02:00
|
|
|
|
2014-07-19 16:29:57 +02:00
|
|
|
COLLECTD_CONF_ENV += LIBS="-lm"
|
2014-02-15 11:49:36 +01:00
|
|
|
|
2017-11-07 21:04:42 +01:00
|
|
|
#
|
|
|
|
# NOTE: There's also a third availible setting "intswap", which might
|
|
|
|
# be needed on some old ARM hardware (see [2]), but is not being
|
|
|
|
# accounted for as per discussion [1]
|
|
|
|
#
|
|
|
|
# [1] http://lists.busybox.net/pipermail/buildroot/2017-November/206100.html
|
|
|
|
# [2] http://lists.busybox.net/pipermail/buildroot/2017-November/206251.html
|
|
|
|
#
|
|
|
|
ifeq ($(BR2_ENDIAN),"BIG")
|
|
|
|
COLLECTD_FP_LAYOUT=endianflip
|
|
|
|
else
|
|
|
|
COLLECTD_FP_LAYOUT=nothing
|
|
|
|
endif
|
|
|
|
|
2014-12-30 08:36:23 +01:00
|
|
|
COLLECTD_CONF_OPTS += \
|
|
|
|
--with-nan-emulation \
|
2017-11-07 21:04:42 +01:00
|
|
|
--with-fp-layout=$(COLLECTD_FP_LAYOUT) \
|
2014-10-18 00:36:33 +02:00
|
|
|
--with-perl-bindings=no \
|
2018-06-24 17:44:52 +02:00
|
|
|
--disable-werror \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(foreach p, $(COLLECTD_PLUGINS_DISABLE), --disable-$(p)) \
|
2013-04-11 06:41:36 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_AGGREGATION),--enable-aggregation,--disable-aggregation) \
|
2019-06-09 18:57:30 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_AMQP),--enable-amqp,--disable-amqp) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_APACHE),--enable-apache,--disable-apache) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_APCUPS),--enable-apcups,--disable-apcups) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_BATTERY),--enable-battery,--disable-battery) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_BIND),--enable-bind,--disable-bind) \
|
2015-06-25 23:53:02 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_CEPH),--enable-ceph,--disable-ceph) \
|
2016-12-22 02:59:13 +01:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_CHRONY),--enable-chrony,--disable-chrony) \
|
2013-08-30 23:58:43 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_CGROUPS),--enable-cgroups,--disable-cgroups) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_CONNTRACK),--enable-conntrack,--disable-conntrack) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_CONTEXTSWITCH),--enable-contextswitch,--disable-contextswitch) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_CPU),--enable-cpu,--disable-cpu) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_CPUFREQ),--enable-cpufreq,--disable-cpufreq) \
|
2016-12-22 02:59:14 +01:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_CPUSLEEP),--enable-cpusleep,--disable-cpusleep) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_CSV),--enable-csv,--disable-csv) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_CURL),--enable-curl,--disable-curl) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_CURL_JSON),--enable-curl_json,--disable-curl_json) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_CURL_XML),--enable-curl_xml,--disable-curl_xml) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_DF),--enable-df,--disable-df) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_DISK),--enable-disk,--disable-disk) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_DNS),--enable-dns,--disable-dns) \
|
2015-06-25 23:53:02 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_DRBD),--enable-drbd,--disable-drbd) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_EMPTY_COUNTER),--enable-match_empty_counter,--disable-match_empty_counter) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_ENTROPY),--enable-entropy,--disable-entropy) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_ETHSTAT),--enable-ethstat,--disable-ethstat) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_EXEC),--enable-exec,--disable-exec) \
|
2015-06-25 23:53:02 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_FHCOUNT),--enable-fhcount,--disable-fhcount) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_FILECOUNT),--enable-filecount,--disable-filecount) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_FSCACHE),--enable-fscache,--disable-fscache) \
|
2016-12-22 02:59:20 +01:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_GPS),--enable-gps,--disable-gps) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_GRAPHITE),--enable-write_graphite,--disable-write_graphite) \
|
2019-06-10 17:45:28 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_GRPC),--enable-grpc,--disable-grpc) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_HASHED),--enable-match_hashed,--disable-match_hashed) \
|
2016-12-22 02:59:17 +01:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_HUGEPAGES),--enable-hugepages,--disable-hugepages) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_INTERFACE),--enable-interface,--disable-interface) \
|
2015-06-25 23:53:02 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_IPC),--enable-ipc,--disable-ipc) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_IPTABLES),--enable-iptables,--disable-iptables) \
|
2015-03-03 14:18:16 +01:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_IPVS),--enable-ipvs,--disable-ipvs) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_IRQ),--enable-irq,--disable-irq) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_LOAD),--enable-load,--disable-load) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_LOGFILE),--enable-logfile,--disable-logfile) \
|
2015-06-25 23:53:02 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_LOGSTASH),--enable-log_logstash,--disable-log_logstash) \
|
2019-06-10 17:45:30 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_LVM),--enable-lvm,--disable-lvm) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_MD),--enable-md,--disable-md) \
|
2014-07-19 16:35:34 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_MEMCACHEC),--enable-memcachec,--disable-memcachec) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_MEMCACHED),--enable-memcached,--disable-memcached) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_MEMORY),--enable-memory,--disable-memory) \
|
2015-03-03 14:18:16 +01:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_MODBUS),--enable-modbus,--disable-modbus) \
|
2016-12-22 02:59:15 +01:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_MQTT),--enable-mqtt,--disable-mqtt) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_MYSQL),--enable-mysql,--disable-mysql) \
|
2015-03-03 14:18:16 +01:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_NETLINK),--enable-netlink,--disable-netlink) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_NETWORK),--enable-network,--disable-network) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_NFS),--enable-nfs,--disable-nfs) \
|
2015-03-03 14:18:16 +01:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_NGINX),--enable-nginx,--disable-nginx) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_NOTIFICATION),--enable-target_notification,--disable-target_notification) \
|
2013-04-11 06:41:36 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_NOTIFY_EMAIL),--enable-notify_email,--disable-notify_email) \
|
2016-12-22 02:59:09 +01:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_NOTIFY_NAGIOS),--enable-notify_nagios,--disable-notify_nagios) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_NTPD),--enable-ntpd,--disable-ntpd) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_OLSRD),--enable-olsrd,--disable-olsrd) \
|
2019-06-10 17:45:29 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_ONEWIRE),--enable-onewire,--disable-onewire) \
|
2015-06-25 23:53:02 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_OPENLDAP),--enable-openldap,--disable-openldap) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_OPENVPN),--enable-openvpn,--disable-openvpn) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_PING),--enable-ping,--disable-ping) \
|
2015-03-03 14:18:16 +01:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_POSTGRESQL),--enable-postgresql,--disable-postgresql) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_PROCESSES),--enable-processes,--disable-processes) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_PROTOCOLS),--enable-protocols,--disable-protocols) \
|
2019-06-10 00:51:18 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_REDIS),--enable-redis,--disable-redis) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_REGEX),--enable-match_regex,--disable-match-regex) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_REPLACE),--enable-target_replace,--disable-target_replace) \
|
2013-04-11 06:41:36 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_RIEMANN),--enable-write_riemann,--disable-write_riemann) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_RRDTOOL),--enable-rrdtool,--disable-rrdtool) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_SCALE),--enable-target_scale,--disable-target_scale) \
|
2013-11-05 16:48:09 +01:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_SENSORS),--enable-sensors,--disable-sensors) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_SERIAL),--enable-serial,--disable-serial) \
|
2013-08-30 23:58:43 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_STATSD),--enable-statsd,--disable-statsd) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_SET),--enable-target_set,--disable-target_set) \
|
2015-06-25 23:53:02 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_SMART),--enable-smart,--disable-smart) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_SNMP),--enable-snmp,--disable-snmp) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_SWAP),--enable-swap,--disable-swap) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_SYSLOG),--enable-syslog,--disable-syslog) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_TABLE),--enable-table,--disable-table) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_TAIL),--enable-tail,--disable-tail) \
|
2013-04-11 06:41:36 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_TAIL_CSV),--enable-tail_csv,--disable-tail_csv) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_TCPCONNS),--enable-tcpconns,--disable-tcpconns) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_THERMAL),--enable-thermal,--disable-thermal) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_THRESHOLD),--enable-threshold,--disable-threshold) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_TIMEDIFF),--enable-match_timediff,--disable-match_timediff) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_UNIXSOCK),--enable-unixsock,--disable-unixsock) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_UPTIME),--enable-uptime,--disable-uptime) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_USERS),--enable-users,--disable-users) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_VALUE),--enable-match_value,--disable-match_value) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_VMEM),--enable-vmem,--disable-vmem) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_WIRELESS),--enable-wireless,--disable-wireless) \
|
2015-06-25 23:53:02 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_WRITEHTTP),--enable-write_http,--disable-write_http) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_WRITELOG),--enable-write_log,--disable-write_log) \
|
2016-12-22 02:59:21 +01:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_WRITEPROMETHEUS),--enable-write_prometheus,--disable-write_prometheus) \
|
2019-06-10 00:51:19 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_WRITEREDIS),--enable-write_redis,--disable-write_redis) \
|
2015-06-25 23:53:02 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_WRITESENSU),--enable-write_sensu,--disable-write_sensu) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_WRITETSDB),--enable-write_tsdb,--disable-write_tsdb) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_ZOOKEEPER),--enable-zookeeper,--disable-zookeeper)
|
2012-05-11 05:29:31 +02:00
|
|
|
|
2014-12-30 08:36:23 +01:00
|
|
|
COLLECTD_DEPENDENCIES = \
|
|
|
|
host-pkgconf \
|
2019-06-09 18:57:30 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_AMQP),rabbitmq-c) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_APACHE),libcurl) \
|
2012-06-02 06:37:13 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_BIND),libcurl libxml2) \
|
2015-06-25 23:53:02 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_CEPH),yajl) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_CURL),libcurl) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_CURL_JSON),libcurl yajl) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_CURL_XML),libcurl libxml2) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_DNS),libpcap) \
|
2016-12-22 02:59:20 +01:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_GPS),gpsd) \
|
2019-06-10 17:45:28 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_GRPC),grpc) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_IPTABLES),iptables) \
|
2015-06-25 23:53:02 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_LOGSTASH),yajl) \
|
2019-06-10 17:45:30 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_LVM),lvm2) \
|
2014-07-19 16:35:34 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_MEMCACHEC),libmemcached) \
|
2015-03-03 14:18:16 +01:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_MODBUS),libmodbus) \
|
2016-12-22 02:59:15 +01:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_MQTT),mosquitto) \
|
2014-01-22 07:24:35 +01:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_MYSQL),mysql) \
|
2015-03-03 14:18:16 +01:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_NETLINK),libmnl) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_NGINX),libcurl) \
|
2013-04-11 06:41:36 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_NOTIFY_EMAIL),libesmtp) \
|
2019-06-10 17:45:29 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_ONEWIRE),owfs) \
|
2015-06-25 23:53:02 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_OPENLDAP),openldap) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_PING),liboping) \
|
2015-03-03 14:18:16 +01:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_POSTGRESQL),postgresql) \
|
2019-06-10 00:51:18 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_REDIS),hiredis) \
|
2016-12-28 23:18:06 +01:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_RIEMANN),libtool riemann-c-client) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_RRDTOOL),rrdtool) \
|
2013-11-05 16:48:09 +01:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_SENSORS),lm-sensors) \
|
2015-06-25 23:53:02 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_SMART),libatasmart) \
|
2012-05-11 05:29:31 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_SNMP),netsnmp) \
|
2016-12-22 02:59:21 +01:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_WRITEHTTP),libcurl) \
|
2019-06-10 00:51:19 +02:00
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_WRITEPROMETHEUS),libmicrohttpd protobuf-c) \
|
|
|
|
$(if $(BR2_PACKAGE_COLLECTD_WRITEREDIS),hiredis)
|
2012-05-11 05:29:31 +02:00
|
|
|
|
|
|
|
# include/library fixups
|
2019-06-10 17:45:28 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_GRPC),y)
|
|
|
|
COLLECTD_CONF_OPTS += --with-libgrpc++=$(STAGING_DIR)/usr
|
|
|
|
endif
|
2012-05-11 05:29:31 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBCURL),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
COLLECTD_CONF_OPTS += --with-libcurl=$(STAGING_DIR)/usr
|
2012-05-11 05:29:31 +02:00
|
|
|
endif
|
2014-01-22 07:24:35 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_MYSQL),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
COLLECTD_CONF_OPTS += --with-libmysql=$(STAGING_DIR)/usr
|
2012-05-11 05:29:31 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_NETSNMP),y)
|
2016-12-25 14:54:34 +01:00
|
|
|
COLLECTD_CONF_OPTS += --with-libnetsnmp=$(STAGING_DIR)/usr
|
2012-05-11 05:29:31 +02:00
|
|
|
endif
|
2015-03-10 23:08:07 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_POSTGRESQL),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
COLLECTD_CONF_OPTS += --with-libpq=$(STAGING_DIR)/usr/bin/pg_config
|
2015-03-17 22:44:05 +01:00
|
|
|
COLLECTD_CONF_ENV += LIBS="-lpthread -lm"
|
2015-03-10 23:08:07 +01:00
|
|
|
endif
|
2012-05-11 05:29:31 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_YAJL),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
COLLECTD_CONF_OPTS += --with-yajl=$(STAGING_DIR)/usr
|
2012-05-11 05:29:31 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
# network can use libgcrypt
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
COLLECTD_DEPENDENCIES += libgcrypt
|
2017-01-10 14:06:46 +01:00
|
|
|
COLLECTD_CONF_OPTS += --with-libgcrypt=$(STAGING_DIR)/usr/bin/libgcrypt-config
|
2014-12-12 23:51:33 +01:00
|
|
|
else
|
2015-03-31 09:21:57 +02:00
|
|
|
COLLECTD_CONF_OPTS += --with-libgcrypt=no
|
2012-05-11 05:29:31 +02:00
|
|
|
endif
|
|
|
|
|
2019-10-28 16:29:35 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LUA),y)
|
|
|
|
COLLECTD_DEPENDENCIES += lua
|
|
|
|
COLLECTD_CONF_OPTS += --enable-lua
|
|
|
|
else
|
|
|
|
COLLECTD_CONF_OPTS += --disable-lua
|
|
|
|
endif
|
|
|
|
|
2012-05-11 05:29:31 +02:00
|
|
|
define COLLECTD_INSTALL_TARGET_CMDS
|
2016-10-17 18:06:57 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
|
2012-05-11 05:29:31 +02:00
|
|
|
rm -f $(TARGET_DIR)/usr/bin/collectd-nagios
|
|
|
|
rm -f $(TARGET_DIR)/usr/share/collectd/postgresql_default.conf
|
|
|
|
endef
|
|
|
|
|
2016-02-21 14:09:15 +01:00
|
|
|
define COLLECTD_INSTALL_INIT_SYSTEMD
|
|
|
|
$(INSTALL) -D -m 644 package/collectd/collectd.service \
|
|
|
|
$(TARGET_DIR)/usr/lib/systemd/system/collectd.service
|
|
|
|
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
|
|
|
ln -fs ../../../../usr/lib/systemd/system/collectd.service \
|
|
|
|
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/collectd.service
|
|
|
|
endef
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|