From c3ffb23a25c7f692563236096c8a0e16c8d32f1e Mon Sep 17 00:00:00 2001 From: Sebastian Wendel Date: Sat, 6 Dec 2014 18:15:43 +0100 Subject: [PATCH 1/3] libnfc: new package including the latest version of libnfc and utils Signed-off-by: Sebastian Wendel --- libs/libnfc/Makefile | 98 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 libs/libnfc/Makefile diff --git a/libs/libnfc/Makefile b/libs/libnfc/Makefile new file mode 100644 index 000000000..deda5f20e --- /dev/null +++ b/libs/libnfc/Makefile @@ -0,0 +1,98 @@ +# +# Copyright (C) 2006-2012 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:=libnfc +PKG_VERSION:=1.7.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=https://bintray.com/artifact/download/nfc-tools/sources/ +PKG_MD5SUM:=a3bea901778ac324e802b8ffb86820ff + +PKG_LICENSE:=LGPL-2.1 +PKG_MAINTAINER:=Sebastian Wendel + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libnfc/Default + TITLE:=A open source library for Near Field Communication (NFC) + URL:=http://nfc-tools.org/ + MAINTAINER:=Sebastian Wendel +endef + +define Package/libnfc + $(call Package/libnfc/Default) + SECTION:=libs + CATEGORY:=Libraries + DEPENDS:=+libusb-compat +pcscd +ccid +endef + +define Package/libnfc/description + libnfc is the first libre, platform-independent, low level NFC SDK and Programmers API + + * manipulate Jewel Topaz tags using libnfc + * manipulate MIFARE Classic and Ultralight tags using libnfc + +endef + +define Package/nfc-utils + $(call Package/libnfc/Default) + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libnfc +endef + +define Package/nfc-utils/description + Provide some examples shared functions like print, parity calculation, options parsing + + * Emulates a NFC Forum Tag Type 4 v2.0 (or v1.0) + * Jewel dump/restore tool + * Lists the first target present of each founded device + * MIFARE Classic manipulation example + * MIFARE Ultralight dump/restore tool + * Extract NDEF Message from a NFC Forum Tag Type 3 + * Relay example using two PN532 devices + * Lists each available NFC device + +endef + +TARGET_CFLAGS+=$(FPIC) +CONFIGURE_ARGS+=--without-readline + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/nfc $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfc.{a,so*} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnfc.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libnfc/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfc.so.* $(1)/usr/lib/ +endef + +define Package/nfc-utils/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-emulate-forum-tag4 $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-jewel $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-list $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-mfclassic $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-mfultralight $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-read-forum-tag3 $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-relay-picc $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-scan-device $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,libnfc)) +$(eval $(call BuildPackage,nfc-utils)) From 158f4bf71fa2ba1c1aaa6eb39595e133cfc9897f Mon Sep 17 00:00:00 2001 From: Sebastian Wendel Date: Sun, 7 Dec 2014 15:23:47 +0100 Subject: [PATCH 2/3] libnfc: updated Makefile copyright header Signed-off-by: Sebastian Wendel packages@sourceindex.de --- libs/libnfc/Makefile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libs/libnfc/Makefile b/libs/libnfc/Makefile index deda5f20e..df54be6f6 100644 --- a/libs/libnfc/Makefile +++ b/libs/libnfc/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2012 OpenWrt.org +# Copyright (C) 2007-2014 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -10,6 +10,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libnfc PKG_VERSION:=1.7.1 PKG_RELEASE:=1 +PKG_INSTALL:=1 +PKG_FIXUP:=autoreconf PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://bintray.com/artifact/download/nfc-tools/sources/ @@ -18,15 +20,11 @@ PKG_MD5SUM:=a3bea901778ac324e802b8ffb86820ff PKG_LICENSE:=LGPL-2.1 PKG_MAINTAINER:=Sebastian Wendel -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - include $(INCLUDE_DIR)/package.mk define Package/libnfc/Default TITLE:=A open source library for Near Field Communication (NFC) URL:=http://nfc-tools.org/ - MAINTAINER:=Sebastian Wendel endef define Package/libnfc From 53cbe8c869a8e3bcdd81709ac7ffd228c6102d9c Mon Sep 17 00:00:00 2001 From: Sebastian Wendel Date: Wed, 10 Dec 2014 18:02:38 +0100 Subject: [PATCH 3/3] libnfc: switched to developer git repository Signed-off-by: Sebastian Wendel --- libs/libnfc/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libs/libnfc/Makefile b/libs/libnfc/Makefile index df54be6f6..9a144d253 100644 --- a/libs/libnfc/Makefile +++ b/libs/libnfc/Makefile @@ -13,9 +13,11 @@ PKG_RELEASE:=1 PKG_INSTALL:=1 PKG_FIXUP:=autoreconf -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=https://bintray.com/artifact/download/nfc-tools/sources/ -PKG_MD5SUM:=a3bea901778ac324e802b8ffb86820ff +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_URL:=https://code.google.com/p/libnfc/ +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=$(PKG_NAME)-$(PKG_VERSION) PKG_LICENSE:=LGPL-2.1 PKG_MAINTAINER:=Sebastian Wendel