ackages: add pyrrd (an Object-Oriented Python Interface for RRDTool)
authorNicolas Thill <nico@openwrt.org>
Sat, 3 Dec 2011 12:17:43 +0000 (12:17 +0000)
committerNicolas Thill <nico@openwrt.org>
Sat, 3 Dec 2011 12:17:43 +0000 (12:17 +0000)
This patch is a port of the PyRRD package to openwrt. PyRRD is a wrapper
for rrdtool for python. The API is so much better than the python
bindings for rrd.

Signed-off-by: Roberto Riggio <roberto.riggio@create-net.org>
SVN-Revision: 29402

lang/pyrrd/Makefile [new file with mode: 0644]
lang/pyrrd/patches/101-cross.patch [new file with mode: 0644]

diff --git a/lang/pyrrd/Makefile b/lang/pyrrd/Makefile
new file mode 100644 (file)
index 0000000..a5a3c96
--- /dev/null
@@ -0,0 +1,50 @@
+#
+# Copyright (C) 2011 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=pyrrd
+PKG_VERSION:=0.1.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=PyRRD-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://pypi.python.org/packages/source/P/PyRRD/
+PKG_MD5SUM:=c33a0760b42a23e45e423b8b9f2cd0b0
+
+PKG_BUILD_DEPENDS:=python
+PKG_BUILD_DIR:=$(BUILD_DIR)/PyRRD-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/pyrrd
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=PyRRD - An Object-Oriented Python Interface for RRDTool
+  URL:=http://code.google.com/p/pyrrd/
+  DEPENDS:=+python +distribute
+endef
+
+define Package/pyrrd/description
+  An Object-Oriented Python Interface for RRDTool
+endef
+
+define Build/Compile
+       $(call Build/Compile/PyMod,., \
+               install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
+       )
+endef
+
+define Package/pyrrd/install
+       $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+       $(CP) \
+               $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
+               $(1)$(PYTHON_PKG_DIR)/
+endef
+
+$(eval $(call BuildPackage,pyrrd))
diff --git a/lang/pyrrd/patches/101-cross.patch b/lang/pyrrd/patches/101-cross.patch
new file mode 100644 (file)
index 0000000..978e5a8
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/setup.py
++++ b/setup.py
+@@ -1,4 +1,6 @@
+-from setuptools import setup
++#!/usr/bin/env python
++
++from distutils.core import setup
+ from pyrrd import meta
+ from pyrrd.util import dist