clean up rrdtool makefile and fix avr32 compile
[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 CONFIGURE_ARGS += \
102 $(DISABLE_LARGEFILE) \
103 $(DISABLE_NLS) \
104 --enable-shared=yes \
105 --enable-static=yes \
106 --disable-rpath \
107 --with-gnu-ld \
108 --enable-local-zlib
109
110 CONFIGURE_VARS += \
111 ac_cv_path_PERL=no \
112 rd_cv_ieee_works=yes \
113 shrext_cmds=".so"
114
115 define Build/Compile
116 rm -rf $(PKG_INSTALL_DIR)
117 mkdir -p $(PKG_INSTALL_DIR)
118 $(MAKE) -C $(PKG_BUILD_DIR) \
119 DESTDIR="$(PKG_INSTALL_DIR)" \
120 shrext_cmds=".so" \
121 all install
122 endef
123
124 define Package/rrdtool1/install
125 $(INSTALL_DIR) $(1)/usr/bin
126 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rrd{tool,update} $(1)/usr/bin/
127 endef
128
129 define Package/rrdcgi1/install
130 $(INSTALL_DIR) $(1)/usr/bin
131 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rrdcgi $(1)/usr/bin/
132 endef
133
134 define Package/librrd1/install
135 $(INSTALL_DIR) $(1)/usr/lib
136 $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.so.* $(1)/usr/lib/
137 endef
138
139 define Build/InstallDev
140 mkdir -p $(1)/usr/include
141 $(CP) $(PKG_INSTALL_DIR)/usr/include/rrd.h $(1)/usr/include/
142 mkdir -p $(1)/usr/lib
143 $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.{a,so*} $(1)/usr/lib/
144 endef
145
146 $(eval $(call BuildPackage,librrd1))
147 $(eval $(call BuildPackage,rrdcgi1))
148 $(eval $(call BuildPackage,rrdtool1))