Patchwork [RFC,4/7] python-json-schema-validator: new package

login
register
mail settings
Submitter ludovic.desroches@atmel.com
Date Oct. 11, 2013, 11:58 a.m.
Message ID <1381492733-24280-5-git-send-email-ludovic.desroches@atmel.com>
Download mbox | patch
Permalink /patch/282727/
State Accepted
Headers show

Comments

ludovic.desroches@atmel.com - Oct. 11, 2013, 11:58 a.m.
From: Ludovic Desroches <ludovic.desroches@atmel.com>

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
---
 package/Config.in                                    |  1 +
 package/python-json-schema-validator/Config.in       |  6 ++++++
 .../python-json-schema-validator.mk                  | 20 ++++++++++++++++++++
 3 files changed, 27 insertions(+)
 create mode 100644 package/python-json-schema-validator/Config.in
 create mode 100644 package/python-json-schema-validator/python-json-schema-validator.mk

Patch

diff --git a/package/Config.in b/package/Config.in
index 4c95b58..115a1c5 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -355,6 +355,7 @@  menu "external python modules"
 source "package/python-bottle/Config.in"
 source "package/python-dpkt/Config.in"
 source "package/python-id3/Config.in"
+source "package/python-json-schema-validator/Config.in"
 source "package/python-keyring/Config.in"
 source "package/python-mad/Config.in"
 source "package/python-meld3/Config.in"
diff --git a/package/python-json-schema-validator/Config.in b/package/python-json-schema-validator/Config.in
new file mode 100644
index 0000000..8acf327
--- /dev/null
+++ b/package/python-json-schema-validator/Config.in
@@ -0,0 +1,6 @@ 
+config BR2_PACKAGE_PYTHON_JSON_SCHEMA_VALIDATOR
+	bool "python-json-schema-validator"
+	depends on BR2_PACKAGE_PYTHON
+	select BR2_PACKAGE_PYTHON_SETUPTOOLS
+	help
+	  JSON Schema Validator
diff --git a/package/python-json-schema-validator/python-json-schema-validator.mk b/package/python-json-schema-validator/python-json-schema-validator.mk
new file mode 100644
index 0000000..74ebb3b
--- /dev/null
+++ b/package/python-json-schema-validator/python-json-schema-validator.mk
@@ -0,0 +1,20 @@ 
+PYTHON_JSON_SCHEMA_VALIDATOR_VERSION = 2.3
+PYTHON_JSON_SCHEMA_VALIDATOR_SOURCE  = json-schema-validator-$(PYTHON_JSON_SCHEMA_VALIDATOR_VERSION).tar.gz
+PYTHON_JSON_SCHEMA_VALIDATOR_SITE = http://pypi.python.org/packages/source/j/json-schema-validator/
+PYTHON_JSON_SCHEMA_VALIDATOR_LICENSE = LGPL
+PYTHON_JSON_SCHEMA_VALIDATOR_LICENSE_FILES = LICENSE.txt
+PYTHON_JSON_SCHEMA_VALIDATOR_DEPENDENCIES = python python-setuptools
+
+define PYTHON_JSON_SCHEMA_VALIDATOR_BUILD_CMDS
+	(cd $(@D); \
+	PYTHONPATH="$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages" \
+	$(HOST_DIR)/usr/bin/python setup.py build)
+endef
+
+define PYTHON_JSON_SCHEMA_VALIDATOR_INSTALL_TARGET_CMDS
+	(cd $(@D); \
+	PYTHONPATH="$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages" \
+	$(HOST_DIR)/usr/bin/python setup.py install --prefix=/usr --root=$(TARGET_DIR))
+endef
+
+$(eval $(generic-package))