packages: Fix multiple download urls.
[openwrt/svn-archive/archive.git] / libs / rrdtool-1.0.x / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=rrdtool1
12 PKG_VERSION:=1.0.50
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/rrdtool-$(PKG_VERSION)
16 PKG_SOURCE:=rrdtool-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:= \
18 http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.0.x \
19 http://www.fastmirrors.org/rrdtool/rrdtool-1.0.x \
20 ftp://ftp.sunet.se/pub/network/monitoring/rrdtool/rrdtool-1.0.x
21 PKG_MD5SUM:=c466e2e7df95fa8e318e46437da87686
22
23 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/librrd1
28 SECTION:=libs
29 CATEGORY:=Libraries
30 DEPENDS:=+zlib
31 TITLE:=Round Robin Database (RRD) management library
32 URL:=http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/
33 endef
34
35 define Package/librrd1/description
36 Round Robin Database (RRD) management library.
37 RRD is the Acronym for Round Robin Database. RRD is a system to store and
38 display time-series data (i.e. network bandwidth, machine-room temperature,
39 server load average). It stores the data in a very compact way that will
40 not expand over time, and it presents useful graphs by processing the data
41 to enforce a certain data density. It can be used either via simple wrapper
42 scripts (from shell or Perl) or via frontends that poll network devices and
43 put friendly user interface on it.
44
45 This is version 1.0.x with cgilib-0.4, gd1.3 and libpng-1.0.9 linked into
46 librrd.so. The library is much smaller compared to the 1.2.x version with
47 separate dynamic linked libraries.
48
49 This package contains a shared library, used by other programs.
50 endef
51
52 define Package/rrdcgi1
53 SECTION:=utils
54 CATEGORY:=Utilities
55 DEPENDS:=+librrd1
56 TITLE:=Round Robin Database (RRD) CGI graphing tool
57 URL:=http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/
58 endef
59
60 define Package/rrdcgi1/description
61 Round Robin Database (RRD) CGI graphing tool.
62 RRD is the Acronym for Round Robin Database. RRD is a system to store and
63 display time-series data (i.e. network bandwidth, machine-room temperature,
64 server load average). It stores the data in a very compact way that will
65 not expand over time, and it presents useful graphs by processing the data
66 to enforce a certain data density. It can be used either via simple wrapper
67 scripts (from shell or Perl) or via frontends that poll network devices and
68 put friendly user interface on it.
69
70 This is version 1.0.x with cgilib-0.4, gd1.3 and libpng-1.0.9 linked into
71 librrd.so. The library is much smaller compared to the 1.2.x version with
72 separate dynamic linked libraries.
73
74 This package contains the rrdcgi tool used to create web pages containing
75 RRD graphs based on templates.
76 endef
77
78 define Package/rrdtool1
79 SECTION:=utils
80 CATEGORY:=Utilities
81 DEPENDS:=+librrd1
82 TITLE:=Round Robin Database (RRD) management tools
83 URL:=http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/
84 endef
85
86 define Package/rrdtool1/description
87 Round Robin Database (RRD) management tools.
88 RRD is the Acronym for Round Robin Database. RRD is a system to store and
89 display time-series data (i.e. network bandwidth, machine-room temperature,
90 server load average). It stores the data in a very compact way that will
91 not expand over time, and it presents useful graphs by processing the data
92 to enforce a certain data density. It can be used either via simple wrapper
93 scripts (from shell or Perl) or via frontends that poll network devices and
94 put friendly user interface on it.
95
96 This is version 1.0.x with cgilib-0.4, gd1.3 and libpng-1.0.9 linked into
97 librrd.so. The library is much smaller compared to the 1.2.x version with
98 separate dynamic linked libraries.
99
100 This package contains command line tools used to manage RRDs.
101 endef
102
103 define Build/Configure
104 (cd $(PKG_BUILD_DIR); rm -rf config.{status,cache} ; \
105 $(TARGET_CONFIGURE_OPTS) \
106 CFLAGS="$(TARGET_CFLAGS)" \
107 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
108 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
109 ac_cv_path_PERL=no \
110 rd_cv_ieee_works=yes \
111 shrext_cmds=".so" \
112 ./configure \
113 --target=$(GNU_TARGET_NAME) \
114 --host=$(GNU_TARGET_NAME) \
115 --build=$(GNU_HOST_NAME) \
116 --program-prefix="" \
117 --program-suffix="" \
118 --prefix=/usr \
119 --exec-prefix=/usr \
120 --bindir=/usr/bin \
121 --datadir=/usr/share \
122 --includedir=/usr/include \
123 --infodir=/usr/share/info \
124 --libdir=/usr/lib \
125 --libexecdir=/usr/lib \
126 --localstatedir=/var \
127 --mandir=/usr/share/man \
128 --sbindir=/usr/sbin \
129 --sysconfdir=/etc \
130 $(DISABLE_LARGEFILE) \
131 $(DISABLE_NLS) \
132 --enable-shared=yes \
133 --enable-static=yes \
134 --disable-rpath \
135 --with-gnu-ld \
136 --enable-local-zlib \
137 );
138 endef
139
140 define Build/Compile
141 rm -rf $(PKG_INSTALL_DIR)
142 mkdir -p $(PKG_INSTALL_DIR)
143 $(MAKE) -C $(PKG_BUILD_DIR) \
144 DESTDIR="$(PKG_INSTALL_DIR)" \
145 shrext_cmds=".so" \
146 all install
147 endef
148
149 define Package/rrdtool1/install
150 $(INSTALL_DIR) $(1)/usr/bin
151 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rrd{tool,update} $(1)/usr/bin/
152 endef
153
154 define Package/rrdcgi1/install
155 $(INSTALL_DIR) $(1)/usr/bin
156 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rrdcgi $(1)/usr/bin/
157 endef
158
159 define Package/librrd1/install
160 $(INSTALL_DIR) $(1)/usr/lib
161 $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.so.* $(1)/usr/lib/
162 endef
163
164 define Build/InstallDev
165 mkdir -p $(1)/usr/include
166 $(CP) $(PKG_INSTALL_DIR)/usr/include/rrd.h $(1)/usr/include/
167 mkdir -p $(1)/usr/lib
168 $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.{a,so*} $(1)/usr/lib/
169 endef
170
171 $(eval $(call BuildPackage,librrd1))
172 $(eval $(call BuildPackage,rrdcgi1))
173 $(eval $(call BuildPackage,rrdtool1))