[package] btrfs-utils: put it in the correct submenu
[openwrt/svn-archive/archive.git] / utils / pcsc-lite / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=pcsc-lite
4 PKG_VERSION:=1.5.5
5 PKG_RELEASE:=3
6
7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
8 PKG_SOURCE_URL:=http://alioth.debian.org/frs/download.php/3082
9 PKG_MD5SUM:=6707e967fc8bb398a5d1b1089d4dff63
10
11 PKG_FIXUP:=libtool
12
13 include $(INCLUDE_DIR)/package.mk
14
15 define Package/pcsc-lite/Default
16 SECTION:=utils
17 CATEGORY:=Utilities
18 TITLE:=Middleware to access a smart card using SCard API (PC/SC).
19 URL:=http://pcsclite.alioth.debian.org/
20 endef
21
22 define Package/pcsc-lite/Default/description
23 The purpose of PC/SC Lite is to provide a Windows(R) SCard
24 interface in a very small form factor for communicating to
25 smart cards and smart cards readers.
26 endef
27
28 define Package/libpcsclite
29 $(call Package/pcsc-lite/Default)
30 SECTION:=libs
31 CATEGORY:=Libraries
32 TITLE+= (library)
33 DEPENDS:=+libusb +libpthread
34 endef
35
36 define Package/libpcsclite/description
37 $(call Package/pcsc-lite/Default/description)
38 .
39 This package contains the PC/SC shared library.
40 endef
41
42 define Package/pcscd
43 $(call Package/pcsc-lite/Default)
44 SECTION:=utils
45 CATEGORY:=Utilities
46 TITLE+= (daemon)
47 DEPENDS:=+libpcsclite
48 endef
49
50 define Package/pcscd/description
51 $(call Package/pcsc-lite/Default/description)
52 .
53 This package contains the PC/SC daemon.
54 endef
55
56 TARGET_CFLAGS += $(FPIC)
57 TARGET_LDFLAGS += -lpthread
58
59 define Build/Configure
60 $(call Build/Configure/Default, \
61 --disable-libhal \
62 --enable-libusb \
63 --enable-usbdropdir=/usr/lib/pcsc/drivers \
64 )
65 endef
66
67 define Build/Compile
68 $(MAKE) -C $(PKG_BUILD_DIR) \
69 DESTDIR="$(PKG_INSTALL_DIR)" \
70 all install
71 endef
72
73 define Build/InstallDev
74 $(INSTALL_DIR) $(1)/usr/include/PCSC
75 $(CP) $(PKG_INSTALL_DIR)/usr/include/PCSC/* $(1)/usr/include/PCSC/
76 $(INSTALL_DIR) $(1)/usr/lib
77 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.{a,so*} $(1)/usr/lib/
78 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
79 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcsclite.pc $(1)/usr/lib/pkgconfig/
80 endef
81
82 define Package/libpcsclite/install
83 $(INSTALL_DIR) $(1)/usr/lib
84 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.so.* $(1)/usr/lib/
85 endef
86
87 define Package/pcscd/conffiles
88 /etc/reader.conf.d/reader.conf
89 endef
90
91 define Package/pcscd/install
92 $(INSTALL_DIR) $(1)/usr/sbin
93 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pcscd $(1)/usr/sbin/
94 $(INSTALL_DIR) $(1)/etc/init.d
95 $(INSTALL_BIN) ./files/pcscd.init $(1)/etc/init.d/pcscd
96 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/update-reader.conf $(1)/usr/sbin/
97 $(INSTALL_DIR) $(1)/etc/reader.conf.d
98 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/reader.conf.d/reader.conf $(1)/etc/reader.conf.d/
99 endef
100
101 $(eval $(call BuildPackage,libpcsclite))
102 $(eval $(call BuildPackage,pcscd))