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:=https://alioth.debian.org/frs/download.php/file/4203
16 PKG_MD5SUM:=ec7d0114016c788c1c09859c84860f6cec6c4595436d23245105154b9c046bb2
17 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
18 PKG_LICENSE:=BSD-3-Clause
19 PKG_LICENSE_FILES:=COPYING
24 include $(INCLUDE_DIR)/package.mk
26 define Package/pcsc-lite/Default
27 TITLE:=Middleware to access a smart card using SCard API (PC/SC).
28 URL:=http://pcsclite.alioth.debian.org/
31 define Package/pcsc-lite/Default/description
32 The purpose of PC/SC Lite is to provide a Windows(R) SCard
33 interface in a very small form factor for communicating to
34 smart cards and smart cards readers.
37 define Package/libpcsclite
38 $(call Package/pcsc-lite/Default)
42 DEPENDS:=+libusb-1.0 +libpthread +librt
45 define Package/libpcsclite/description
46 $(call Package/pcsc-lite/Default/description)
48 This package contains the PC/SC shared library.
52 $(call Package/pcsc-lite/Default)
59 define Package/pcscd/description
60 $(call Package/pcsc-lite/Default/description)
62 This package contains the PC/SC daemon.
65 TARGET_CFLAGS += $(FPIC)
66 TARGET_LDFLAGS += -lpthread
72 --enable-usbdropdir=/usr/lib/pcsc/drivers
74 define Build/InstallDev
75 $(INSTALL_DIR) $(1)/usr/include/PCSC
76 $(CP) $(PKG_INSTALL_DIR)/usr/include/PCSC/* $(1)/usr/include/PCSC/
77 $(INSTALL_DIR) $(1)/usr/lib
78 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.{a,so*} $(1)/usr/lib/
79 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
80 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcsclite.pc $(1)/usr/lib/pkgconfig/
83 define Package/libpcsclite/install
84 $(INSTALL_DIR) $(1)/usr/lib
85 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.so.* $(1)/usr/lib/
88 define Package/pcscd/conffiles
89 /etc/reader.conf.d/reader.conf
92 define Package/pcscd/install
93 $(INSTALL_DIR) $(1)/usr/sbin
94 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pcscd $(1)/usr/sbin/
95 $(INSTALL_DIR) $(1)/etc/init.d
96 $(INSTALL_BIN) ./files/pcscd.init $(1)/etc/init.d/pcscd
97 $(INSTALL_DIR) $(1)/etc/reader.conf.d
100 $(eval $(call BuildPackage,libpcsclite))
101 $(eval $(call BuildPackage,pcscd))