2010-04-19 08:27:57 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2010 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
2009-07-31 20:32:51 +00:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=libnfc
|
2010-04-19 08:27:57 +00:00
|
|
|
PKG_VERSION:=1.3.4
|
2009-07-31 20:32:51 +00:00
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
|
|
PKG_SOURCE_URL:=http://libnfc.googlecode.com/files/
|
2010-04-19 08:29:37 +00:00
|
|
|
PKG_MD5SUM:=f89f58e70b72bf4aac0567d0741719c8
|
2009-07-31 20:32:51 +00:00
|
|
|
|
2010-04-19 08:27:57 +00:00
|
|
|
PKG_FIXUP:=libtool
|
|
|
|
PKG_INSTALL:=1
|
2009-07-31 20:32:51 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/libnfc/Default
|
|
|
|
TITLE:=Near Field Communication (NFC) library
|
|
|
|
URL:=http://www.libnfc.org
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libnfc
|
2010-04-19 08:27:57 +00:00
|
|
|
$(call Package/libnfc/Default)
|
2009-07-31 20:32:51 +00:00
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
DEPENDS:=+libpcsclite +libusb +pcscd +ccid
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libnfc/description
|
|
|
|
libnfc is a free software library used to communicate with NFC
|
|
|
|
capable devices or tags. It support the four main NFC modulations:
|
|
|
|
* ISO14443-A (NXP MIFARE),
|
|
|
|
* ISO14443-B,
|
|
|
|
* JIS X 6319-4 (Sony Felica) and
|
|
|
|
* Jewel Topaz (Innovision Research & Development).
|
|
|
|
Supported NFC hardware devices are theorically all readers based
|
|
|
|
on the NXP PN53x NFC Controller.
|
|
|
|
endef
|
|
|
|
|
2010-02-20 11:43:30 +00:00
|
|
|
define Package/libnfc-examples
|
2010-04-19 08:27:57 +00:00
|
|
|
$(call Package/libnfc/Default)
|
2009-07-31 20:32:51 +00:00
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
|
|
|
DEPENDS:=+libnfc
|
|
|
|
endef
|
|
|
|
|
2010-02-20 11:43:30 +00:00
|
|
|
define Package/libnfc-examples/description
|
|
|
|
libnfc is provided with some examples like:
|
|
|
|
* tag listing
|
|
|
|
* relaying NFC
|
|
|
|
* simple UID emulation
|
|
|
|
endef
|
|
|
|
|
2009-07-31 20:32:51 +00:00
|
|
|
TARGET_CFLAGS += $(FPIC)
|
|
|
|
|
|
|
|
define Build/InstallDev
|
|
|
|
$(INSTALL_DIR) $(1)/usr/include
|
2010-02-20 11:43:30 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/nfc $(1)/usr/include/
|
2009-07-31 20:32:51 +00:00
|
|
|
$(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
|
|
|
|
|
2010-02-20 11:43:30 +00:00
|
|
|
define Package/libnfc-examples/install
|
2009-07-31 20:32:51 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
2010-02-20 11:43:30 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc* $(1)/usr/bin/
|
2009-07-31 20:32:51 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,libnfc))
|
2010-02-20 11:43:30 +00:00
|
|
|
$(eval $(call BuildPackage,libnfc-examples))
|