2 # Copyright (C) 2006-2009 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
:=9e0e89150b1ff28fc0fdd8a198c9ac5e
20 COLLECTD_PLUGINS_DISABLED
:= \
41 COLLECTD_PLUGINS_SELECTED
:= \
79 PKG_CONFIG_DEPENDS
:= \
80 $(patsubst %,CONFIG_PACKAGE_collectd-mod-
%,$(COLLECTD_PLUGINS_SELECTED
)) \
82 include $(INCLUDE_DIR
)/package.mk
83 include $(INCLUDE_DIR
)/kernel.mk
85 define Package
/collectd
/Default
88 TITLE
:=Lightweight system statistics collection daemon
89 URL
:=http
://verplant.org
/collectd
/
92 define Package
/collectd
93 $(call Package
/collectd
/Default
)
94 DEPENDS
:=+libgcc
+libpthread
+zlib
98 define Package
/collectd
/description
99 collectd is a small daemon which collects system information periodically
100 and provides mechanismns to store the values in a variety of ways.
103 # common configure args
107 --enable-getifaddrs \
108 --with-nan-emulation \
109 --with-fp-layout
=nothing
112 CFLAGS
="$$$$CFLAGS $(FPIC)" \
113 LDFLAGS
="$$$$LDFLAGS -lm -lz" \
114 KERNEL_DIR
="$(LINUX_DIR)" \
118 $(if
$(CONFIG_PACKAGE_collectd-mod-
$(m
)),--enable-
$(m
),--disable-
$(m
)) \
122 $(call CONFIGURE_PLUGIN
,$(COLLECTD_PLUGINS_SELECTED
)) \
123 $(call CONFIGURE_PLUGIN
,$(COLLECTD_PLUGINS_DISABLED
)) \
125 # exception: mod-ascent needs libxml2
126 ifneq ($(CONFIG_PACKAGE_collectd-mod-netlink
),)
128 CPPFLAGS
="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/libxml2"
131 # exception: mod-netlink needs libnetlink from iproute
132 ifneq ($(CONFIG_PACKAGE_collectd-mod-netlink
),)
133 CONFIGURE_ARGS
+= --with-libnetlink
="$(STAGING_DIR)/usr"
136 # exception: mod-rrdtool needs rrdtool-1.0.x
137 ifneq ($(CONFIG_PACKAGE_collectd-mod-rrdtool
),)
138 CONFIGURE_ARGS
+= --with-rrdtool
="$(STAGING_DIR)/usr/lib/rrdtool-1.0"
142 DESTDIR
="$(PKG_INSTALL_DIR)" \
145 define Package
/collectd
/conffiles
149 define Package
/collectd
/install
150 $(INSTALL_DIR
) $(1)/usr
/sbin
151 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/collectd
$(1)/usr
/sbin
/
152 $(INSTALL_DIR
) $(1)/usr
/lib
/collectd
153 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/usr
/lib
/collectd
/types.db
$(1)/usr
/lib
/collectd
/
154 $(INSTALL_DIR
) $(1)/etc
155 $(INSTALL_CONF
) .
/files
/collectd.conf
$(1)/etc
/
156 $(INSTALL_DIR
) $(1)/etc
/init.d
157 $(INSTALL_BIN
) .
/files
/collectd.init
$(1)/etc
/init.d
/collectd
161 # 2: plugin title/description
163 # 4: extra dependency
166 PKG_CONFIG_DEPENDS
+= CONFIG_PACKAGE_collectd-mod-
$(1)
168 define Package
/collectd-mod-
$(1)
169 $$(call Package
/collectd
/Default
)
171 DEPENDS
:= collectd
$(4)
174 define Package
/collectd-mod-
$(1)/install
175 $(INSTALL_DIR
) $$(1)/usr
/lib
/collectd
178 $(PKG_INSTALL_DIR
)/usr
/lib
/collectd
/$$$$$$$${m}.so \
179 $$(1)/usr
/lib
/collectd
/ ; \
183 $$(eval
$$(call BuildPackage
,collectd-mod-
$(1)))
187 $(eval
$(call BuildPackage
,collectd
))
189 #$(eval $(call BuildPlugin,NAME,DESCRIPTION,FILES,DEPENDENCIES))
190 $(eval
$(call BuildPlugin
,apache
,apache status input
,apache
,+libcurl
))
191 $(eval
$(call BuildPlugin
,apcups
,apcups status input
,apcups
,))
192 $(eval
$(call BuildPlugin
,ascent
,ascent status input
,ascent
,+libcurl
+libxml2
))
193 $(eval
$(call BuildPlugin
,cpu
,CPU input
,cpu
,))
194 $(eval
$(call BuildPlugin
,csv
,CSV output
,csv
,))
195 $(eval
$(call BuildPlugin
,df
,disk space input
,df
,))
196 $(eval
$(call BuildPlugin
,disk
,disk usage
/timing input
,disk
,))
197 $(eval
$(call BuildPlugin
,dns
,DNS traffic input
,dns
,+libpcap
))
198 $(eval
$(call BuildPlugin
,email
,email output
,email
,))
199 $(eval
$(call BuildPlugin
,exec
,process exec input
,exec
,))
200 $(eval
$(call BuildPlugin
,interface
,network interfaces input
,interface
,))
201 $(eval
$(call BuildPlugin
,iptables
,iptables status input
,iptables
,+iptables
))
202 $(eval
$(call BuildPlugin
,irq
,interrupt usage input
,irq
,))
203 $(eval
$(call BuildPlugin
,load
,system load input
,load
,))
204 $(eval
$(call BuildPlugin
,logfile
,log files output
,logfile
,))
205 $(eval
$(call BuildPlugin
,mysql
,MySQL status input
,mysql
,+libmysqlclient
))
206 $(eval
$(call BuildPlugin
,memory
,physical memory usage input
,memory
,))
207 $(eval
$(call BuildPlugin
,netlink
,netlink input
,netlink
,+ip
))
208 $(eval
$(call BuildPlugin
,network
,network input
/output
,network
))
209 $(eval
$(call BuildPlugin
,nginx
,nginx status input
,nginx
,+libcurl
))
210 $(eval
$(call BuildPlugin
,ntpd
,NTP daemon status input
,ntpd
,))
211 $(eval
$(call BuildPlugin
,nut
,UPS monitoring input
,nut
,@BROKEN
))
212 $(eval
$(call BuildPlugin
,ping
,ping status input
,ping
,+liboping
))
213 $(eval
$(call BuildPlugin
,powerdns
,PowerDNS server status input
,powerdns
,))
214 $(eval
$(call BuildPlugin
,processes
,process status input
,processes
,))
215 $(eval
$(call BuildPlugin
,rrdtool
,RRDtool output
,rrdtool
,+librrd1
))
216 $(eval
$(call BuildPlugin
,sensors
,lm_sensors input
,sensors
,+libsensors @BROKEN
))
217 $(eval
$(call BuildPlugin
,snmp
,SNMP input
,snmp
,+libnetsnmp
))
218 $(eval
$(call BuildPlugin
,syslog
,syslog output
,syslog
,))
219 $(eval
$(call BuildPlugin
,tail
,tail input
,tail
,))
220 $(eval
$(call BuildPlugin
,teamspeak2
,TeamSpeak2 input
,teamspeak2
,))
221 $(eval
$(call BuildPlugin
,tcpconns
,TCP connection tracking input
,tcpconns
,))
222 $(eval
$(call BuildPlugin
,unixsock
,unix socket output
,unixsock
,))
223 $(eval
$(call BuildPlugin
,users
,user logged in status input
,users
,))
224 $(eval
$(call BuildPlugin
,vmem
,virtual memory usage input
,vmem
,))
225 $(eval
$(call BuildPlugin
,wireless
,wireless status input
,wireless
,))