5fc6ea0cd8e7c9d01fdb6e02ff3a56532711ad29
[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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=rrdtool1
11 PKG_VERSION:=1.0.50
12 PKG_RELEASE:=1
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/rrdtool-$(PKG_VERSION)
15 PKG_SOURCE:=rrdtool-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:= \
17         http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.0.x \
18         http://www.fastmirrors.org/rrdtool/rrdtool-1.0.x \
19         ftp://ftp.sunet.se/pub/network/monitoring/rrdtool/rrdtool-1.0.x
20 PKG_MD5SUM:=c466e2e7df95fa8e318e46437da87686
21
22 PKG_FIXUP:=libtool
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/rrdtool1/Default
27   TITLE:=Round Robin Database (RRD)
28   URL:=http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/
29 endef
30
31 define Package/rrdtool1/description/Default
32  RRD is the Acronym for Round Robin Database. RRD is a system to store and
33  display time-series data (i.e. network bandwidth, machine-room temperature,
34  server load average). It stores the data in a very compact way that will
35  not expand over time, and it presents useful graphs by processing the data
36  to enforce a certain data density. It can be used either via simple wrapper
37  scripts (from shell or Perl) or via frontends that poll network devices and
38  put friendly user interface on it.
39
40  This is version 1.0.x with cgilib-0.4, gd1.3 and libpng-1.0.9 linked into
41  librrd.so. The library is much smaller compared to the 1.2.x version with
42  separate dynamic linked libraries.
43 endef
44
45 define Package/librrd1
46 $(call Package/rrdtool1/Default)
47   SECTION:=libs
48   CATEGORY:=Libraries
49   DEPENDS:=+zlib
50   TITLE+= management library
51 endef
52
53 define Package/librrd1/description
54 $(call Package/rrdtool1/description/Default)
55  This package contains a shared library, used by other programs.
56 endef
57
58 define Package/rrdcgi1
59 $(call Package/rrdtool1/Default)
60   SECTION:=utils
61   CATEGORY:=Utilities
62   DEPENDS:=+librrd1
63   TITLE+= CGI graphing tool
64 endef
65
66 define Package/rrdcgi1/description
67 $(call Package/rrdtool1/description/Default)
68  This package contains the rrdcgi tool used to create web pages containing
69  RRD graphs based on templates.
70 endef
71
72 define Package/rrdtool1
73 $(call Package/rrdtool1/Default)
74   SECTION:=utils
75   CATEGORY:=Utilities
76   DEPENDS:=+librrd1
77   TITLE+= management tools
78 endef
79
80 define Package/rrdtool1/description
81 $(call Package/rrdtool1/description/Default)
82  This package contains command line tools used to manage RRDs.
83 endef
84
85 TARGET_CFLAGS += $(FPIC) --std=c99
86
87 CONFIGURE_ARGS += \
88         $(DISABLE_LARGEFILE) \
89         $(DISABLE_NLS) \
90         --enable-shared=yes \
91         --enable-static=yes \
92         --disable-rpath \
93         --with-gnu-ld \
94         --enable-local-zlib
95
96 CONFIGURE_VARS += \
97         ac_cv_path_PERL=no \
98         rd_cv_ieee_works=yes \
99         shrext_cmds=".so"
100
101 define Build/Compile
102         rm -rf $(PKG_INSTALL_DIR)
103         mkdir -p $(PKG_INSTALL_DIR)
104         $(MAKE) -C $(PKG_BUILD_DIR) \
105                 DESTDIR="$(PKG_INSTALL_DIR)" \
106                 shrext_cmds=".so" \
107                 all install
108 endef
109
110 define Package/rrdtool1/install
111         $(INSTALL_DIR) $(1)/usr/bin
112         $(CP) $(PKG_INSTALL_DIR)/usr/bin/rrd{tool,update} $(1)/usr/bin/
113 endef
114
115 define Package/rrdcgi1/install
116         $(INSTALL_DIR) $(1)/usr/bin
117         $(CP) $(PKG_INSTALL_DIR)/usr/bin/rrdcgi $(1)/usr/bin/
118 endef
119
120 define Package/librrd1/install
121         $(INSTALL_DIR) $(1)/usr/lib
122         $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.so.* $(1)/usr/lib/
123 endef
124
125 define Build/InstallDev
126         $(INSTALL_DIR) $(1)/usr/lib/rrdtool-1.0/include
127         $(CP) $(PKG_INSTALL_DIR)/usr/include/rrd.h $(1)/usr/lib/rrdtool-1.0/include/
128         $(INSTALL_DIR)  $(1)/usr/lib/rrdtool-1.0/lib
129         $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.{a,so*} $(1)/usr/lib/rrdtool-1.0/lib/
130 endef
131
132 $(eval $(call BuildPackage,librrd1))
133 $(eval $(call BuildPackage,rrdcgi1))
134 $(eval $(call BuildPackage,rrdtool1))