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