2 # Copyright (C) 2009-2012 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/3695
16 PKG_MD5SUM:=cb7156346e9478c19085c918b605ed43
21 include $(INCLUDE_DIR)/package.mk
23 define Package/pcsc-lite/Default
24 TITLE:=Middleware to access a smart card using SCard API (PC/SC).
25 URL:=http://pcsclite.alioth.debian.org/
28 define Package/pcsc-lite/Default/description
29 The purpose of PC/SC Lite is to provide a Windows(R) SCard
30 interface in a very small form factor for communicating to
31 smart cards and smart cards readers.
34 define Package/libpcsclite
35 $(call Package/pcsc-lite/Default)
39 DEPENDS:=+libusb-1.0 +libpthread +librt
42 define Package/libpcsclite/description
43 $(call Package/pcsc-lite/Default/description)
45 This package contains the PC/SC shared library.
49 $(call Package/pcsc-lite/Default)
56 define Package/pcscd/description
57 $(call Package/pcsc-lite/Default/description)
59 This package contains the PC/SC daemon.
62 TARGET_CFLAGS += $(FPIC)
63 TARGET_LDFLAGS += -lpthread
69 --enable-usbdropdir=/usr/lib/pcsc/drivers
71 define Build/InstallDev
72 $(INSTALL_DIR) $(1)/usr/include/PCSC
73 $(CP) $(PKG_INSTALL_DIR)/usr/include/PCSC/* $(1)/usr/include/PCSC/
74 $(INSTALL_DIR) $(1)/usr/lib
75 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.{a,so*} $(1)/usr/lib/
76 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
77 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcsclite.pc $(1)/usr/lib/pkgconfig/
80 define Package/libpcsclite/install
81 $(INSTALL_DIR) $(1)/usr/lib
82 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.so.* $(1)/usr/lib/
85 define Package/pcscd/conffiles
86 /etc/reader.conf.d/reader.conf
89 define Package/pcscd/install
90 $(INSTALL_DIR) $(1)/usr/sbin
91 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pcscd $(1)/usr/sbin/
92 $(INSTALL_DIR) $(1)/etc/init.d
93 $(INSTALL_BIN) ./files/pcscd.init $(1)/etc/init.d/pcscd
94 $(INSTALL_DIR) $(1)/etc/reader.conf.d
97 $(eval $(call BuildPackage,libpcsclite))
98 $(eval $(call BuildPackage,pcscd))