2006-08-07 17:18:04 +00:00
|
|
|
#
|
2007-09-09 22:08:09 +00:00
|
|
|
# Copyright (C) 2007 OpenWrt.org
|
2006-08-07 17:18:04 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=rrdtool
|
2007-09-09 22:08:09 +00:00
|
|
|
PKG_VERSION:=1.2.23
|
2006-08-07 17:18:04 +00:00
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
2007-09-09 22:08:09 +00:00
|
|
|
PKG_SOURCE_URL:=http://oss.oetiker.ch/rrdtool/pub/
|
2006-08-07 17:18:04 +00:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
2007-09-09 22:08:09 +00:00
|
|
|
PKG_MD5SUM:=dafa161bc9c61e57636a6085c87c1fe8
|
2006-08-07 17:18:04 +00:00
|
|
|
|
2007-10-21 17:53:03 +00:00
|
|
|
PKG_BUILD_DEPENDS:=libnotimpl python-core
|
2007-01-14 13:20:01 +00:00
|
|
|
|
2006-08-07 17:18:04 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2007-10-24 15:58:19 +00:00
|
|
|
-include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk)
|
|
|
|
ifneq ($(MAKECMDGOALS),download)
|
|
|
|
$(if $(DUMP)$(Build/Compile/PyMod),,$(error Python packaging code not found.))
|
|
|
|
endif
|
2006-08-07 17:18:04 +00:00
|
|
|
|
2007-09-07 16:11:33 +00:00
|
|
|
define Package/rrdtool/Default
|
2006-08-07 17:18:04 +00:00
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
2007-09-07 16:11:33 +00:00
|
|
|
TITLE:=Round Robin Database (RRD)
|
2006-08-07 17:18:04 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/librrd
|
2007-09-07 16:11:33 +00:00
|
|
|
$(call Package/rrdtool/Default)
|
2006-08-07 17:18:04 +00:00
|
|
|
SECTION:=libs
|
2007-09-07 16:11:33 +00:00
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE+= management library (v1.2.x)
|
|
|
|
DEPENDS+= +libart +libfreetype +libpng +zlib
|
2006-08-07 17:18:04 +00:00
|
|
|
endef
|
2007-10-21 17:53:03 +00:00
|
|
|
|
2006-08-07 17:18:04 +00:00
|
|
|
define Package/rrdcgi
|
2007-09-07 16:11:33 +00:00
|
|
|
$(call Package/rrdtool/Default)
|
|
|
|
TITLE+= CGI graphing tool (v1.2.x)
|
|
|
|
DEPENDS+= +librrd +cgilib
|
2006-08-07 17:18:04 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/rrdtool
|
2007-09-07 16:11:33 +00:00
|
|
|
$(call Package/rrdtool/Default)
|
|
|
|
TITLE+= management tools (v1.2.x)
|
|
|
|
DEPENDS+= +librrd
|
2006-08-07 17:18:04 +00:00
|
|
|
endef
|
|
|
|
|
2007-10-21 17:53:03 +00:00
|
|
|
define Package/rrdpy
|
2007-07-31 22:50:55 +00:00
|
|
|
TITLE:=Round Robin Database (RRD) python bindings (v1.2.x)
|
2007-09-07 16:11:33 +00:00
|
|
|
DEPENDS+= +librrd
|
2007-07-31 22:50:55 +00:00
|
|
|
endef
|
|
|
|
|
2007-09-07 16:11:33 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--enable-shared=yes \
|
|
|
|
--enable-static=yes \
|
|
|
|
--disable-rpath \
|
|
|
|
--with-gnu-ld \
|
|
|
|
--disable-mmap \
|
|
|
|
--disable-perl \
|
|
|
|
--disable-tcl \
|
2007-10-21 17:53:03 +00:00
|
|
|
--disable-ruby \
|
2007-09-07 16:11:33 +00:00
|
|
|
--without-x \
|
|
|
|
--with-rrd-default-font="/usr/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf" \
|
|
|
|
|
|
|
|
CONFIGURE_VARS += \
|
|
|
|
CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/freetype2 -I$(STAGING_DIR)/usr/include/libart-2.0" \
|
|
|
|
LIBS="-lnotimpl" \
|
|
|
|
rd_cv_ieee_works=yes \
|
2007-09-09 22:08:09 +00:00
|
|
|
rd_cv_null_realloc=nope \
|
|
|
|
ac_cv_func_mmap_fixed_mapped=yes \
|
2007-09-07 16:11:33 +00:00
|
|
|
|
|
|
|
ifneq ($(SDK)$(CONFIG_PACKAGE_rrdcgi),)
|
|
|
|
CONFIGURE_ARGS += --enable-rrdcgi
|
|
|
|
else
|
|
|
|
CONFIGURE_ARGS += --disable-rrdcgi
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(SDK)$(CONFIG_PACKAGE_rrdpy),)
|
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--enable-python
|
|
|
|
CONFIGURE_VARS += \
|
|
|
|
PYTHON="$(PYTHON)"
|
|
|
|
else
|
|
|
|
CONFIGURE_ARGS += --disable-python
|
|
|
|
endif
|
|
|
|
|
2006-08-07 17:18:04 +00:00
|
|
|
define Build/Configure
|
2007-09-07 16:11:33 +00:00
|
|
|
$(call Build/Configure/Default)
|
|
|
|
$(call libtool_disable_rpath)
|
2006-08-07 17:18:04 +00:00
|
|
|
endef
|
|
|
|
|
2007-09-07 16:11:33 +00:00
|
|
|
define Build/Compile
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) all
|
|
|
|
$(call libtool_fixup_libdir)
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
|
2006-08-07 17:18:04 +00:00
|
|
|
endef
|
|
|
|
|
2007-09-07 16:11:33 +00:00
|
|
|
define Build/InstallDev
|
2007-10-07 03:20:26 +00:00
|
|
|
mkdir -p $(1)/usr/include
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/rrd.h $(1)/usr/include/
|
|
|
|
mkdir -p $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.{a,so*} $(1)/usr/lib/
|
2007-10-23 19:06:17 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd_th.{a,so*} $(1)/usr/lib/
|
2007-07-31 22:50:55 +00:00
|
|
|
endef
|
|
|
|
|
2007-09-07 16:11:33 +00:00
|
|
|
define Build/UninstallDev
|
|
|
|
rm -rf $(STAGING_DIR)/usr/include/rrd.h \
|
2007-10-23 19:06:17 +00:00
|
|
|
$(STAGING_DIR)/usr/lib/librrd.{a,so*} \
|
|
|
|
$(STAGING_DIR)/usr/lib/librrd_th.{a,so*}
|
2006-08-07 17:18:04 +00:00
|
|
|
endef
|
|
|
|
|
2007-10-23 19:06:17 +00:00
|
|
|
define Package/librrd/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2006-08-07 17:18:04 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.so.* $(1)/usr/lib/
|
2007-10-23 19:06:17 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd_th.so.* $(1)/usr/lib/
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/share/rrdtool/fonts
|
2006-08-07 17:18:04 +00:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/src/DejaVuSansMono-Roman.ttf \
|
|
|
|
$(1)/usr/share/rrdtool/fonts/
|
|
|
|
endef
|
|
|
|
|
2007-10-23 19:06:17 +00:00
|
|
|
define Package/rrdcgi/install
|
2007-09-07 16:11:33 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/rrdcgi $(1)/usr/bin/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define PyPackage/rrdpy/install
|
|
|
|
$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* $(1)$(PYTHON_PKG_DIR)/
|
2006-08-07 17:18:04 +00:00
|
|
|
endef
|
|
|
|
|
2007-09-07 16:11:33 +00:00
|
|
|
define Package/rrdtool/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/rrdtool $(1)/usr/bin/
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/rrdupdate $(1)/usr/bin/
|
2006-08-07 17:18:04 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,librrd))
|
|
|
|
$(eval $(call BuildPackage,rrdcgi))
|
2007-09-07 16:11:33 +00:00
|
|
|
$(eval $(call PyPackage,rrdpy))
|
2007-10-21 17:53:03 +00:00
|
|
|
$(eval $(call BuildPackage,rrdpy))
|
2006-08-07 17:18:04 +00:00
|
|
|
$(eval $(call BuildPackage,rrdtool))
|