You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
2.8 KiB

  1. #
  2. # Copyright (C) 2007-2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libnfc
  9. PKG_VERSION:=1.7.1
  10. PKG_RELEASE:=1
  11. PKG_INSTALL:=1
  12. PKG_FIXUP:=autoreconf
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  14. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  15. PKG_SOURCE_URL:=https://github.com/nfc-tools/libnfc
  16. PKG_SOURCE_PROTO:=git
  17. PKG_SOURCE_VERSION:=$(PKG_NAME)-$(PKG_VERSION)
  18. PKG_LICENSE:=LGPL-2.1
  19. PKG_MAINTAINER:=Sebastian Wendel <packages@sourceindex.de>
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/libnfc/Default
  22. TITLE:=A open source library for Near Field Communication (NFC)
  23. URL:=http://nfc-tools.org/
  24. endef
  25. define Package/libnfc
  26. $(call Package/libnfc/Default)
  27. SECTION:=libs
  28. CATEGORY:=Libraries
  29. DEPENDS:=+libusb-compat +pcscd +ccid
  30. endef
  31. define Package/libnfc/description
  32. libnfc is the first libre, platform-independent, low level NFC SDK and Programmers API
  33. * manipulate Jewel Topaz tags using libnfc
  34. * manipulate MIFARE Classic and Ultralight tags using libnfc
  35. endef
  36. define Package/nfc-utils
  37. $(call Package/libnfc/Default)
  38. SECTION:=utils
  39. CATEGORY:=Utilities
  40. DEPENDS:=+libnfc
  41. endef
  42. define Package/nfc-utils/description
  43. Provide some examples shared functions like print, parity calculation, options parsing
  44. * Emulates a NFC Forum Tag Type 4 v2.0 (or v1.0)
  45. * Jewel dump/restore tool
  46. * Lists the first target present of each founded device
  47. * MIFARE Classic manipulation example
  48. * MIFARE Ultralight dump/restore tool
  49. * Extract NDEF Message from a NFC Forum Tag Type 3
  50. * Relay example using two PN532 devices
  51. * Lists each available NFC device
  52. endef
  53. TARGET_CFLAGS+=$(FPIC)
  54. CONFIGURE_ARGS+=--without-readline
  55. define Build/InstallDev
  56. $(INSTALL_DIR) $(1)/usr/include
  57. $(CP) $(PKG_INSTALL_DIR)/usr/include/nfc $(1)/usr/include/
  58. $(INSTALL_DIR) $(1)/usr/lib
  59. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfc.{a,so*} $(1)/usr/lib/
  60. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  61. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnfc.pc $(1)/usr/lib/pkgconfig/
  62. endef
  63. define Package/libnfc/install
  64. $(INSTALL_DIR) $(1)/usr/lib
  65. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfc.so.* $(1)/usr/lib/
  66. endef
  67. define Package/nfc-utils/install
  68. $(INSTALL_DIR) $(1)/usr/bin
  69. $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-emulate-forum-tag4 $(1)/usr/bin/
  70. $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-jewel $(1)/usr/bin/
  71. $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-list $(1)/usr/bin/
  72. $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-mfclassic $(1)/usr/bin/
  73. $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-mfultralight $(1)/usr/bin/
  74. $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-read-forum-tag3 $(1)/usr/bin/
  75. $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-relay-picc $(1)/usr/bin/
  76. $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-scan-device $(1)/usr/bin/
  77. endef
  78. $(eval $(call BuildPackage,libnfc))
  79. $(eval $(call BuildPackage,nfc-utils))