From: nico Date: Sat, 3 Dec 2011 12:17:43 +0000 (+0000) Subject: ackages: add pyrrd (an Object-Oriented Python Interface for RRDTool) X-Git-Url: http://git.archive.openwrt.org/?a=commitdiff_plain;h=5ec8b71aa94d08cb0a88921c3b53c0ffb3fef31f;p=packages.git ackages: add pyrrd (an Object-Oriented Python Interface for RRDTool) 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 git-svn-id: svn://svn.openwrt.org/openwrt/packages@29402 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/lang/pyrrd/Makefile b/lang/pyrrd/Makefile new file mode 100644 index 000000000..a5a3c96c2 --- /dev/null +++ b/lang/pyrrd/Makefile @@ -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 index 000000000..978e5a878 --- /dev/null +++ b/lang/pyrrd/patches/101-cross.patch @@ -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