aboutsummaryrefslogtreecommitdiffstats
path: root/package/python-protobuf
diff options
context:
space:
mode:
authorThiago Correa <thiago.correa@gmail.com>2012-10-05 09:36:03 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2012-10-21 21:54:38 +0200
commit0c5e24d48bdd63ce55cc8fb2b00f05b501876a60 (patch)
tree70c06dec4c772c09bb152c947a58ed9a89f23e3b /package/python-protobuf
parenteed671a9b141870000d074a229f350f776d48bbd (diff)
downloadbuildroot-novena-0c5e24d48bdd63ce55cc8fb2b00f05b501876a60.tar.gz
buildroot-novena-0c5e24d48bdd63ce55cc8fb2b00f05b501876a60.zip
python-protobuf: Add support for Python implementation of Google's Protocol Buffers
Signed-off-by: Thiago A. Correa <thiago.correa@gmail.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/python-protobuf')
-rw-r--r--package/python-protobuf/Config.in10
-rw-r--r--package/python-protobuf/python-protobuf.mk28
2 files changed, 38 insertions, 0 deletions
diff --git a/package/python-protobuf/Config.in b/package/python-protobuf/Config.in
new file mode 100644
index 000000000..ec2205757
--- /dev/null
+++ b/package/python-protobuf/Config.in
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_PYTHON_PROTOBUF
+ bool "python-protobuf"
+ depends on BR2_PACKAGE_PYTHON
+ help
+ Python implementation of the Google Protocol Buffers.
+
+ Protocol buffers are Google's language-neutral, platform-neutral,
+ extensible mechanism for serializing structured data.
+
+ http://code.google.com/p/protobuf/
diff --git a/package/python-protobuf/python-protobuf.mk b/package/python-protobuf/python-protobuf.mk
new file mode 100644
index 000000000..d853deee4
--- /dev/null
+++ b/package/python-protobuf/python-protobuf.mk
@@ -0,0 +1,28 @@
+#############################################################
+#
+# python-protobuf
+#
+#############################################################
+
+PYTHON_PROTOBUF_VERSION = $(PROTOBUF_VERSION)
+PYTHON_PROTOBUF_SOURCE = $(PROTOBUF_SOURCE)
+PYTHON_PROTOBUF_SITE = $(PROTOBUF_SITE)
+PYTHON_PROTOBUF_LICENSE = BSD-3c
+PYTHON_PROTOBUF_LICENSE_FILES = COPYING.txt
+
+PYTHON_PROTOBUF_DEPENDENCIES = python host-python-setuptools \
+ host-python-distutilscross host-protobuf
+
+define PYTHON_PROTOBUF_BUILD_CMDS
+ (cd $(@D)/python; \
+ PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \
+ PATH=$(HOST_PATH) \
+ $(HOST_DIR)/usr/bin/python setup.py build -x)
+endef
+
+define PYTHON_PROTOBUF_INSTALL_TARGET_CMDS
+ (cd $(@D)/python; PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
+ $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr)
+endef
+
+$(eval $(generic-package))