[packages] remove libnotimpl, missing math functions are provided by uClibc since...
[openwrt/svn-archive/archive.git] / utils / rrdtool / Makefile
1 #
2 # Copyright (C) 2007-2009 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:=rrdtool
11 PKG_VERSION:=1.2.30
12 PKG_RELEASE:=1
13
14 PKG_SOURCE_URL:=http://oss.oetiker.ch/rrdtool/pub/
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_MD5SUM:=19b24f7184a8dbf7b48c1bbb565ad9fb
17
18 PKG_BUILD_DEPENDS:=python
19
20 PKG_FIXUP = libtool
21
22 include $(INCLUDE_DIR)/package.mk
23 -include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk)
24
25 define Package/rrdtool/Default
26 SECTION:=utils
27 CATEGORY:=Utilities
28 TITLE:=Round Robin Database (RRD)
29 endef
30
31 define Package/librrd
32 $(call Package/rrdtool/Default)
33 SECTION:=libs
34 CATEGORY:=Libraries
35 TITLE+= management library (v1.2.x)
36 DEPENDS+= +libart +libfreetype +libpng +zlib
37 endef
38
39 define Package/rrdcgi
40 $(call Package/rrdtool/Default)
41 TITLE+= CGI graphing tool (v1.2.x)
42 DEPENDS+= +librrd +cgilib
43 endef
44
45 define Package/rrdtool
46 $(call Package/rrdtool/Default)
47 TITLE+= management tools (v1.2.x)
48 DEPENDS+= +librrd
49 endef
50
51 define Package/python-rrd
52 $(call Package/rrdtool/Default)
53 SUBMENU:=Python
54 SECTION:=lang
55 CATEGORY:=Languages
56 TITLE+= python bindings (v1.2.x)
57 DEPENDS+= +python-mini +librrd
58 endef
59
60 CONFIGURE_ARGS += \
61 --enable-shared=yes \
62 --enable-static=yes \
63 --disable-rpath \
64 --with-gnu-ld \
65 --disable-mmap \
66 --disable-perl \
67 --disable-tcl \
68 --disable-ruby \
69 --without-x \
70 --with-rrd-default-font="/usr/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf" \
71
72 CONFIGURE_VARS += \
73 rd_cv_ieee_works=yes \
74 rd_cv_null_realloc=nope \
75 ac_cv_func_mmap_fixed_mapped=yes \
76
77 ifneq ($(SDK)$(CONFIG_PACKAGE_rrdcgi),)
78 CONFIGURE_ARGS += --enable-rrdcgi
79 else
80 CONFIGURE_ARGS += --disable-rrdcgi
81 endif
82
83 ifneq ($(SDK)$(CONFIG_PACKAGE_python-rrd),)
84 CONFIGURE_ARGS += \
85 --enable-python
86 CONFIGURE_VARS += \
87 PYTHON="$(PYTHON)"
88 else
89 CONFIGURE_ARGS += --disable-python
90 endif
91
92 define Build/Compile
93 $(if $(Build/Compile/PyMod),,@echo Python packaging code not found.; false)
94 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
95 endef
96
97 define Build/InstallDev
98 mkdir -p $(1)/usr/include
99 $(CP) $(PKG_INSTALL_DIR)/usr/include/rrd.h $(1)/usr/include/
100 mkdir -p $(1)/usr/lib
101 $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.{a,so*} $(1)/usr/lib/
102 $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd_th.{a,so*} $(1)/usr/lib/
103 endef
104
105 define Package/librrd/install
106 $(INSTALL_DIR) $(1)/usr/lib
107 $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.so.* $(1)/usr/lib/
108 $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd_th.so.* $(1)/usr/lib/
109 $(INSTALL_DIR) $(1)/usr/share/rrdtool/fonts
110 $(CP) $(PKG_BUILD_DIR)/src/DejaVuSansMono-Roman.ttf \
111 $(1)/usr/share/rrdtool/fonts/
112 endef
113
114 define Package/rrdcgi/install
115 $(INSTALL_DIR) $(1)/usr/bin
116 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rrdcgi $(1)/usr/bin/
117 endef
118
119 define Package/rrdtool/install
120 $(INSTALL_DIR) $(1)/usr/bin
121 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rrdtool $(1)/usr/bin/
122 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rrdupdate $(1)/usr/bin/
123 endef
124
125 define PyPackage/python-rrd/install
126 $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
127 $(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* $(1)$(PYTHON_PKG_DIR)/
128 endef
129
130 $(eval $(call BuildPackage,librrd))
131 $(eval $(call BuildPackage,rrdcgi))
132 $(eval $(call BuildPackage,rrdtool))
133
134 $(eval $(call PyPackage,python-rrd))
135 $(eval $(call BuildPackage,python-rrd))