2 # Copyright (C) 2006-2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=http
://collectd.org
/files
/
16 PKG_MD5SUM
:=f4193fdb5002ddac8159c88032a726bc
19 PKG_REMOVE_FILES
:=aclocal.m4 libltdl
/aclocal.m4
24 COLLECTD_PLUGINS_DISABLED
:= \
62 COLLECTD_PLUGINS_SELECTED
:= \
120 PKG_CONFIG_DEPENDS
:= \
121 $(patsubst %,CONFIG_PACKAGE_collectd-mod-
%,$(subst _
,-,$(COLLECTD_PLUGINS_SELECTED
))) \
123 include $(INCLUDE_DIR
)/package.mk
124 include $(INCLUDE_DIR
)/kernel.mk
126 define Package
/collectd
/Default
129 TITLE
:=Lightweight system statistics collection daemon
130 URL
:=http
://verplant.org
/collectd
/
133 define Package
/collectd
134 $(call Package
/collectd
/Default
)
135 DEPENDS
:= +libpthread
+zlib
+libltdl
+libip4tc
139 define Package
/collectd
/description
140 collectd is a small daemon which collects system information periodically
141 and provides mechanismns to store the values in a variety of ways.
144 ifneq ($(CONFIG_avr32
),)
145 TARGET_CFLAGS
+= -fsigned-char
148 # common configure args
152 --enable-getifaddrs \
153 --with-nan-emulation \
157 CFLAGS
="$$$$CFLAGS $(FPIC)" \
158 LDFLAGS
="$$$$LDFLAGS -lm -lz" \
159 KERNEL_DIR
="$(LINUX_DIR)" \
163 $(if
$(CONFIG_PACKAGE_collectd-mod-
$(subst _
,-,$(m
))),--enable-
$(m
),--disable-
$(m
)) \
167 $(call CONFIGURE_PLUGIN
,$(COLLECTD_PLUGINS_SELECTED
)) \
168 $(call CONFIGURE_PLUGIN
,$(COLLECTD_PLUGINS_DISABLED
)) \
170 # exception: mod-ascent needs libxml2
171 ifneq ($(CONFIG_PACKAGE_collectd-mod-ascent
),)
173 CPPFLAGS
="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/libxml2"
176 ifneq ($(CONFIG_BIG_ENDIAN
),)
177 CONFIGURE_ARGS
+= --with-fp-layout
=endianflip
179 CONFIGURE_ARGS
+= --with-fp-layout
=nothing
182 ifneq ($(CONFIG_PACKAGE_collectd-mod-postgresql
),)
183 CONFIGURE_ARGS
+= --with-libpq
="$(STAGING_DIR)/usr/"
186 ifneq ($(CONFIG_PACKAGE_collectd-mod-mysql
),)
187 CONFIGURE_ARGS
+= --with-libmysql
="$(STAGING_DIR)/usr/"
190 # exception: mod-netlink needs libnetlink from iproute
191 ifneq ($(CONFIG_PACKAGE_collectd-mod-netlink
),)
192 CONFIGURE_ARGS
+= --with-libnetlink
="$(STAGING_DIR)/usr"
195 # exception: mod-modbus needs libmodbus
196 ifneq ($(CONFIG_PACKAGE_collectd-mod-modbus
),)
197 CONFIGURE_ARGS
+= --with-libmodbus
="$(STAGING_DIR)/usr"
200 # exception: mod-onewire needs libow-capi
201 ifneq ($(CONFIG_PACKAGE_collectd-mod-onewire
),)
202 CONFIGURE_ARGS
+= --with-libowcapi
="$(STAGING_DIR)/usr"
205 # exception: mod-rrdtool needs rrdtool-1.0.x
206 ifneq ($(CONFIG_PACKAGE_collectd-mod-rrdtool
),)
207 CONFIGURE_ARGS
+= --with-librrd
="$(STAGING_DIR)/usr/lib/rrdtool-1.0"
210 define Package
/collectd
/conffiles
214 define Package
/collectd
/install
215 $(INSTALL_DIR
) $(1)/usr
/sbin
216 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/collectd
$(1)/usr
/sbin
/
217 $(INSTALL_DIR
) $(1)/usr
/share
/collectd
218 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/collectd
/types.db
$(1)/usr
/share
/collectd
/
219 $(INSTALL_DIR
) $(1)/etc
220 $(INSTALL_CONF
) .
/files
/collectd.conf
$(1)/etc
/
221 $(INSTALL_DIR
) $(1)/etc
/init.d
222 $(INSTALL_BIN
) .
/files
/collectd.init
$(1)/etc
/init.d
/collectd
226 # 2: plugin title/description
228 # 4: extra dependency
231 PKG_CONFIG_DEPENDS
+= CONFIG_PACKAGE_collectd-mod-
$(1)
233 define Package
/collectd-mod-
$(1)
234 $$(call Package
/collectd
/Default
)
236 DEPENDS
:= collectd
$(4)
239 define Package
/collectd-mod-
$(1)/install
240 $(INSTALL_DIR
) $$(1)/usr
/lib
/collectd
243 $(PKG_INSTALL_DIR
)/usr
/lib
/collectd
/$$$$$$$${m}.so \
244 $$(1)/usr
/lib
/collectd
/ ; \
248 $$(eval
$$(call BuildPackage
,collectd-mod-
$(1)))
252 $(eval
$(call BuildPackage
,collectd
))
254 #$(eval $(call BuildPlugin,NAME,DESCRIPTION,FILES,DEPENDENCIES))
255 $(eval
$(call BuildPlugin
,apache
,apache status input
,apache
,+PACKAGE_collectd-mod-apache
:libcurl
))
256 $(eval
$(call BuildPlugin
,apcups
,apcups status input
,apcups
,))
257 $(eval
$(call BuildPlugin
,ascent
,ascent status input
,ascent
,+PACKAGE_collectd-mod-ascent
:libcurl
+PACKAGE_collectd-mod-ascent
:libxml2
))
258 $(eval
$(call BuildPlugin
,bind
,BIND server
/zone input
,bind
,+PACKAGE_collectd-mod-bind
:libcurl
+PACKAGE_collectd-mod-bind
:libxml2
))
259 $(eval
$(call BuildPlugin
,conntrack
,connection tracking table size input
,conntrack
,))
260 $(eval
$(call BuildPlugin
,contextswitch
,context switch input
,contextswitch
,))
261 $(eval
$(call BuildPlugin
,cpu
,CPU input
,cpu
,))
262 $(eval
$(call BuildPlugin
,csv
,CSV output
,csv
,))
263 $(eval
$(call BuildPlugin
,curl
,cURL input
,curl
,+PACKAGE_collectd-mod-curl
:libcurl
))
264 $(eval
$(call BuildPlugin
,dbi
,relational database input
,dbi
,+PACKAGE_collectd-mod-dbi
:libdbi
))
265 $(eval
$(call BuildPlugin
,df
,disk space input
,df
,))
266 $(eval
$(call BuildPlugin
,disk
,disk usage
/timing input
,disk
,))
267 $(eval
$(call BuildPlugin
,dns
,DNS traffic input
,dns
,+PACKAGE_collectd-mod-dns
:libpcap
))
268 $(eval
$(call BuildPlugin
,email
,email output
,email
,))
269 $(eval
$(call BuildPlugin
,exec
,process exec input
,exec
,))
270 $(eval
$(call BuildPlugin
,filecount
,file count input
,filecount
,))
271 $(eval
$(call BuildPlugin
,fscache
,file-system based caching framework input
,fscache
,))
272 $(eval
$(call BuildPlugin
,interface
,network interfaces input
,interface
,))
273 $(eval
$(call BuildPlugin
,iptables
,iptables status input
,iptables
,+PACKAGE_collectd-mod-iptables
:iptables
+libiptc
))
274 $(eval
$(call BuildPlugin
,irq
,interrupt usage input
,irq
,))
275 $(eval
$(call BuildPlugin
,iwinfo
,libiwinfo wireless statistics
,iwinfo
,+PACKAGE_collectd-mod-iwinfo
:libiwinfo
))
276 $(eval
$(call BuildPlugin
,load
,system load input
,load
,))
277 $(eval
$(call BuildPlugin
,logfile
,log files output
,logfile
,))
278 $(eval
$(call BuildPlugin
,madwifi
,MadWifi status input
,madwifi
,))
279 $(eval
$(call BuildPlugin
,mysql
,MySQL status input
,mysql
,+PACKAGE_collectd-mod-mysql
:libmysqlclient-r
))
280 $(eval
$(call BuildPlugin
,memory
,physical memory usage input
,memory
,))
281 $(eval
$(call BuildPlugin
,modbus
,read variables through libmodbus
,modbus
,+PACKAGE_collectd-mod-modbus
:libmodbus @BROKEN
))
282 $(eval
$(call BuildPlugin
,netlink
,netlink input
,netlink
,+PACKAGE_collectd-mod-netlink
:ip
))
283 $(eval
$(call BuildPlugin
,network
,network input
/output
,network
))
284 $(eval
$(call BuildPlugin
,nginx
,nginx status input
,nginx
,+PACKAGE_collectd-mod-nginx
:libcurl
))
285 $(eval
$(call BuildPlugin
,ntpd
,NTP daemon status input
,ntpd
,))
286 $(eval
$(call BuildPlugin
,nut
,UPS monitoring input
,nut
,@BROKEN
))
287 $(eval
$(call BuildPlugin
,olsrd
,OLSRd status input
,olsrd
,))
288 $(eval
$(call BuildPlugin
,onewire
,onewire sensor input
,onewire
,+PACKAGE_collectd-mod-onewire
:libow-capi @BROKEN
))
289 $(eval
$(call BuildPlugin
,openvpn
,OpenVPN traffic
/compression input
,openvpn
,))
290 $(eval
$(call BuildPlugin
,ping
,ping status input
,ping
,+PACKAGE_collectd-mod-ping
:liboping
))
291 $(eval
$(call BuildPlugin
,postgresql
,PostgreSQL status input
,postgresql
,+PACKAGE_collectd-mod-postgresql
:libpq
))
292 $(eval
$(call BuildPlugin
,powerdns
,PowerDNS server status input
,powerdns
,))
293 $(eval
$(call BuildPlugin
,processes
,process status input
,processes
,))
294 $(eval
$(call BuildPlugin
,protocols
,network protocols input
,protocols
,))
295 $(eval
$(call BuildPlugin
,rrdtool
,RRDtool output
,rrdtool
,+PACKAGE_collectd-mod-rrdtool
:librrd1
))
296 $(eval
$(call BuildPlugin
,sensors
,lm_sensors input
,sensors
,+PACKAGE_collectd-mod-sensors
:libsensors @BROKEN
))
297 $(eval
$(call BuildPlugin
,snmp
,SNMP input
,snmp
,+PACKAGE_collectd-mod-snmp
:libnetsnmp
))
298 $(eval
$(call BuildPlugin
,syslog
,syslog output
,syslog
,))
299 $(eval
$(call BuildPlugin
,tail
,tail input
,tail
,))
300 $(eval
$(call BuildPlugin
,table
,table-like structured file input
,table
,))
301 $(eval
$(call BuildPlugin
,teamspeak2
,TeamSpeak2 input
,teamspeak2
,))
302 $(eval
$(call BuildPlugin
,ted
,The Energy Detective input
,ted
,@
((!TARGET_avr32
)||BROKEN
))) # fails on avr32 because of warnings treated as errors
303 $(eval
$(call BuildPlugin
,tcpconns
,TCP connection tracking input
,tcpconns
,))
304 $(eval
$(call BuildPlugin
,thermal
,system temperatures input
,thermal
,))
305 $(eval
$(call BuildPlugin
,unixsock
,unix socket output
,unixsock
,))
306 $(eval
$(call BuildPlugin
,uptime
,uptime status input
,uptime
,))
307 $(eval
$(call BuildPlugin
,users
,user logged in status input
,users
,))
308 $(eval
$(call BuildPlugin
,vmem
,virtual memory usage input
,vmem
,))
309 $(eval
$(call BuildPlugin
,wireless
,wireless status input
,wireless
,))
310 $(eval
$(call BuildPlugin
,write-http
,HTTP POST output
,write_http
,+PACKAGE_collectd-mod-write-http
:libcurl
))