diff mbox

python-nfc: new package

Message ID 1342774693-28905-1-git-send-email-spdawson@gmail.com
State Accepted
Headers show

Commit Message

Simon Dawson July 20, 2012, 8:58 a.m. UTC
From: Simon Dawson <spdawson@gmail.com>

Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
 package/Config.in                |    1 +
 package/python-nfc/Config.in     |    9 +++++++++
 package/python-nfc/python-nfc.mk |   20 ++++++++++++++++++++
 3 files changed, 30 insertions(+)
 create mode 100644 package/python-nfc/Config.in
 create mode 100644 package/python-nfc/python-nfc.mk

Comments

Thomas Petazzoni July 20, 2012, 7:10 p.m. UTC | #1
Le Fri, 20 Jul 2012 09:58:12 +0100,
spdawson@gmail.com a écrit :

> From: Simon Dawson <spdawson@gmail.com>
> 
> Signed-off-by: Simon Dawson <spdawson@gmail.com>

Thanks, I have merged this, but I created a setup.py file to make the
build and installation process more conventional. The thing that
decided me to do this is that the package you proposed installed
only .py files, and those are removed by default by Buildroot, which
only keep .pyc files on the target.

If you have the time, it would be nice to submit the setup.py to the
upstream project.

Thanks!

Thomas
Simon Dawson July 21, 2012, 9:11 a.m. UTC | #2
On 20 July 2012 20:10, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> If you have the time, it would be nice to submit the setup.py to the
> upstream project.

Thanks for your work on this Thomas. I'll see if I can get the setup
script accepted upstream.

Simon.
diff mbox

Patch

diff --git a/package/Config.in b/package/Config.in
index d0daa18..46747d9 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -269,6 +269,7 @@  source "package/python-dpkt/Config.in"
 source "package/python-id3/Config.in"
 source "package/python-mad/Config.in"
 source "package/python-netifaces/Config.in"
+source "package/python-nfc/Config.in"
 source "package/python-pygame/Config.in"
 source "package/python-serial/Config.in"
 source "package/python-setuptools/Config.in"
diff --git a/package/python-nfc/Config.in b/package/python-nfc/Config.in
new file mode 100644
index 0000000..c928ba1
--- /dev/null
+++ b/package/python-nfc/Config.in
@@ -0,0 +1,9 @@ 
+config BR2_PACKAGE_PYTHON_NFC
+	bool "python-nfc"
+	depends on BR2_PACKAGE_PYTHON
+	select BR2_PACKAGE_LIBUSB
+	select BR2_PACKAGE_LIBUSB_COMPAT
+	help
+	  Python module for near field communication.
+
+	  https://launchpad.net/nfcpy
diff --git a/package/python-nfc/python-nfc.mk b/package/python-nfc/python-nfc.mk
new file mode 100644
index 0000000..5a54eb0
--- /dev/null
+++ b/package/python-nfc/python-nfc.mk
@@ -0,0 +1,20 @@ 
+#############################################################
+#
+# python-nfc
+#
+#############################################################
+PYTHON_NFC_VERSION = 112
+PYTHON_NFC_SITE = https://launchpad.net/nfcpy
+PYTHON_NFC_SITE_METHOD = bzr
+PYTHON_NFC_DEPENDENCIES = python libusb libusb-compat
+
+define PYTHON_NFC_INSTALL_TARGET_CMDS
+	$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/nfc
+	cp -a $(@D)/nfc $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)
+endef
+
+define PYTHON_NFC_UNINSTALL_TARGET_CMDS
+	$(RM) -r $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/nfc
+endef
+
+$(eval $(generic-package))