Browse Source

libnfc: new package including the latest version of libnfc and utils

Sebastian Wendel 10 years ago
parent
commit
c3ffb23a25
1 changed files with 98 additions and 0 deletions
  1. 98
    0
      libs/libnfc/Makefile

+ 98
- 0
libs/libnfc/Makefile View File

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