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