package/dhcp/S80dhcp-server: allow empty INTERFACES
[buildroot-gz.git] / package / collectd / collectd.mk
blobd7fd8f93bbe58acef67534401e2d385647de4ab9
1 ################################################################################
3 # collectd
5 ################################################################################
7 COLLECTD_VERSION = 5.5.0
8 COLLECTD_SITE = http://collectd.org/files
9 COLLECTD_SOURCE = collectd-$(COLLECTD_VERSION).tar.bz2
10 COLLECTD_CONF_ENV = ac_cv_lib_yajl_yajl_alloc=yes
11 COLLECTD_INSTALL_STAGING = YES
12 COLLECTD_LICENSE = GPLv2, LGPLv2.1
13 COLLECTD_LICENSE_FILES = COPYING
14 # For 0001-build-add-libavltree-libcommon-libheap-dependencies.patch
15 COLLECTD_AUTORECONF = YES
17 # These require unmet dependencies, are fringe, pointless or deprecated
18 COLLECTD_PLUGINS_DISABLE = \
19 amqp apple_sensors aquaero ascent barometer dbi email \
20 gmond hddtemp ipmi java libvirt lpar lvm madwifi mbmon \
21 mic multimeter netapp notify_desktop notify_email numa \
22 nut onewire oracle perl pf pinba powerdns python redis routeros \
23 rrdcached sigrok tape target_v5upgrade teamspeak2 ted \
24 tokyotyrant turbostat uuid varnish virt vserver write_kafka \
25 write_mongodb write_redis xmms zfs_arc
27 COLLECTD_CONF_ENV += LIBS="-lm"
29 COLLECTD_CONF_OPTS += \
30 --with-nan-emulation \
31 --with-fp-layout=nothing \
32 --with-perl-bindings=no \
33 $(foreach p, $(COLLECTD_PLUGINS_DISABLE), --disable-$(p)) \
34 $(if $(BR2_PACKAGE_COLLECTD_AGGREGATION),--enable-aggregation,--disable-aggregation) \
35 $(if $(BR2_PACKAGE_COLLECTD_APACHE),--enable-apache,--disable-apache) \
36 $(if $(BR2_PACKAGE_COLLECTD_APCUPS),--enable-apcups,--disable-apcups) \
37 $(if $(BR2_PACKAGE_COLLECTD_BATTERY),--enable-battery,--disable-battery) \
38 $(if $(BR2_PACKAGE_COLLECTD_BIND),--enable-bind,--disable-bind) \
39 $(if $(BR2_PACKAGE_COLLECTD_CEPH),--enable-ceph,--disable-ceph) \
40 $(if $(BR2_PACKAGE_COLLECTD_CGROUPS),--enable-cgroups,--disable-cgroups) \
41 $(if $(BR2_PACKAGE_COLLECTD_CONNTRACK),--enable-conntrack,--disable-conntrack) \
42 $(if $(BR2_PACKAGE_COLLECTD_CONTEXTSWITCH),--enable-contextswitch,--disable-contextswitch) \
43 $(if $(BR2_PACKAGE_COLLECTD_CPU),--enable-cpu,--disable-cpu) \
44 $(if $(BR2_PACKAGE_COLLECTD_CPUFREQ),--enable-cpufreq,--disable-cpufreq) \
45 $(if $(BR2_PACKAGE_COLLECTD_CSV),--enable-csv,--disable-csv) \
46 $(if $(BR2_PACKAGE_COLLECTD_CURL),--enable-curl,--disable-curl) \
47 $(if $(BR2_PACKAGE_COLLECTD_CURL_JSON),--enable-curl_json,--disable-curl_json) \
48 $(if $(BR2_PACKAGE_COLLECTD_CURL_XML),--enable-curl_xml,--disable-curl_xml) \
49 $(if $(BR2_PACKAGE_COLLECTD_DF),--enable-df,--disable-df) \
50 $(if $(BR2_PACKAGE_COLLECTD_DISK),--enable-disk,--disable-disk) \
51 $(if $(BR2_PACKAGE_COLLECTD_DNS),--enable-dns,--disable-dns) \
52 $(if $(BR2_PACKAGE_COLLECTD_DRBD),--enable-drbd,--disable-drbd) \
53 $(if $(BR2_PACKAGE_COLLECTD_EMPTY_COUNTER),--enable-match_empty_counter,--disable-match_empty_counter) \
54 $(if $(BR2_PACKAGE_COLLECTD_ENTROPY),--enable-entropy,--disable-entropy) \
55 $(if $(BR2_PACKAGE_COLLECTD_ETHSTAT),--enable-ethstat,--disable-ethstat) \
56 $(if $(BR2_PACKAGE_COLLECTD_EXEC),--enable-exec,--disable-exec) \
57 $(if $(BR2_PACKAGE_COLLECTD_FHCOUNT),--enable-fhcount,--disable-fhcount) \
58 $(if $(BR2_PACKAGE_COLLECTD_FILECOUNT),--enable-filecount,--disable-filecount) \
59 $(if $(BR2_PACKAGE_COLLECTD_FSCACHE),--enable-fscache,--disable-fscache) \
60 $(if $(BR2_PACKAGE_COLLECTD_GRAPHITE),--enable-write_graphite,--disable-write_graphite) \
61 $(if $(BR2_PACKAGE_COLLECTD_HASHED),--enable-match_hashed,--disable-match_hashed) \
62 $(if $(BR2_PACKAGE_COLLECTD_INTERFACE),--enable-interface,--disable-interface) \
63 $(if $(BR2_PACKAGE_COLLECTD_IPC),--enable-ipc,--disable-ipc) \
64 $(if $(BR2_PACKAGE_COLLECTD_IPTABLES),--enable-iptables,--disable-iptables) \
65 $(if $(BR2_PACKAGE_COLLECTD_IPVS),--enable-ipvs,--disable-ipvs) \
66 $(if $(BR2_PACKAGE_COLLECTD_IRQ),--enable-irq,--disable-irq) \
67 $(if $(BR2_PACKAGE_COLLECTD_LOAD),--enable-load,--disable-load) \
68 $(if $(BR2_PACKAGE_COLLECTD_LOGFILE),--enable-logfile,--disable-logfile) \
69 $(if $(BR2_PACKAGE_COLLECTD_LOGSTASH),--enable-log_logstash,--disable-log_logstash) \
70 $(if $(BR2_PACKAGE_COLLECTD_MD),--enable-md,--disable-md) \
71 $(if $(BR2_PACKAGE_COLLECTD_MEMCACHEC),--enable-memcachec,--disable-memcachec) \
72 $(if $(BR2_PACKAGE_COLLECTD_MEMCACHED),--enable-memcached,--disable-memcached) \
73 $(if $(BR2_PACKAGE_COLLECTD_MEMORY),--enable-memory,--disable-memory) \
74 $(if $(BR2_PACKAGE_COLLECTD_MODBUS),--enable-modbus,--disable-modbus) \
75 $(if $(BR2_PACKAGE_COLLECTD_MYSQL),--enable-mysql,--disable-mysql) \
76 $(if $(BR2_PACKAGE_COLLECTD_NETLINK),--enable-netlink,--disable-netlink) \
77 $(if $(BR2_PACKAGE_COLLECTD_NETWORK),--enable-network,--disable-network) \
78 $(if $(BR2_PACKAGE_COLLECTD_NFS),--enable-nfs,--disable-nfs) \
79 $(if $(BR2_PACKAGE_COLLECTD_NGINX),--enable-nginx,--disable-nginx) \
80 $(if $(BR2_PACKAGE_COLLECTD_NOTIFICATION),--enable-target_notification,--disable-target_notification) \
81 $(if $(BR2_PACKAGE_COLLECTD_NOTIFY_EMAIL),--enable-notify_email,--disable-notify_email) \
82 $(if $(BR2_PACKAGE_COLLECTD_NTPD),--enable-ntpd,--disable-ntpd) \
83 $(if $(BR2_PACKAGE_COLLECTD_OLSRD),--enable-olsrd,--disable-olsrd) \
84 $(if $(BR2_PACKAGE_COLLECTD_OPENLDAP),--enable-openldap,--disable-openldap) \
85 $(if $(BR2_PACKAGE_COLLECTD_OPENVPN),--enable-openvpn,--disable-openvpn) \
86 $(if $(BR2_PACKAGE_COLLECTD_PING),--enable-ping,--disable-ping) \
87 $(if $(BR2_PACKAGE_COLLECTD_POSTGRESQL),--enable-postgresql,--disable-postgresql) \
88 $(if $(BR2_PACKAGE_COLLECTD_PROCESSES),--enable-processes,--disable-processes) \
89 $(if $(BR2_PACKAGE_COLLECTD_PROTOCOLS),--enable-protocols,--disable-protocols) \
90 $(if $(BR2_PACKAGE_COLLECTD_REGEX),--enable-match_regex,--disable-match-regex) \
91 $(if $(BR2_PACKAGE_COLLECTD_REPLACE),--enable-target_replace,--disable-target_replace) \
92 $(if $(BR2_PACKAGE_COLLECTD_RIEMANN),--enable-write_riemann,--disable-write_riemann) \
93 $(if $(BR2_PACKAGE_COLLECTD_RRDTOOL),--enable-rrdtool,--disable-rrdtool) \
94 $(if $(BR2_PACKAGE_COLLECTD_SCALE),--enable-target_scale,--disable-target_scale) \
95 $(if $(BR2_PACKAGE_COLLECTD_SENSORS),--enable-sensors,--disable-sensors) \
96 $(if $(BR2_PACKAGE_COLLECTD_SERIAL),--enable-serial,--disable-serial) \
97 $(if $(BR2_PACKAGE_COLLECTD_STATSD),--enable-statsd,--disable-statsd) \
98 $(if $(BR2_PACKAGE_COLLECTD_SET),--enable-target_set,--disable-target_set) \
99 $(if $(BR2_PACKAGE_COLLECTD_SMART),--enable-smart,--disable-smart) \
100 $(if $(BR2_PACKAGE_COLLECTD_SNMP),--enable-snmp,--disable-snmp) \
101 $(if $(BR2_PACKAGE_COLLECTD_SWAP),--enable-swap,--disable-swap) \
102 $(if $(BR2_PACKAGE_COLLECTD_SYSLOG),--enable-syslog,--disable-syslog) \
103 $(if $(BR2_PACKAGE_COLLECTD_TABLE),--enable-table,--disable-table) \
104 $(if $(BR2_PACKAGE_COLLECTD_TAIL),--enable-tail,--disable-tail) \
105 $(if $(BR2_PACKAGE_COLLECTD_TAIL_CSV),--enable-tail_csv,--disable-tail_csv) \
106 $(if $(BR2_PACKAGE_COLLECTD_TCPCONNS),--enable-tcpconns,--disable-tcpconns) \
107 $(if $(BR2_PACKAGE_COLLECTD_THERMAL),--enable-thermal,--disable-thermal) \
108 $(if $(BR2_PACKAGE_COLLECTD_THRESHOLD),--enable-threshold,--disable-threshold) \
109 $(if $(BR2_PACKAGE_COLLECTD_TIMEDIFF),--enable-match_timediff,--disable-match_timediff) \
110 $(if $(BR2_PACKAGE_COLLECTD_UNIXSOCK),--enable-unixsock,--disable-unixsock) \
111 $(if $(BR2_PACKAGE_COLLECTD_UPTIME),--enable-uptime,--disable-uptime) \
112 $(if $(BR2_PACKAGE_COLLECTD_USERS),--enable-users,--disable-users) \
113 $(if $(BR2_PACKAGE_COLLECTD_VALUE),--enable-match_value,--disable-match_value) \
114 $(if $(BR2_PACKAGE_COLLECTD_VMEM),--enable-vmem,--disable-vmem) \
115 $(if $(BR2_PACKAGE_COLLECTD_WIRELESS),--enable-wireless,--disable-wireless) \
116 $(if $(BR2_PACKAGE_COLLECTD_WRITEHTTP),--enable-write_http,--disable-write_http) \
117 $(if $(BR2_PACKAGE_COLLECTD_WRITELOG),--enable-write_log,--disable-write_log) \
118 $(if $(BR2_PACKAGE_COLLECTD_WRITESENSU),--enable-write_sensu,--disable-write_sensu) \
119 $(if $(BR2_PACKAGE_COLLECTD_WRITETSDB),--enable-write_tsdb,--disable-write_tsdb) \
120 $(if $(BR2_PACKAGE_COLLECTD_ZOOKEEPER),--enable-zookeeper,--disable-zookeeper)
122 COLLECTD_DEPENDENCIES = \
123 host-pkgconf \
124 $(if $(BR2_PACKAGE_COLLECTD_APACHE),libcurl) \
125 $(if $(BR2_PACKAGE_COLLECTD_BIND),libcurl libxml2) \
126 $(if $(BR2_PACKAGE_COLLECTD_CEPH),yajl) \
127 $(if $(BR2_PACKAGE_COLLECTD_CURL),libcurl) \
128 $(if $(BR2_PACKAGE_COLLECTD_CURL_JSON),libcurl yajl) \
129 $(if $(BR2_PACKAGE_COLLECTD_CURL_XML),libcurl libxml2) \
130 $(if $(BR2_PACKAGE_COLLECTD_DNS),libpcap) \
131 $(if $(BR2_PACKAGE_COLLECTD_IPTABLES),iptables) \
132 $(if $(BR2_PACKAGE_COLLECTD_LOGSTASH),yajl) \
133 $(if $(BR2_PACKAGE_COLLECTD_MEMCACHEC),libmemcached) \
134 $(if $(BR2_PACKAGE_COLLECTD_MODBUS),libmodbus) \
135 $(if $(BR2_PACKAGE_COLLECTD_MYSQL),mysql) \
136 $(if $(BR2_PACKAGE_COLLECTD_NETLINK),libmnl) \
137 $(if $(BR2_PACKAGE_COLLECTD_NGINX),libcurl) \
138 $(if $(BR2_PACKAGE_COLLECTD_NOTIFY_EMAIL),libesmtp) \
139 $(if $(BR2_PACKAGE_COLLECTD_OPENLDAP),openldap) \
140 $(if $(BR2_PACKAGE_COLLECTD_PING),liboping) \
141 $(if $(BR2_PACKAGE_COLLECTD_POSTGRESQL),postgresql) \
142 $(if $(BR2_PACKAGE_COLLECTD_RIEMANN),libtool protobuf-c) \
143 $(if $(BR2_PACKAGE_COLLECTD_RRDTOOL),rrdtool) \
144 $(if $(BR2_PACKAGE_COLLECTD_SENSORS),lm-sensors) \
145 $(if $(BR2_PACKAGE_COLLECTD_SMART),libatasmart) \
146 $(if $(BR2_PACKAGE_COLLECTD_SNMP),netsnmp) \
147 $(if $(BR2_PACKAGE_COLLECTD_WRITEHTTP),libcurl)
149 # include/library fixups
150 ifeq ($(BR2_PACKAGE_LIBCURL),y)
151 COLLECTD_CONF_OPTS += --with-libcurl=$(STAGING_DIR)/usr
152 endif
153 ifeq ($(BR2_PACKAGE_MYSQL),y)
154 COLLECTD_CONF_OPTS += --with-libmysql=$(STAGING_DIR)/usr
155 endif
156 ifeq ($(BR2_PACKAGE_NETSNMP),y)
157 COLLECTD_CONF_OPTS += --with-libnetsnmp=$(STAGING_DIR)/usr/bin/net-snmp-config
158 endif
159 ifeq ($(BR2_PACKAGE_POSTGRESQL),y)
160 COLLECTD_CONF_OPTS += --with-libpq=$(STAGING_DIR)/usr/bin/pg_config
161 COLLECTD_CONF_ENV += LIBS="-lpthread -lm"
162 endif
163 ifeq ($(BR2_PACKAGE_YAJL),y)
164 COLLECTD_CONF_OPTS += --with-yajl=$(STAGING_DIR)/usr
165 endif
167 # network can use libgcrypt
168 ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
169 COLLECTD_DEPENDENCIES += libgcrypt
170 COLLECTD_CONF_OPTS += --with-libgcrypt=$(STAGING_DIR)/usr
171 COLLECTD_CONF_ENV += LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config
172 else
173 COLLECTD_CONF_OPTS += --with-libgcrypt=no
174 endif
176 # released software should not break on minor warnings
177 define COLLECTD_DROP_WERROR
178 $(SED) 's/-Werror//' \
179 $(@D)/src/Makefile.in $(@D)/src/libcollectdclient/Makefile.in
180 endef
182 COLLECTD_POST_PATCH_HOOKS += COLLECTD_DROP_WERROR
184 define COLLECTD_INSTALL_TARGET_CMDS
185 $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
186 rm -f $(TARGET_DIR)/usr/bin/collectd-nagios
187 rm -f $(TARGET_DIR)/usr/share/collectd/postgresql_default.conf
188 endef
190 $(eval $(autotools-package))