[packages] rrdcollect: update to v0.2.4, link against rrdtool-1.0.x, cleanup (closes...
authorNicolas Thill <nico@openwrt.org>
Mon, 5 Oct 2009 19:58:54 +0000 (19:58 +0000)
committerNicolas Thill <nico@openwrt.org>
Mon, 5 Oct 2009 19:58:54 +0000 (19:58 +0000)
SVN-Revision: 17926

utils/rrdcollect/Makefile
utils/rrdcollect/patches/001-scan.patch [deleted file]
utils/rrdcollect/patches/002-loglevel.patch [deleted file]

index cdc696d8aa0750b89c825e036daaa8b5a6617200..fbe0035cf584479ad280879cc75d4ae09f91eddd 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2009 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rrdcollect
-PKG_VERSION:=0.2.3
-PKG_RELEASE:=3
+PKG_VERSION:=0.2.4
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/rrdcollect
-PKG_MD5SUM:=5e4305c612bc3cccbaf802c275c81a11
+PKG_MD5SUM:=fd7ac95195e3e5cbab0677629505d9be
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -23,37 +23,35 @@ define Package/rrdcollect/Default
   URL:=http://rrdcollect.sourceforge.net/
 endef
 
+define Package/rrdcollect/Default/description
+ 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.      
+endef
+
 define Package/rrdcollect
-  $(call Package/rrdcollect/Default)
-  DEPENDS:=+librrd
+$(call Package/rrdcollect/Default)
+  DEPENDS:=+librrd1
   TITLE:=Round-Robin Database (RRD) collecting daemon
   MENU:=1
 endef
 
 define Package/rrdcollect/description
-=
-       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.        
-       This package contains the RRD collecting daemon.
+$(call Package/rrdcollect/Default/description)
+ This package contains the RRD collecting daemon.
 endef
 
 define Package/rrdcollect-example
-  $(call Package/rrdcollect/Default)
+$(call Package/rrdcollect/Default)
   DEPENDS:=rrdcollect
   TITLE:=Example setup for RRD collecting daemon above
 endef
 
 define Package/rrdcollect-example/description
-=
-       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.        
-       This package contains examples for the RRD collecting daemon.
+$(call Package/rrdcollect/Default/description)
+ This package contains examples for the RRD collecting daemon.
 endef
 
 define Package/rrdcollect-example/conffiles
@@ -61,21 +59,18 @@ define Package/rrdcollect-example/conffiles
 /etc/rrdcollect.conf
 endef
 
-define Build/Configure
-       $(call Build/Configure/Default, \
-               --enable-shared \
-               --disable-static \
-               --disable-rpath \
-               --enable-exec \
-               --without-rrdtool \
-               --with-librrd \
-               --without-libpcre \
-               --without-libpcap \
-               , \
-               CFLAGS="$(TARGET_CFLAGS) -DSOCKET_COMM" \
-               LIBS="-lz -lfreetype -lpng -lart_lgpl_2" \
-       )
-endef
+CONFIGURE_ARGS+= \
+       --enable-shared \
+       --disable-static \
+       --disable-rpath \
+       --enable-exec \
+       --without-rrdtool \
+       --with-librrd="$(STAGING_DIR)/usr/lib/rrdtool-1.0" \
+       --without-libpcre \
+       --without-libpcap \
+
+CONFIGURE_VARS+= \
+       CFLAGS="$(TARGET_CFLAGS) -DSOCKET_COMM" \
 
 define Build/Compile   
        $(MAKE) -C $(PKG_BUILD_DIR) \
diff --git a/utils/rrdcollect/patches/001-scan.patch b/utils/rrdcollect/patches/001-scan.patch
deleted file mode 100644 (file)
index f47301e..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-diff -ruN rrdcollect-0.2.3.orig/src/scan.c rrdcollect-0.2.3/src/scan.c
---- rrdcollect-0.2.3.orig/src/scan.c   2005-01-20 18:42:17.000000000 +0100
-+++ rrdcollect-0.2.3/src/scan.c        2006-01-22 00:51:52.000000000 +0100
-@@ -74,6 +74,11 @@
-                                               } while (isdigit(*fmt));
-                                       }
-+                                      /* skip white spaces like scanf does */
-+                                      if (strchr("difuoxX", *fmt))
-+                                              while (isspace(*buf))
-+                                                      buf++;
-+                                      
-                                       /* FIXME: we should check afterward:
-                                        * if (start == buf || start == '-' && buf-start == 1)
-                                        *      die("WTF???  zero-length number???");
-@@ -150,27 +155,22 @@
-                                                               buf++, length--;
-                                                       }
--                                                      /* ignore if value not found */
--                                                      if(value == 0)
--                                                              return 0;
--
-                                                       if (!ignore)
--                                                              counter[i++]->value = valuedup(value);
-+                                                              counter[i++]->value = strndup(start, buf - start);
-                                                       break;
-                                                       
-                                               case 'c':
-+                                                      if (length < 0)
-+                                                           length = 1;        // default length is 1
-+                                                      
-                                                       while (*buf && length > 0) {
-                                                               buf++, length--;
-                                                       }
-                                                       if (length > 0)
-                                                               return 2;
--                                                      /* ignore if value not found */
--                                                      if(value == 0)
--                                                              return 0;
--                                                      
-                                                       if (!ignore)
--                                                              counter[i++]->value = valuedup(value);
-+                                                              counter[i++]->value = strndup(start, buf - start);
-                                                       break;
-                                                       
-                                                       
-@@ -192,7 +192,7 @@
-                       case '\f':
-                       case '\v':
-                               /* don't match if not at least one space */
--                              if(!isspace(*(buf)))
-+                              if(!isspace(*buf))
-                                       return 0;
-                               else
-                                       buf++;
-@@ -208,7 +208,7 @@
-                                       case '\v':
-                                               break;
-                                       default:
--                                              while (isspace(*(buf)))
-+                                              while (isspace(*buf))
-                                                       buf++;
-                               }
-                               fmt++;
diff --git a/utils/rrdcollect/patches/002-loglevel.patch b/utils/rrdcollect/patches/002-loglevel.patch
deleted file mode 100644 (file)
index 7762303..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-diff -urN rrdcollect-0.2.3.old/src/rrdcollect.c rrdcollect-0.2.3/src/rrdcollect.c
---- rrdcollect-0.2.3.old/src/rrdcollect.c      2007-06-06 12:06:01.000000000 -0400
-+++ rrdcollect-0.2.3/src/rrdcollect.c  2007-06-06 12:07:05.000000000 -0400
-@@ -58,7 +58,7 @@
- const char *workdir = NULL;
- int step = 60;
- int debugoutput = OUTPUT_SYSLOG;
--int debuglevel = LOG_DEBUG;  /* from syslog.h */
-+int debuglevel = LOG_NOTICE;  /* from syslog.h */
- /* FIXME - it should be default LOG_NOTICE or LOG_WARNING, but first
-    option for change it should be added */
-@@ -160,7 +160,7 @@
- {
-       optind = opterr = 0;
-       
--      send_log(LOG_DEBUG,"rrdlib_update(%i,'%s')",argc,*argv);
-+      /* send_log(LOG_DEBUG,"rrdlib_update(%i,'%s')",argc,*argv); */
-       rrd_update(argc, argv);
-       if (rrd_test_error()) {
-@@ -479,7 +479,7 @@
-       setitimer(ITIMER_REAL, &period, NULL);
-       for (;;) {
--              send_log(LOG_DEBUG,"tick");
-+              /* send_log(LOG_DEBUG,"tick"); */
-               if (action_request) {
-                       switch (action_request) {
-                               case SIGINT: