2 # Copyright (C) 2011-2014 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
13 PKG_HASH
:=3ac8c29542bb48179e7086d35a1b8907a4e86aca3de3323c2f48bd74eaaf5729
15 PKG_LICENSE
:=LGPL-2.1
+
16 PKG_LICENSE_FILES
:=COPYING
17 PKG_MAINTAINER
:=Daniel Golle
<daniel@makrotopia.org
>
18 PKG_SOURCE_URL
:=https
://github.com
/OpenSC
/OpenSC
/releases
/download
/$(PKG_VERSION
)/
19 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
21 PKG_BUILD_DEPENDS
:=+libpcsclite
26 include $(INCLUDE_DIR
)/package.mk
28 define Package
/libopensc
31 TITLE
:=OpenSC libraries for smart cards
32 URL
:=https
://github.com
/OpenSC
/OpenSC
/wiki
33 DEPENDS
:=+libopenssl
+libpthread
+zlib
37 define Package
/libopensc
/description
38 OpenSC provides a set of libraries and utilities to work with smart cards.
39 Its main focus is on cards that support cryptographic operations
, and
40 facilitate their use in security applications such
as authentication
,
41 mail encryption and digital signatures.
44 define Package
/libopensc-pkcs11
47 TITLE
:=OpenSC
- PKCS11 provider
48 URL
:=https
://github.com
/OpenSC
/OpenSC
/wiki
52 define Package
/libopensc-pkcs11
/description
53 OpenSC PKCS
#11 provider
56 define Package
/libpkcs11-spy
59 TITLE
:=PKCS11 spying wrapper
60 URL
:=https
://github.com
/OpenSC
/OpenSC
/wiki
61 DEPENDS
:=+libopenssl
+libpthread
64 define Package
/libpkcs11-spy
/dscription
65 PKCS
#11 spying wrapper
68 define Package
/opensc-utils
71 TITLE
:=OpenSC
- tools for smart cards
72 URL
:=https
://github.com
/OpenSC
/OpenSC
/wiki
77 define Package
/opensc-utils
/description
82 define Package
/opensc-utils-
$(subst _
,-,$(firstword $(subst :, ,$(1))))
83 TITLE
:=$(firstword $(subst :, ,$(1))) utility from opensc
84 URL
:=https
://github.com
/OpenSC
/OpenSC
/wiki
87 DEPENDS
:=opensc-utils
$(wordlist
2,$(words $(subst :, ,$(1))),$(subst :, ,$(1)))
92 define Package
/libopensc-profile-
$(subst _
,-,$(firstword $(subst :, ,$(1))))
93 TITLE
:=$(firstword $(subst :, ,$(1))) card profile for opensc
94 URL
:=https
://github.com
/OpenSC
/OpenSC
/wiki
110 opensc-explorer
:+libncurses
:+libreadline \
132 iasecc_generic_oberthur \
150 $(foreach file
,$(TOOLS
),$(eval
$(call ToolGen
,$(file
))))
151 $(foreach file
,$(PROFILES
),$(eval
$(call ProfileGen
,$(file
))))
153 define Build
/InstallDev
154 $(INSTALL_DIR
) $(1)/usr
/lib
155 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libopensc.
{a
,so
}* $(1)/usr
/lib
/
156 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libsmm-local.
{a
,so
}* $(1)/usr
/lib
/
157 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/opensc-pkcs11.so
$(1)/usr
/lib
/
158 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkcs11-spy.so
$(1)/usr
/lib
/
159 $(INSTALL_DIR
) $(1)/usr
/lib
/pkcs11
160 $(LN
) ..
/pkcs11-spy.so
$(1)/usr
/lib
/pkcs11
/
161 $(LN
) ..
/opensc-pkcs11.so
$(1)/usr
/lib
/pkcs11
/
162 $(INSTALL_DIR
) $(1)/usr
/share
/opensc
163 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/opensc
/* $(1)/usr
/share
/opensc
/
166 define Package
/libopensc
/install
167 $(INSTALL_DIR
) $(1)/usr
/lib
168 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libopensc.so
* $(1)/usr
/lib
/
169 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libsmm-local.so
* $(1)/usr
/lib
/
170 $(INSTALL_DIR
) $(1)/etc
171 $(CP
) $(PKG_INSTALL_DIR
)/etc
/opensc.conf
$(1)/etc
/
174 define Package
/libopensc-pkcs11
/install
175 $(INSTALL_DIR
) $(1)/usr
/lib
176 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/opensc-pkcs11.so
$(1)/usr
/lib
/
177 $(INSTALL_DIR
) $(1)/usr
/lib
/pkcs11
178 $(LN
) ..
/opensc-pkcs11.so
$(1)/usr
/lib
/pkcs11
/
181 define Package
/libpkcs11-spy
/install
182 $(INSTALL_DIR
) $(1)/usr
/lib
183 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkcs11-spy.so
$(1)/usr
/lib
/
184 $(INSTALL_DIR
) $(1)/usr
/lib
/pkcs11
185 $(LN
) ..
/pkcs11-spy.so
$(1)/usr
/lib
/pkcs11
/
188 define Package
/opensc-card-profiles
189 $(INSTALL_DIR
) $(1)/usr
/share
/opensc
190 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/opensc
/* $(1)/usr
/share
/opensc
/
193 define Package
/opensc-utils
/install
198 define Package
/opensc-utils-
$(subst _
,-,$(firstword $(subst :, ,$(1))))/install
199 $(INSTALL_DIR
) $$(1)/usr
/bin
201 $(PKG_INSTALL_DIR
)/usr
/bin
/$(firstword $(subst :, ,$(1))) \
206 define ProfileInstall
207 define Package
/libopensc-profile-
$(subst _
,-,$(firstword $(subst :, ,$(1))))/install
208 $(INSTALL_DIR
) $$(1)/usr
/share
/opensc
210 $(PKG_INSTALL_DIR
)/usr
/share
/opensc
/$(firstword $(subst :, ,$(1))).profile \
211 $$(1)/usr
/share
/opensc
215 $(foreach file
,$(TOOLS
),$(eval
$(call ToolInstall
,$(file
))))
216 $(foreach file
,$(PROFILES
),$(eval
$(call ProfileInstall
,$(file
))))
218 $(eval
$(call BuildPackage
,libopensc
))
219 $(eval
$(call BuildPackage
,libopensc-pkcs11
))
220 $(eval
$(call BuildPackage
,libpkcs11-spy
))
222 $(eval
$(call BuildPackage
,opensc-utils
))
223 $(foreach file
,$(TOOLS
),$(eval
$(call BuildPackage
,opensc-utils-
$(subst _
,-,$(firstword $(subst :, ,$(file
)))))))
224 $(foreach file
,$(PROFILES
),$(eval
$(call BuildPackage
,libopensc-profile-
$(subst _
,-,$(firstword $(subst :, ,$(file
)))))))