2 # Copyright (C) 2009-2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=http
://alioth.debian.org
/frs
/download.php
/3082
16 PKG_MD5SUM
:=6707e967fc8bb398a5d1b1089d4dff63
20 include $(INCLUDE_DIR
)/package.mk
22 define Package
/pcsc-lite
/Default
25 TITLE
:=Middleware to access a smart card using SCard API
(PC
/SC
).
26 URL
:=http
://pcsclite.alioth.debian.org
/
29 define Package
/pcsc-lite
/Default
/description
30 The purpose of PC
/SC Lite is to provide a Windows
(R
) SCard
31 interface in a very small form factor for communicating to
32 smart cards and smart cards readers.
35 define Package
/libpcsclite
36 $(call Package
/pcsc-lite
/Default
)
40 DEPENDS
:=+libusb
+libpthread
43 define Package
/libpcsclite
/description
44 $(call Package
/pcsc-lite
/Default
/description
)
46 This package contains the PC
/SC shared library.
50 $(call Package
/pcsc-lite
/Default
)
57 define Package
/pcscd
/description
58 $(call Package
/pcsc-lite
/Default
/description
)
60 This package contains the PC
/SC daemon.
63 TARGET_CFLAGS
+= $(FPIC
)
64 TARGET_LDFLAGS
+= -lpthread
66 define Build
/Configure
67 $(call Build
/Configure
/Default
, \
70 --enable-usbdropdir
=/usr
/lib
/pcsc
/drivers \
75 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
76 DESTDIR
="$(PKG_INSTALL_DIR)" \
80 define Build
/InstallDev
81 $(INSTALL_DIR
) $(1)/usr
/include/PCSC
82 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/PCSC
/* $(1)/usr
/include/PCSC
/
83 $(INSTALL_DIR
) $(1)/usr
/lib
84 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpcsclite.
{a
,so
*} $(1)/usr
/lib
/
85 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
86 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libpcsclite.
pc $(1)/usr
/lib
/pkgconfig
/
89 define Package
/libpcsclite
/install
90 $(INSTALL_DIR
) $(1)/usr
/lib
91 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpcsclite.so.
* $(1)/usr
/lib
/
94 define Package
/pcscd
/conffiles
95 /etc
/reader.conf.d
/reader.conf
98 define Package
/pcscd
/install
99 $(INSTALL_DIR
) $(1)/usr
/sbin
100 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/pcscd
$(1)/usr
/sbin
/
101 $(INSTALL_DIR
) $(1)/etc
/init.d
102 $(INSTALL_BIN
) .
/files
/pcscd.init
$(1)/etc
/init.d
/pcscd
103 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/update-reader.conf
$(1)/usr
/sbin
/
104 $(INSTALL_DIR
) $(1)/etc
/reader.conf.d
105 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/reader.conf.d
/reader.conf
$(1)/etc
/reader.conf.d
/
108 $(eval
$(call BuildPackage
,libpcsclite
))
109 $(eval
$(call BuildPackage
,pcscd
))