2 # Copyright (C) 2006-2010 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
:=5753496651c8c84afaea1fe290876bfc
21 COLLECTD_PLUGINS_DISABLED
:= \
58 COLLECTD_PLUGINS_SELECTED
:= \
114 PKG_CONFIG_DEPENDS
:= \
115 $(patsubst %,CONFIG_PACKAGE_collectd-mod-
%,$(subst _
,-,$(COLLECTD_PLUGINS_SELECTED
))) \
117 include $(INCLUDE_DIR
)/package.mk
118 include $(INCLUDE_DIR
)/kernel.mk
120 define Package
/collectd
/Default
123 TITLE
:=Lightweight system statistics collection daemon
124 URL
:=http
://verplant.org
/collectd
/
127 define Package
/collectd
128 $(call Package
/collectd
/Default
)
129 DEPENDS
:= +libpthread
+zlib
133 define Package
/collectd
/description
134 collectd is a small daemon which collects system information periodically
135 and provides mechanismns to store the values in a variety of ways.
138 # common configure args
142 --enable-getifaddrs \
143 --with-nan-emulation \
144 --with-fp-layout
=nothing
147 CFLAGS
="$$$$CFLAGS $(FPIC)" \
148 LDFLAGS
="$$$$LDFLAGS -lm -lz" \
149 KERNEL_DIR
="$(LINUX_DIR)" \
153 $(if
$(CONFIG_PACKAGE_collectd-mod-
$(subst _
,-,$(m
))),--enable-
$(m
),--disable-
$(m
)) \
157 $(call CONFIGURE_PLUGIN
,$(COLLECTD_PLUGINS_SELECTED
)) \
158 $(call CONFIGURE_PLUGIN
,$(COLLECTD_PLUGINS_DISABLED
)) \
160 # exception: mod-ascent needs libxml2
161 ifneq ($(CONFIG_PACKAGE_collectd-mod-ascent
),)
163 CPPFLAGS
="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/libxml2"
166 ifneq ($(CONFIG_PACKAGE_collectd-mod-mysql
),)
167 CONFIGURE_ARGS
+= --with-libmysql
="$(STAGING_DIR)/usr/"
170 # exception: mod-netlink needs libnetlink from iproute
171 ifneq ($(CONFIG_PACKAGE_collectd-mod-netlink
),)
172 CONFIGURE_ARGS
+= --with-libnetlink
="$(STAGING_DIR)/usr"
175 # exception: mod-onewire needs libow-capi
176 ifneq ($(CONFIG_PACKAGE_collectd-mod-onewire
),)
177 CONFIGURE_ARGS
+= --with-libowcapi
="$(STAGING_DIR)/usr"
180 # exception: mod-rrdtool needs rrdtool-1.0.x
181 ifneq ($(CONFIG_PACKAGE_collectd-mod-rrdtool
),)
182 CONFIGURE_ARGS
+= --with-librrd
="$(STAGING_DIR)/usr/lib/rrdtool-1.0"
185 define Package
/collectd
/conffiles
189 define Package
/collectd
/install
190 $(INSTALL_DIR
) $(1)/usr
/sbin
191 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/collectd
$(1)/usr
/sbin
/
192 $(INSTALL_DIR
) $(1)/usr
/share
/collectd
193 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/collectd
/types.db
$(1)/usr
/share
/collectd
/
194 $(INSTALL_DIR
) $(1)/etc
195 $(INSTALL_CONF
) .
/files
/collectd.conf
$(1)/etc
/
196 $(INSTALL_DIR
) $(1)/etc
/init.d
197 $(INSTALL_BIN
) .
/files
/collectd.init
$(1)/etc
/init.d
/collectd
201 # 2: plugin title/description
203 # 4: extra dependency
206 PKG_CONFIG_DEPENDS
+= CONFIG_PACKAGE_collectd-mod-
$(1)
208 define Package
/collectd-mod-
$(1)
209 $$(call Package
/collectd
/Default
)
211 DEPENDS
:= collectd
$(4)
214 define Package
/collectd-mod-
$(1)/install
215 $(INSTALL_DIR
) $$(1)/usr
/lib
/collectd
218 $(PKG_INSTALL_DIR
)/usr
/lib
/collectd
/$$$$$$$${m}.so \
219 $$(1)/usr
/lib
/collectd
/ ; \
223 $$(eval
$$(call BuildPackage
,collectd-mod-
$(1)))
227 $(eval
$(call BuildPackage
,collectd
))
229 #$(eval $(call BuildPlugin,NAME,DESCRIPTION,FILES,DEPENDENCIES))
230 $(eval
$(call BuildPlugin
,apache
,apache status input
,apache
,+PACKAGE_collectd-mod-apache
:libcurl
))
231 $(eval
$(call BuildPlugin
,apcups
,apcups status input
,apcups
,))
232 $(eval
$(call BuildPlugin
,ascent
,ascent status input
,ascent
,+PACKAGE_collectd-mod-ascent
:libcurl
+PACKAGE_collectd-mod-ascent
:libxml2
))
233 $(eval
$(call BuildPlugin
,bind
,BIND server
/zone input
,bind
,+PACKAGE_collectd-mod-bind
:libcurl
+PACKAGE_collectd-mod-bind
:libxml2
))
234 $(eval
$(call BuildPlugin
,conntrack
,connection tracking table size input
,conntrack
,))
235 $(eval
$(call BuildPlugin
,contextswitch
,context switch input
,contextswitch
,))
236 $(eval
$(call BuildPlugin
,cpu
,CPU input
,cpu
,))
237 $(eval
$(call BuildPlugin
,csv
,CSV output
,csv
,))
238 $(eval
$(call BuildPlugin
,curl
,cURL input
,curl
,+PACKAGE_collectd-mod-curl
:libcurl
))
239 $(eval
$(call BuildPlugin
,dbi
,relational database input
,dbi
,+PACKAGE_collectd-mod-dbi
:libdbi
))
240 $(eval
$(call BuildPlugin
,df
,disk space input
,df
,))
241 $(eval
$(call BuildPlugin
,disk
,disk usage
/timing input
,disk
,))
242 $(eval
$(call BuildPlugin
,dns
,DNS traffic input
,dns
,+PACKAGE_collectd-mod-dns
:libpcap
))
243 $(eval
$(call BuildPlugin
,email
,email output
,email
,))
244 $(eval
$(call BuildPlugin
,exec
,process exec input
,exec
,))
245 $(eval
$(call BuildPlugin
,filecount
,file count input
,filecount
,))
246 $(eval
$(call BuildPlugin
,fscache
,file-system based caching framework input
,fscache
,))
247 $(eval
$(call BuildPlugin
,interface
,network interfaces input
,interface
,))
248 $(eval
$(call BuildPlugin
,iptables
,iptables status input
,iptables
,+PACKAGE_collectd-mod-iptables
:iptables @
(!LINUX_2_4||BROKEN
)))
249 $(eval
$(call BuildPlugin
,irq
,interrupt usage input
,irq
,))
250 $(eval
$(call BuildPlugin
,load
,system load input
,load
,))
251 $(eval
$(call BuildPlugin
,logfile
,log files output
,logfile
,))
252 $(eval
$(call BuildPlugin
,madwifi
,MadWifi status input
,madwifi
,))
253 $(eval
$(call BuildPlugin
,mysql
,MySQL status input
,mysql
,+PACKAGE_collectd-mod-mysql
:libmysqlclient
))
254 $(eval
$(call BuildPlugin
,memory
,physical memory usage input
,memory
,))
255 $(eval
$(call BuildPlugin
,netlink
,netlink input
,netlink
,+PACKAGE_collectd-mod-netlink
:ip @
(!LINUX_2_4||BROKEN
)))
256 $(eval
$(call BuildPlugin
,network
,network input
/output
,network
))
257 $(eval
$(call BuildPlugin
,nginx
,nginx status input
,nginx
,+PACKAGE_collectd-mod-nginx
:libcurl
))
258 $(eval
$(call BuildPlugin
,ntpd
,NTP daemon status input
,ntpd
,))
259 $(eval
$(call BuildPlugin
,nut
,UPS monitoring input
,nut
,@BROKEN
))
260 $(eval
$(call BuildPlugin
,olsrd
,OLSRd status input
,olsrd
,))
261 $(eval
$(call BuildPlugin
,onewire
,onewire sensor input
,onewire
,+PACKAGE_collectd-mod-onewire
:libow-capi @BROKEN
))
262 $(eval
$(call BuildPlugin
,openvpn
,OpenVPN traffic
/compression input
,openvpn
,))
263 $(eval
$(call BuildPlugin
,ping
,ping status input
,ping
,+PACKAGE_collectd-mod-ping
:liboping
))
264 $(eval
$(call BuildPlugin
,postgresql
,PostgreSQL status input
,postgresql
,+PACKAGE_collectd-mod-postgresql
:libpq
))
265 $(eval
$(call BuildPlugin
,powerdns
,PowerDNS server status input
,powerdns
,))
266 $(eval
$(call BuildPlugin
,processes
,process status input
,processes
,))
267 $(eval
$(call BuildPlugin
,protocols
,network protocols input
,protocols
,))
268 $(eval
$(call BuildPlugin
,rrdtool
,RRDtool output
,rrdtool
,+PACKAGE_collectd-mod-rrdtool
:librrd1
))
269 $(eval
$(call BuildPlugin
,sensors
,lm_sensors input
,sensors
,+PACKAGE_collectd-mod-sensors
:libsensors @BROKEN
))
270 $(eval
$(call BuildPlugin
,snmp
,SNMP input
,snmp
,+PACKAGE_collectd-mod-snmp
:libnetsnmp
))
271 $(eval
$(call BuildPlugin
,syslog
,syslog output
,syslog
,))
272 $(eval
$(call BuildPlugin
,tail
,tail input
,tail
,))
273 $(eval
$(call BuildPlugin
,table
,table-like structured file input
,table
,))
274 $(eval
$(call BuildPlugin
,teamspeak2
,TeamSpeak2 input
,teamspeak2
,))
275 $(eval
$(call BuildPlugin
,ted
,The Energy Detective input
,ted
,))
276 $(eval
$(call BuildPlugin
,tcpconns
,TCP connection tracking input
,tcpconns
,))
277 $(eval
$(call BuildPlugin
,thermal
,system temperatures input
,thermal
,))
278 $(eval
$(call BuildPlugin
,unixsock
,unix socket output
,unixsock
,))
279 $(eval
$(call BuildPlugin
,uptime
,uptime status input
,uptime
,))
280 $(eval
$(call BuildPlugin
,users
,user logged in status input
,users
,))
281 $(eval
$(call BuildPlugin
,vmem
,virtual memory usage input
,vmem
,))
282 $(eval
$(call BuildPlugin
,wireless
,wireless status input
,wireless
,))
283 $(eval
$(call BuildPlugin
,write-http
,HTTP POST output
,write_http
,+PACKAGE_collectd-mod-write-http
:libcurl
))