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