blob: ab70d4bbbcbf9526ee51be379da95b3fbbd49c07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
#
# Copyright (C) 2009-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=pcsc-lite
PKG_VERSION:=1.9.8
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://pcsclite.apdu.fr/files/
PKG_HASH:=502d80c557ecbee285eb99fe8703eeb667bcfe067577467b50efe3420d1b2289
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=COPYING
PKG_CPE_ID:=cpe:/a:muscle:pcsc-lite
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/pcsc-lite/Default
TITLE:=Access a smart card using SCard API (PC/SC)
URL:=https://pcsclite.apdu.fr/
endef
define Package/pcsc-lite/Default/description
The purpose of PC/SC Lite is to provide a Windows(R) SCard
interface in a very small form factor for communicating to
smart cards and smart cards readers.
endef
define Package/libpcsclite
$(call Package/pcsc-lite/Default)
SECTION:=libs
CATEGORY:=Libraries
TITLE+= (library)
DEPENDS:=+libusb-1.0 +libpthread +librt
endef
define Package/libpcsclite/description
$(call Package/pcsc-lite/Default/description)
.
This package contains the PC/SC shared library.
endef
define Package/pcscd
$(call Package/pcsc-lite/Default)
SECTION:=utils
CATEGORY:=Utilities
TITLE+= (daemon)
DEPENDS:=+libpcsclite
endef
define Package/pcscd/description
$(call Package/pcsc-lite/Default/description)
.
This package contains the PC/SC daemon.
endef
TARGET_CFLAGS += $(FPIC)
TARGET_LDFLAGS += -lpthread
CONFIGURE_ARGS += \
--disable-libudev \
--disable-libsystemd \
--enable-libusb \
--enable-static \
--enable-ipcdir=/var/run/pcscd \
--enable-usbdropdir=/usr/lib/pcsc/drivers
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/PCSC
$(CP) $(PKG_INSTALL_DIR)/usr/include/PCSC/* $(1)/usr/include/PCSC/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcsclite.pc $(1)/usr/lib/pkgconfig/
endef
define Package/libpcsclite/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.so.* $(1)/usr/lib/
endef
define Package/pcscd/conffiles
/etc/reader.conf.d/reader.conf
endef
define Package/pcscd/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pcscd $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/pcscd.init $(1)/etc/init.d/pcscd
$(INSTALL_DIR) $(1)/etc/reader.conf.d
endef
$(eval $(call BuildPackage,libpcsclite))
$(eval $(call BuildPackage,pcscd))
|