[package] polipo: Add maintainer to Makefile
[openwrt/svn-archive/archive.git] / libs / libnfc / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=libnfc
4 PKG_VERSION:=1.3.3
5 PKG_RELEASE:=1
6
7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
8 PKG_SOURCE_URL:=http://libnfc.googlecode.com/files/
9 PKG_MD5SUM:=88aeb2f6c3ddf32ae52aedc9b179e49c
10
11 PKG_FIXUP = libtool
12
13 include $(INCLUDE_DIR)/package.mk
14
15 define Package/libnfc/Default
16 TITLE:=Near Field Communication (NFC) library
17 URL:=http://www.libnfc.org
18 endef
19
20 define Package/libnfc
21 $(call Package/libnfc/Default)
22 SECTION:=libs
23 CATEGORY:=Libraries
24 DEPENDS:=+libpcsclite +libusb +pcscd +ccid
25 endef
26
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),
31 * ISO14443-B,
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.
36 endef
37
38 define Package/libnfc-examples
39 $(call Package/libnfc/Default)
40 SECTION:=utils
41 CATEGORY:=Utilities
42 DEPENDS:=+libnfc
43 endef
44
45 define Package/libnfc-examples/description
46 libnfc is provided with some examples like:
47 * tag listing
48 * relaying NFC
49 * simple UID emulation
50 endef
51
52 TARGET_CFLAGS += $(FPIC)
53
54 define Build/Compile
55 $(MAKE) -C $(PKG_BUILD_DIR) \
56 DESTDIR="$(PKG_INSTALL_DIR)" \
57 all install
58 endef
59
60 define Build/InstallDev
61 $(INSTALL_DIR) $(1)/usr/include
62 $(CP) $(PKG_INSTALL_DIR)/usr/include/nfc $(1)/usr/include/
63 $(INSTALL_DIR) $(1)/usr/lib
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfc.{a,so*} $(1)/usr/lib/
65 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
66 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnfc.pc $(1)/usr/lib/pkgconfig/
67 endef
68
69 define Package/libnfc/install
70 $(INSTALL_DIR) $(1)/usr/lib
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnfc.so.* $(1)/usr/lib/
72 endef
73
74 define Package/libnfc-examples/install
75 $(INSTALL_DIR) $(1)/usr/bin
76 $(CP) $(PKG_INSTALL_DIR)/usr/bin/nfc* $(1)/usr/bin/
77 endef
78
79 $(eval $(call BuildPackage,libnfc))
80 $(eval $(call BuildPackage,libnfc-examples))