1 include $(TOPDIR)/rules.mk
7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
8 PKG_SOURCE_URL:=http://libnfc.googlecode.com/files/
9 PKG_MD5SUM:=90ce5d0445c6228f0e80ae3b62709f96
13 include $(INCLUDE_DIR)/package.mk
15 define Package/libnfc/Default
16 TITLE:=Near Field Communication (NFC) library
17 URL:=http://www.libnfc.org
21 $(call Package/libnfc/Default)
24 DEPENDS:=+libpcsclite +libusb +pcscd +ccid
27 define Package/libnfc/description
28 libnfc is a free software library used to communicate with NFC
29 capable devices or tags. It support the four main NFC modulations:
30 * ISO14443-A (NXP MIFARE),
32 * JIS X 6319-4 (Sony Felica) and
33 * Jewel Topaz (Innovision Research & Development).
34 Supported NFC hardware devices are theorically all readers based
35 on the NXP PN53x NFC Controller.
38 define Package/nfc-tools
39 $(call Package/libnfc/Default)
45 TARGET_CFLAGS += $(FPIC)
48 $(MAKE) -C $(PKG_BUILD_DIR) \
49 DESTDIR="$(PKG_INSTALL_DIR)" \
53 define Build/InstallDev
54 $(INSTALL_DIR) $(1)/usr/include
55 $(CP) $(PKG_INSTALL_DIR)/usr/include/libnfc $(1)/usr/include/
56 $(INSTALL_DIR) $(1)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfc.{a,so*} $(1)/usr/lib/
58 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnfc.pc $(1)/usr/lib/pkgconfig/
62 define Package/libnfc/install
63 $(INSTALL_DIR) $(1)/usr/lib
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfc.so.* $(1)/usr/lib/
67 define Package/nfc-tools/install
68 $(INSTALL_DIR) $(1)/usr/bin
69 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-anticol $(1)/usr/bin/
70 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-list $(1)/usr/bin/
71 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-mftool $(1)/usr/bin/
72 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-relay $(1)/usr/bin/
73 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-emulate $(1)/usr/bin/
76 $(eval $(call BuildPackage,libnfc))
77 $(eval $(call BuildPackage,nfc-tools))