[packages] normalize PKG_FIXUP - the "libtool" fixup is merely an alias for "autoreco...
[openwrt/svn-archive/archive.git] / libs / libnfc / Makefile
1 #
2 # Copyright (C) 2010-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.4.2
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://libnfc.googlecode.com/files
16 PKG_MD5SUM:=c99b2b9212b1a1b064055a199779bdd8
17
18 PKG_FIXUP:=autoreconf
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/libnfc/Default
24 TITLE:=Near Field Communication (NFC) library
25 URL:=http://www.libnfc.org
26 endef
27
28 define Package/libnfc
29 $(call Package/libnfc/Default)
30 SECTION:=libs
31 CATEGORY:=Libraries
32 DEPENDS:=+libusb +pcscd +ccid
33 endef
34
35 define Package/libnfc/description
36 libnfc is a free software library used to handle NFC capable devices.
37 It supports the four main NFC modulations:
38 * ISO14443-A (NXP MIFARE),
39 * ISO14443-B,
40 * JIS X 6319-4 (Sony Felica) and
41 * Jewel Topaz (Innovision Research & Development).
42 And depending on hardware, it supports:
43 * Read (RFID @13.56Mhz),
44 * Emulation and
45 * Peer2Peer mode.
46 endef
47
48 define Package/libnfc-bin
49 $(call Package/libnfc/Default)
50 TITLE+= (binaries)
51 SECTION:=utils
52 CATEGORY:=Utilities
53 DEPENDS:=+libnfc
54 endef
55
56 define Package/libnfc-bin/description
57 libnfc is provided with some useful tools:
58 * nfc-list: target listing;
59 * nfc-mfclassic: Mifare Classic operations;
60 * nfc-mfultralight: Mifare Ultralight operations.
61 endef
62
63 define Package/libnfc-examples
64 $(call Package/libnfc/Default)
65 TITLE+= (examples)
66 SECTION:=utils
67 CATEGORY:=Utilities
68 DEPENDS:=+libnfc
69 endef
70
71 define Package/libnfc-examples/description
72 libnfc is provided with some examples like:
73 * various targets emulation;
74 * NFC frames relay (ie. over network);
75 * manually done anticollision;
76 * etc.
77 endef
78
79 TARGET_CFLAGS += $(FPIC)
80 CONFIGURE_ARGS += --without-readline
81
82 define Build/InstallDev
83 $(INSTALL_DIR) $(1)/usr/include
84 $(CP) $(PKG_INSTALL_DIR)/usr/include/nfc $(1)/usr/include/
85 $(INSTALL_DIR) $(1)/usr/lib
86 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfc.{a,so*} $(1)/usr/lib/
87 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
88 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnfc.pc $(1)/usr/lib/pkgconfig/
89 endef
90
91 define Package/libnfc/install
92 $(INSTALL_DIR) $(1)/usr/lib
93 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfc.so.* $(1)/usr/lib/
94 endef
95
96 define Package/libnfc-bin/install
97 $(INSTALL_DIR) $(1)/usr/bin
98 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-list $(1)/usr/bin/
99 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-mfclassic $(1)/usr/bin/
100 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-mfultralight $(1)/usr/bin/
101 endef
102
103 define Package/libnfc-examples/install
104 $(INSTALL_DIR) $(1)/usr/bin
105 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-anticol $(1)/usr/bin/
106 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-dep-initiator $(1)/usr/bin/
107 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-dep-target $(1)/usr/bin/
108 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-emulate-forum-tag4 $(1)/usr/bin/
109 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-emulate-tag $(1)/usr/bin/
110 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-emulate-uid $(1)/usr/bin/
111 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-poll $(1)/usr/bin/
112 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-relay $(1)/usr/bin/
113 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc-relay-picc $(1)/usr/bin/
114 endef
115
116 $(eval $(call BuildPackage,libnfc))
117 $(eval $(call BuildPackage,libnfc-bin))
118 $(eval $(call BuildPackage,libnfc-examples))