From: Sebastian Wendel Date: Sat, 6 Dec 2014 17:15:43 +0000 (+0100) Subject: libnfc: new package including the latest version of libnfc and utils X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c3ffb23a25c7f692563236096c8a0e16c8d32f1e;p=feed%2Fpackages.git libnfc: new package including the latest version of libnfc and utils Signed-off-by: Sebastian Wendel --- diff --git a/libs/libnfc/Makefile b/libs/libnfc/Makefile new file mode 100644 index 0000000000..deda5f20ec --- /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))