add packages_10.03.2 in preparation for the 10.03.2 interim release
[10.03/packages.git] / libs / libnfc / Makefile
1 #
2 # Copyright (C) 2010 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.3.4
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:=f89f58e70b72bf4aac0567d0741719c8
17
18 PKG_FIXUP:=libtool
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:=+libpcsclite +libusb +pcscd +ccid
33 endef
34
35 define Package/libnfc/description
36   libnfc is a free software library used to communicate with NFC 
37   capable devices or tags. It support 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   Supported NFC hardware devices are theorically all readers based 
43   on the NXP PN53x NFC Controller.
44 endef
45
46 define Package/libnfc-examples
47 $(call Package/libnfc/Default)
48   SECTION:=utils
49   CATEGORY:=Utilities
50   DEPENDS:=+libnfc
51 endef
52
53 define Package/libnfc-examples/description
54   libnfc is provided with some examples like:
55    * tag listing
56    * relaying NFC
57    * simple UID emulation
58 endef
59
60 TARGET_CFLAGS += $(FPIC)
61
62 define Build/InstallDev
63         $(INSTALL_DIR) $(1)/usr/include
64         $(CP) $(PKG_INSTALL_DIR)/usr/include/nfc $(1)/usr/include/
65         $(INSTALL_DIR) $(1)/usr/lib
66         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfc.{a,so*} $(1)/usr/lib/
67         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
68         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnfc.pc $(1)/usr/lib/pkgconfig/
69 endef
70
71 define Package/libnfc/install
72         $(INSTALL_DIR) $(1)/usr/lib
73         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfc.so.* $(1)/usr/lib/
74 endef
75
76 define Package/libnfc-examples/install
77         $(INSTALL_DIR) $(1)/usr/bin
78         $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc* $(1)/usr/bin/
79 endef
80
81 $(eval $(call BuildPackage,libnfc))
82 $(eval $(call BuildPackage,libnfc-examples))