Bläddra i källkod

rrdtool1: import from packages, add myself as maintainer

While we're at it, relocate from libs/ to utils/ as it provides executables
and change the directory name from rrdtool-1.0.x to rrdtool1 to make it match
the source package name.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Jo-Philipp Wich 10 år sedan
förälder
incheckning
f41826e344

+ 131
- 0
utils/rrdtool1/Makefile Visa fil

@@ -0,0 +1,131 @@
1
+#
2
+# Copyright (C) 2006-2014 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=rrdtool1
11
+PKG_VERSION:=1.0.50
12
+PKG_RELEASE:=2
13
+
14
+PKG_BUILD_DIR:=$(BUILD_DIR)/rrdtool-$(PKG_VERSION)
15
+PKG_SOURCE:=rrdtool-$(PKG_VERSION).tar.gz
16
+PKG_SOURCE_URL:= \
17
+	http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.0.x \
18
+	http://www.fastmirrors.org/rrdtool/rrdtool-1.0.x \
19
+	ftp://ftp.sunet.se/pub/network/monitoring/rrdtool/rrdtool-1.0.x
20
+PKG_MD5SUM:=c466e2e7df95fa8e318e46437da87686
21
+
22
+PKG_FIXUP:=autoreconf
23
+
24
+include $(INCLUDE_DIR)/package.mk
25
+
26
+define Package/rrdtool1/Default
27
+  TITLE:=Round Robin Database (RRD)
28
+  URL:=http://oss.oetiker.ch/rrdtool/
29
+endef
30
+
31
+define Package/rrdtool1/description/Default
32
+ RRD is the Acronym for Round Robin Database. RRD is a system to store and
33
+ display time-series data (i.e. network bandwidth, machine-room temperature,
34
+ server load average). It stores the data in a very compact way that will
35
+ not expand over time, and it presents useful graphs by processing the data
36
+ to enforce a certain data density. It can be used either via simple wrapper
37
+ scripts (from shell or Perl) or via frontends that poll network devices and
38
+ put friendly user interface on it.
39
+
40
+ This is version 1.0.x with cgilib-0.4, gd1.3 and libpng-1.0.9 linked into
41
+ librrd.so. The library is much smaller compared to the 1.2.x version with
42
+ separate dynamic linked libraries.
43
+endef
44
+
45
+define Package/librrd1
46
+$(call Package/rrdtool1/Default)
47
+  SECTION:=libs
48
+  CATEGORY:=Libraries
49
+  DEPENDS:=+zlib
50
+  TITLE+= management library
51
+endef
52
+
53
+define Package/librrd1/description
54
+$(call Package/rrdtool1/description/Default)
55
+ This package contains a shared library, used by other programs.
56
+endef
57
+
58
+define Package/rrdcgi1
59
+$(call Package/rrdtool1/Default)
60
+  SECTION:=utils
61
+  CATEGORY:=Utilities
62
+  DEPENDS:=+librrd1
63
+  TITLE+= CGI graphing tool
64
+endef
65
+
66
+define Package/rrdcgi1/description
67
+$(call Package/rrdtool1/description/Default)
68
+ This package contains the rrdcgi tool used to create web pages containing
69
+ RRD graphs based on templates.
70
+endef
71
+
72
+define Package/rrdtool1
73
+$(call Package/rrdtool1/Default)
74
+  SECTION:=utils
75
+  CATEGORY:=Utilities
76
+  DEPENDS:=+librrd1
77
+  TITLE+= management tools
78
+endef
79
+
80
+define Package/rrdtool1/description
81
+$(call Package/rrdtool1/description/Default)
82
+ This package contains command line tools used to manage RRDs.
83
+endef
84
+
85
+TARGET_CFLAGS += $(FPIC) --std=c99
86
+
87
+CONFIGURE_ARGS += \
88
+	$(DISABLE_NLS) \
89
+	--enable-shared=yes \
90
+	--enable-static=yes \
91
+	--disable-rpath \
92
+	--with-gnu-ld \
93
+	--enable-local-zlib
94
+
95
+CONFIGURE_VARS += \
96
+	ac_cv_path_PERL=no \
97
+	rd_cv_ieee_works=yes \
98
+	shrext_cmds=".so"
99
+
100
+define Build/Compile
101
+	$(MAKE) -C $(PKG_BUILD_DIR) \
102
+		DESTDIR="$(PKG_INSTALL_DIR)" \
103
+		shrext_cmds=".so" \
104
+		all install
105
+endef
106
+
107
+define Package/rrdtool1/install
108
+	$(INSTALL_DIR) $(1)/usr/bin
109
+	$(CP) $(PKG_INSTALL_DIR)/usr/bin/rrd{tool,update} $(1)/usr/bin/
110
+endef
111
+
112
+define Package/rrdcgi1/install
113
+	$(INSTALL_DIR) $(1)/usr/bin
114
+	$(CP) $(PKG_INSTALL_DIR)/usr/bin/rrdcgi $(1)/usr/bin/
115
+endef
116
+
117
+define Package/librrd1/install
118
+	$(INSTALL_DIR) $(1)/usr/lib
119
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.so.* $(1)/usr/lib/
120
+endef
121
+
122
+define Build/InstallDev
123
+	$(INSTALL_DIR) $(1)/usr/lib/rrdtool-1.0/include
124
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/rrd.h $(1)/usr/lib/rrdtool-1.0/include/
125
+	$(INSTALL_DIR)  $(1)/usr/lib/rrdtool-1.0/lib
126
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.{a,so*} $(1)/usr/lib/rrdtool-1.0/lib/
127
+endef
128
+
129
+$(eval $(call BuildPackage,librrd1))
130
+$(eval $(call BuildPackage,rrdcgi1))
131
+$(eval $(call BuildPackage,rrdtool1))

