2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
14 PKG_MD5SUM:=d61c5755cb77207f9ad3584b26e8bf08
16 PKG_SOURCE_URL:=http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23 include $(INCLUDE_DIR)/package.mk
28 TITLE:=Round Robin Database (RRD) tools (v1.2.x)
29 SUBMENU:=Round Robin Database (RRD) tools (v1.2.x)
34 DEPENDS:=+libart +libfreetype +libpng +zlib
37 TITLE:=Round Robin Database (RRD) management library (v1.2.x)
42 DEPENDS:=librrd +cgilib
45 TITLE:=Round Robin Database (RRD) CGI graphing tool (v1.2.x)
48 define Package/rrdtool
53 TITLE:=Round Robin Database (RRD) management tools (v1.2.x)
56 define Build/Configure
57 $(call Build/Configure/Default,--enable-shared=yes \
67 --with-rrd-default-font=/usr/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf, CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/freetype2 -I$(STAGING_DIR)/usr/include/libart-2.0" \
68 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib " \
70 PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
75 rm -rf $(PKG_INSTALL_DIR)
76 mkdir -p $(PKG_INSTALL_DIR)
77 $(MAKE) -C $(PKG_BUILD_DIR) \
78 DESTDIR="$(PKG_INSTALL_DIR)" \
82 define Package/rrdtool/install
83 $(INSTALL_DIR) $(1)/usr/bin
84 $(CP) $(PKG_INSTALL_DIR)/usr/bin/rrdtool $(1)/usr/bin/
85 $(CP) $(PKG_INSTALL_DIR)/usr/bin/rrdupdate $(1)/usr/bin/
88 define Package/rrdcgi/install
89 $(INSTALL_DIR) $(1)/usr/bin
90 $(CP) $(PKG_INSTALL_DIR)/usr/bin/rrdcgi $(1)/usr/bin/
93 define Package/librrd/install
94 $(INSTALL_DIR) $(1)/usr/lib
95 $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.so.* $(1)/usr/lib/
96 $(INSTALL_DIR) $(1)/usr/share/rrdtool/fonts
97 $(CP) $(PKG_BUILD_DIR)/src/DejaVuSansMono-Roman.ttf \
98 $(1)/usr/share/rrdtool/fonts/
101 define Build/InstallDev
102 mkdir -p $(STAGING_DIR)/usr/include
103 $(CP) $(PKG_INSTALL_DIR)/usr/include/rrd.h $(STAGING_DIR)/usr/include/
104 mkdir -p $(STAGING_DIR)/usr/lib
105 $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.a $(STAGING_DIR)/usr/lib/
106 $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.so* $(STAGING_DIR)/usr/lib/
109 define Build/UninstallDev
111 $(STAGING_DIR)/usr/include/rrd.h \
112 $(STAGING_DIR)/usr/lib/librrd.a \
113 $(STAGING_DIR)/usr/lib/librrd.so*
116 $(eval $(call BuildPackage,librrd))
117 $(eval $(call BuildPackage,rrdcgi))
118 $(eval $(call BuildPackage,rrdtool))