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