2006-08-07 16:56:51 +00:00
|
|
|
#
|
2011-11-11 18:06:52 +00:00
|
|
|
# Copyright (C) 2006-2011 OpenWrt.org
|
2006-08-07 16:56:51 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=rrdcollect
|
2009-10-05 19:58:54 +00:00
|
|
|
PKG_VERSION:=0.2.4
|
2011-11-11 18:06:52 +00:00
|
|
|
PKG_RELEASE:=3
|
2006-08-07 16:56:51 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
2006-10-30 13:51:50 +00:00
|
|
|
PKG_SOURCE_URL:=@SF/rrdcollect
|
2009-10-05 19:58:54 +00:00
|
|
|
PKG_MD5SUM:=fd7ac95195e3e5cbab0677629505d9be
|
2006-08-07 16:56:51 +00:00
|
|
|
|
2011-11-11 18:06:52 +00:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
|
2010-02-18 13:10:21 +00:00
|
|
|
PKG_INSTALL:=1
|
|
|
|
|
2006-08-07 16:56:51 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2006-11-21 22:01:26 +00:00
|
|
|
define Package/rrdcollect/Default
|
2006-08-07 16:56:51 +00:00
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
2006-10-30 13:51:50 +00:00
|
|
|
URL:=http://rrdcollect.sourceforge.net/
|
|
|
|
endef
|
|
|
|
|
2009-10-05 19:58:54 +00:00
|
|
|
define Package/rrdcollect/Default/description
|
2014-03-27 07:06:40 +00:00
|
|
|
RRDcollect is a daemon which polls ceratin files in /proc/
|
|
|
|
directory, gathering data and storing it inside RRDtool's
|
|
|
|
database files. Being written in C should be both fast
|
|
|
|
and resources-friendly. Supports both scanf(3)-style
|
|
|
|
pattern matches and perl compatible regular expressions.
|
2009-10-05 19:58:54 +00:00
|
|
|
endef
|
|
|
|
|
2011-11-11 18:06:52 +00:00
|
|
|
define Package/rrdcollect10
|
2009-10-05 19:58:54 +00:00
|
|
|
$(call Package/rrdcollect/Default)
|
2011-11-11 18:06:52 +00:00
|
|
|
TITLE:=Round-Robin Database (RRD) collecting daemon
|
|
|
|
PROVIDES:=rrdcollect
|
2009-10-05 19:58:54 +00:00
|
|
|
DEPENDS:=+librrd1
|
2011-11-11 18:06:52 +00:00
|
|
|
VARIANT:=rrdtool10
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/rrdcollect10/description
|
|
|
|
$(call Package/rrdcollect/Default/description)
|
|
|
|
.
|
2014-03-27 07:06:40 +00:00
|
|
|
This package contains the RRD collecting daemon, linked against
|
2011-11-11 18:06:52 +00:00
|
|
|
rrdtool-1.0.x shared library.
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/rrdcollect12
|
|
|
|
$(call Package/rrdcollect/Default)
|
2006-08-07 16:56:51 +00:00
|
|
|
TITLE:=Round-Robin Database (RRD) collecting daemon
|
2011-11-11 18:06:52 +00:00
|
|
|
PROVIDES:=rrdcollect
|
|
|
|
DEPENDS:=+librrd
|
|
|
|
VARIANT:=rrdtool12
|
2006-08-07 16:56:51 +00:00
|
|
|
endef
|
|
|
|
|
2011-11-11 18:06:52 +00:00
|
|
|
define Package/rrdcollect12/description
|
2009-10-05 19:58:54 +00:00
|
|
|
$(call Package/rrdcollect/Default/description)
|
2011-11-11 18:06:52 +00:00
|
|
|
.
|
2014-03-27 07:06:40 +00:00
|
|
|
This package contains the RRD collecting daemon, linked against
|
2011-11-11 18:06:52 +00:00
|
|
|
rrdtool-1.2.x shared library.
|
2007-10-14 04:32:56 +00:00
|
|
|
endef
|
|
|
|
|
2011-11-11 18:06:52 +00:00
|
|
|
|
|
|
|
define Package/rrdcollect10-example
|
2009-10-05 19:58:54 +00:00
|
|
|
$(call Package/rrdcollect/Default)
|
2006-08-07 16:56:51 +00:00
|
|
|
TITLE:=Example setup for RRD collecting daemon above
|
2011-11-11 18:06:52 +00:00
|
|
|
DEPENDS:=rrdcollect +rrdtool1
|
|
|
|
VARIANT:=rrdtool12
|
2007-10-14 04:32:56 +00:00
|
|
|
endef
|
|
|
|
|
2011-11-11 18:06:52 +00:00
|
|
|
define Package/rrdcollect10-example/description
|
2009-10-05 19:58:54 +00:00
|
|
|
$(call Package/rrdcollect/Default/description)
|
2011-11-11 18:06:52 +00:00
|
|
|
.
|
|
|
|
This package contains examples for the RRD collecting daemon, using
|
|
|
|
rrdtool-1.0.x shared library and utilities.
|
2006-08-07 16:56:51 +00:00
|
|
|
endef
|
|
|
|
|
2011-11-11 18:06:52 +00:00
|
|
|
define Package/rrdcollect12-example
|
|
|
|
$(call Package/rrdcollect/Default)
|
|
|
|
TITLE:=Example setup for RRD collecting daemon above
|
|
|
|
DEPENDS:=rrdcollect +rrdtool
|
|
|
|
VARIANT:=rrdtool12
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/rrdcollect12-example/description
|
|
|
|
$(call Package/rrdcollect/Default/description)
|
|
|
|
This package contains examples for the RRD collecting daemon, using
|
|
|
|
rrdtool-1.2.x shared library and utilities.
|
2006-08-07 16:56:51 +00:00
|
|
|
endef
|
|
|
|
|
2011-11-11 18:06:52 +00:00
|
|
|
|
2009-10-05 19:58:54 +00:00
|
|
|
CONFIGURE_ARGS+= \
|
|
|
|
--enable-shared \
|
|
|
|
--disable-static \
|
|
|
|
--disable-rpath \
|
|
|
|
--enable-exec \
|
|
|
|
--without-rrdtool \
|
2011-11-11 18:06:52 +00:00
|
|
|
--with-librrd \
|
2009-10-05 19:58:54 +00:00
|
|
|
--without-libpcre \
|
|
|
|
--without-libpcap \
|
|
|
|
|
|
|
|
CONFIGURE_VARS+= \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS) -DSOCKET_COMM" \
|
2006-08-07 16:56:51 +00:00
|
|
|
|
2011-11-11 18:06:52 +00:00
|
|
|
EXTRA_LDFLAGS+= -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
|
|
|
|
|
|
|
|
ifeq ($(BUILD_VARIANT),rrdtool10)
|
|
|
|
|
|
|
|
TARGET_CPPFLAGS:=-I$(STAGING_DIR)/usr/lib/rrdtool-1.0/include $(TARGET_CPPFLAGS)
|
|
|
|
TARGET_LDFLAGS:=-L$(STAGING_DIR)/usr/lib/rrdtool-1.0/lib $(TARGET_CPPFLAGS)
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BUILD_VARIANT),rrdtool12)
|
|
|
|
|
|
|
|
TARGET_CPPFLAGS:=-I$(STAGING_DIR)/usr/lib/rrdtool-1.2/include $(TARGET_CPPFLAGS)
|
|
|
|
TARGET_LDFLAGS:=-L$(STAGING_DIR)/usr/lib/rrdtool-1.2/lib $(TARGET_CPPFLAGS)
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2010-02-18 13:10:21 +00:00
|
|
|
define Package/rrdcollect/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2007-12-09 18:59:01 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rrdcollect $(1)/usr/sbin/
|
2006-08-07 16:56:51 +00:00
|
|
|
endef
|
|
|
|
|
2011-11-11 18:06:52 +00:00
|
|
|
Package/rrdcollect10/install = $(Package/rrdcollect/install)
|
|
|
|
Package/rrdcollect12/install = $(Package/rrdcollect/install)
|
|
|
|
|
|
|
|
define Package/rrdcollect-example/conffiles
|
|
|
|
/etc/rrd.conf
|
|
|
|
/etc/rrdcollect.conf
|
|
|
|
endef
|
|
|
|
|
2010-02-18 13:10:21 +00:00
|
|
|
define Package/rrdcollect-example/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc
|
|
|
|
$(INSTALL_DATA) ./files/rrd.conf $(1)/etc/
|
|
|
|
$(INSTALL_DATA) ./files/rrdcollect.conf $(1)/etc/
|
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
|
|
$(INSTALL_BIN) ./files/rrdcollect.init $(1)/etc/init.d/rrdcollect
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
|
|
$(INSTALL_BIN) ./files/rrd.sh $(1)/usr/bin/
|
|
|
|
$(INSTALL_DIR) $(1)/www/cgi-bin
|
2006-08-07 16:56:51 +00:00
|
|
|
ln -sf /var/lib/rrdcollect/rrd.cgi $(1)/www/cgi-bin/rrd.cgi
|
|
|
|
ln -sf /var/lib/rrdcollect/img $(1)/www/img
|
|
|
|
endef
|
|
|
|
|
2011-11-11 18:06:52 +00:00
|
|
|
Package/rrdcollect10-example/install = $(Package/rrdcollect-example/install)
|
|
|
|
Package/rrdcollect12-example/install = $(Package/rrdcollect-example/install)
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,rrdcollect10))
|
|
|
|
$(eval $(call BuildPackage,rrdcollect10-example))
|
|
|
|
$(eval $(call BuildPackage,rrdcollect12))
|
|
|
|
$(eval $(call BuildPackage,rrdcollect12-example))
|