+ 21
- 0
utils/rrdtool1/patches/001-no_ordering_cd_joke.patch Visa fil

@@ -0,0 +1,21 @@
1
+diff -urN rrdtool-1.0.50/configure rrdtool-1.0.50.new/configure
2
+--- rrdtool-1.0.50/configure	2005-04-25 22:48:09.000000000 +0200
3
++++ rrdtool-1.0.50.new/configure	2009-03-09 17:25:38.000000000 +0100
4
+@@ -24873,17 +24873,12 @@
5
+ echo "${ECHO_T}and out again" >&6
6
+ 
7
+ echo $ECHO_N "ordering CD from http://people.ee.ethz.ch/~oetiker/wish $ac_c" 1>&6
8
+-sleep 1
9
+ echo $ECHO_N ".$ac_c" 1>&6
10
+-sleep 2
11
+ echo $ECHO_N ".$ac_c" 1>&6
12
+-sleep 1
13
+ echo $ECHO_N ".$ac_c" 1>&6
14
+-sleep 3
15
+ echo $ECHO_N ".$ac_c" 1>&6
16
+ echo $ECHO_N ".$ac_c" 1>&6
17
+ echo $ECHO_N ".$ac_c" 1>&6
18
+-sleep 2
19
+ echo "$as_me:$LINENO: result:  just kidding ;-)" >&5
20
+ echo "${ECHO_T} just kidding ;-)" >&6
21
+ echo

+ 24
- 0
utils/rrdtool1/patches/002-no_timezone.patch Visa fil

@@ -0,0 +1,24 @@
1
+--- a/src/rrd_tool.c
2
++++ b/src/rrd_tool.c
3
+@@ -225,11 +225,8 @@
4
+ 	  struct rusage  myusage;
5
+ 	  struct timeval starttime;
6
+ 	  struct timeval currenttime;
7
+-	  struct timezone tz;
8
+ 
9
+-	    tz.tz_minuteswest =0;
10
+-	    tz.tz_dsttime=0;
11
+-	    gettimeofday(&starttime,&tz);
12
++	    gettimeofday(&starttime,NULL);
13
+ #endif
14
+ 
15
+ 	    while (fgets(aLine, sizeof(aLine)-1, stdin)){
16
+@@ -252,7 +249,7 @@
17
+ 
18
+ #if HAVE_GETRUSAGE
19
+ 		getrusage(RUSAGE_SELF,&myusage);
20
+-		gettimeofday(&currenttime,&tz);
21
++		gettimeofday(&currenttime,NULL);
22
+ 		printf("OK u:%1.2f s:%1.2f r:%1.2f\n",
23
+ 		       (double)myusage.ru_utime.tv_sec+
24
+ 		       (double)myusage.ru_utime.tv_usec/1000000.0,

+ 13
- 0
utils/rrdtool1/patches/020-x86-float-cast.patch Visa fil

@@ -0,0 +1,13 @@
1
+Index: rrdtool-1.0.50/src/rrd_format.h
2
+===================================================================
3
+--- rrdtool-1.0.50.orig/src/rrd_format.h
4
++++ rrdtool-1.0.50/src/rrd_format.h
5
+@@ -20,7 +20,7 @@
6
+ 
7
+ #define RRD_COOKIE    "RRD"
8
+ #define RRD_VERSION   "0001"
9
+-#define FLOAT_COOKIE  8.642135E130
10
++#define FLOAT_COOKIE  ((double)8.642135E130)
11
+ 
12
+ #if defined(WIN32)
13
+ #define DNAN          ((double)fmod(0.0,0.0))    

+ 11
- 0
utils/rrdtool1/patches/030-pod2man-stderr.patch Visa fil

@@ -0,0 +1,11 @@
1
+--- rrdtool-1.0.50/doc/Makefile.am.orig	2013-11-16 11:44:50.940231208 -0500
2
++++ rrdtool-1.0.50/doc/Makefile.am	2013-11-16 11:45:09.802229483 -0500
3
+@@ -35,7 +35,7 @@
4
+ all-local: link txt man html
5
+ 
6
+ .pod.1 .pm.1 .pl.1:
7
+-	pod2man --release=$(VERSION) --center=RRDtool $<  > $@
8
++	pod2man --stderr --release=$(VERSION) --center=RRDtool $<  > $@
9
+ 
10
+ .1.txt:
11
+ 	@NROFF@ -man -Tlp $< > $@ || echo @NROFF@ failed > $@