package/utils/collectd:
[openwrt/svn-archive/archive.git] / utils / collectd / Makefile
index 69dada1461f3c31595b4e1cc2fd89866f1dd63ef..de969dc4c6a5fb3522dc14b1d9c65a7fc797613a 100644 (file)
@@ -9,15 +9,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=collectd
-PKG_VERSION:=4.4.0
-PKG_RELEASE:=1
+PKG_VERSION:=4.4.4
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://collectd.org/files/
-PKG_MD5SUM:=76ec42bf1976c1d4110443d845decca3
+PKG_MD5SUM:=9e0e89150b1ff28fc0fdd8a198c9ac5e
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+PKG_FIXUP=libtool
+PKG_BUILD_DEPENDS:=+libxml2 +libnetsnmp +libcurl +librrd1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -140,7 +140,7 @@ endef
 define Package/collectd-mod-iptables
         $(call Package/collectd/common_info)
         TITLE:=collectd - iptables status input plugin
-        DEPENDS:=collectd
+        DEPENDS:=collectd +iptables
 endef
 
 define Package/collectd-mod-irq
@@ -173,6 +173,12 @@ define Package/collectd-mod-ntpd
         DEPENDS:=collectd
 endef
 
+define Package/collectd-mod-nut
+        $(call Package/collectd/common_info)
+        TITLE:=collectd - UPS monitoring input plugin
+        DEPENDS:=collectd @BROKEN
+endef
+
 define Package/collectd-mod-ping
         $(call Package/collectd/common_info)
         TITLE:=collectd - ping status input plugin
@@ -198,10 +204,10 @@ define Package/collectd-mod-rrdtool1
         DEPENDS:=collectd +librrd1
 endef
 
-define Package/collectd-mod-rrdtool
+define Package/collectd-mod-sensors
         $(call Package/collectd/common_info)
-        TITLE:=collectd - rrdtool 1.2.x output plugin
-        DEPENDS:=collectd +librrd
+        TITLE:=collectd - lm_sensors input plugin
+        DEPENDS:=collectd +libsensors @BROKEN
 endef
 
 define Package/collectd-mod-snmp
@@ -273,14 +279,17 @@ PKG_CONFIGURE_OPTS:= \
        --with-nan-emulation \
        --with-fp-layout=nothing
 
+CONFIGURE_VARS+= \
+       CPPFLAGS="-I$(STAGING_DIR)/usr/include/libxml2 $$$$CPPFLAGS" \
+
 # list of permanently disabled plugins
 disabled_plugins := apple_sensors battery cpufreq entropy hddtemp ipmi ipvs libvirt mbmon memcached \
-                       multimeter mysql nfs nut perl sensors serial swap tape uuid vserver xmms
+                       multimeter mysql nfs perl serial swap tape uuid vserver xmms
 
 # list of selectable plugins
 selectable_plugins := apache apcups ascent cpu csv df disk dns email exec interface iptables irq load \
-                       logfile memory netlink network nginx ntpd ping powerdns processes snmp \
-                       syslog tail tcpconns teamspeak2 unixsock users vmem wireless
+                       logfile memory netlink network nginx ntpd nut ping powerdns processes sensors \
+                       snmp syslog tail tcpconns teamspeak2 unixsock users vmem wireless
 
 # makro to enable / disable plugin
 define enable_plugin
@@ -303,13 +312,9 @@ ifneq ($(CONFIG_PACKAGE_collectd-mod-netlink),)
 endif
 
 # exception: mod-rrdtool(1) needs rrdtool
-ifneq ($(CONFIG_PACKAGE_collectd-mod-rrdtool1)$(CONFIG_PACKAGE_collectd-mod-rrdtool),)
-       PKG_CONFIGURE_OPTS += --enable-rrdtool
-       ifneq ($(CONFIG_PACKAGE_collectd-mod-rrdtool1),)
-               PKG_CONFIGURE_OPTS += --with-rrdtool=$(wildcard $(BUILD_DIR)/rrdtool-1.0.*)
-       else
-               PKG_CONFIGURE_OPTS += --with-rrdtool=$(wildcard $(BUILD_DIR)/rrdtool-1.2.*)
-       endif
+ifneq ($(CONFIG_PACKAGE_collectd-mod-rrdtool1),)
+       PKG_CONFIGURE_OPTS += --with-rrdtool=$(wildcard $(BUILD_DIR)/rrdtool-1.0.*)
+       TARGET_LDFLAGS := -L$(wildcard $(BUILD_DIR)/rrdtool-1.0.*)/src/.libs -lz $(TARGET_LDFLAGS)
 endif
 
 
@@ -423,6 +428,11 @@ define Package/collectd-mod-ntpd/install
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/collectd/ntpd.so $(1)/usr/lib/collectd/
 endef
 
+define Package/collectd-mod-nut/install
+       $(INSTALL_DIR) $(1)/usr/lib/collectd
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/collectd/nut.so $(1)/usr/lib/collectd/
+endef
+
 define Package/collectd-mod-ping/install
        $(INSTALL_DIR) $(1)/usr/lib/collectd
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/collectd/ping.so $(1)/usr/lib/collectd/
@@ -443,9 +453,9 @@ define Package/collectd-mod-rrdtool1/install
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/collectd/rrdtool.so $(1)/usr/lib/collectd/
 endef
 
-define Package/collectd-mod-rrdtool/install
+define Package/collectd-mod-sensors/install
        $(INSTALL_DIR) $(1)/usr/lib/collectd
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/collectd/rrdtool.so $(1)/usr/lib/collectd/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/collectd/sensors.so $(1)/usr/lib/collectd/
 endef
 
 define Package/collectd-mod-snmp/install
@@ -514,11 +524,12 @@ $(eval $(call BuildPackage,collectd-mod-netlink))
 $(eval $(call BuildPackage,collectd-mod-network))
 $(eval $(call BuildPackage,collectd-mod-nginx))
 $(eval $(call BuildPackage,collectd-mod-ntpd))
+$(eval $(call BuildPackage,collectd-mod-nut))
 $(eval $(call BuildPackage,collectd-mod-ping))
 $(eval $(call BuildPackage,collectd-mod-powerdns))
 $(eval $(call BuildPackage,collectd-mod-processes))
 $(eval $(call BuildPackage,collectd-mod-rrdtool1))
-$(eval $(call BuildPackage,collectd-mod-rrdtool))
+$(eval $(call BuildPackage,collectd-mod-sensors))
 $(eval $(call BuildPackage,collectd-mod-snmp))
 $(eval $(call BuildPackage,collectd-mod-syslog))
 $(eval $(call BuildPackage,collectd-mod-tail))