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
:=24d03c69287291da32a30c4c38a304ad827f56cb85d83619e1f5403ab6480ef8
15 PKG_LICENSE
:=LGPL-2.1
-or-later
16 PKG_LICENSE_FILES
:=COPYING
17 PKG_CPE_ID
:=cpe
:/a
:opensc_project
:opensc
18 PKG_MAINTAINER
:=Daniel Golle
<daniel@makrotopia.org
>
19 PKG_SOURCE_URL
:=https
://github.com
/OpenSC
/OpenSC
/releases
/download
/$(PKG_VERSION
)/
20 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
22 PKG_BUILD_DEPENDS
:=pcsc-lite
27 include $(INCLUDE_DIR
)/package.mk
29 define Package
/libopensc
32 TITLE
:=OpenSC libraries for smart cards
33 URL
:=https
://github.com
/OpenSC
/OpenSC
/wiki
34 DEPENDS
:=+libopenssl
+libpthread
+zlib
38 define Package
/libopensc
/description
39 OpenSC provides a set of libraries and utilities to work with smart cards.
40 Its main focus is on cards that support cryptographic operations
, and
41 facilitate their use in security applications such
as authentication
,
42 mail encryption and digital signatures.
45 define Package
/libopensc-pkcs11
48 TITLE
:=OpenSC
- PKCS11 provider
49 URL
:=https
://github.com
/OpenSC
/OpenSC
/wiki
53 define Package
/libopensc-pkcs11
/description
54 OpenSC PKCS
#11 provider
57 define Package
/libpkcs11-spy
60 TITLE
:=PKCS11 spying wrapper
61 URL
:=https
://github.com
/OpenSC
/OpenSC
/wiki
62 DEPENDS
:=+libopenssl
+libpthread
65 define Package
/libpkcs11-spy
/dscription
66 PKCS
#11 spying wrapper
69 define Package
/opensc-utils
72 TITLE
:=OpenSC
- tools for smart cards
73 URL
:=https
://github.com
/OpenSC
/OpenSC
/wiki
78 define Package
/opensc-utils
/description
83 define Package
/opensc-utils-
$(subst _
,-,$(firstword $(subst :, ,$(1))))
84 TITLE
:=$(firstword $(subst :, ,$(1))) utility from opensc
85 URL
:=https
://github.com
/OpenSC
/OpenSC
/wiki
88 DEPENDS
:=opensc-utils
$(wordlist
2,$(words $(subst :, ,$(1))),$(subst :, ,$(1)))
93 define Package
/libopensc-profile-
$(subst _
,-,$(firstword $(subst :, ,$(1))))
94 TITLE
:=$(firstword $(subst :, ,$(1))) card profile for opensc
95 URL
:=https
://github.com
/OpenSC
/OpenSC
/wiki
119 opensc-explorer
:+libncurses
:+libreadline \
143 iasecc_generic_oberthur \
161 $(foreach file
,$(TOOLS
),$(eval
$(call ToolGen
,$(file
))))
162 $(foreach file
,$(PROFILES
),$(eval
$(call ProfileGen
,$(file
))))
164 define Build
/InstallDev
165 $(INSTALL_DIR
) $(1)/usr
/lib
166 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libopensc.
{la
,so
}* $(1)/usr
/lib
/
167 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libsmm-local.
{la
,so
}* $(1)/usr
/lib
/
168 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/opensc-pkcs11.so
$(1)/usr
/lib
/
169 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkcs11-spy.so
$(1)/usr
/lib
/
170 $(INSTALL_DIR
) $(1)/usr
/lib
/pkcs11
171 $(LN
) ..
/pkcs11-spy.so
$(1)/usr
/lib
/pkcs11
/
172 $(LN
) ..
/opensc-pkcs11.so
$(1)/usr
/lib
/pkcs11
/
173 $(INSTALL_DIR
) $(1)/usr
/share
/opensc
174 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/opensc
/* $(1)/usr
/share
/opensc
/
177 define Package
/libopensc
/install
178 $(INSTALL_DIR
) $(1)/usr
/lib
179 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libopensc.so
* $(1)/usr
/lib
/
180 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libsmm-local.so
* $(1)/usr
/lib
/
181 $(INSTALL_DIR
) $(1)/etc
182 $(CP
) $(PKG_INSTALL_DIR
)/etc
/opensc.conf
$(1)/etc
/
185 define Package
/libopensc-pkcs11
/install
186 $(INSTALL_DIR
) $(1)/usr
/lib
187 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/opensc-pkcs11.so
$(1)/usr
/lib
/
188 $(INSTALL_DIR
) $(1)/usr
/lib
/pkcs11
189 $(LN
) ..
/opensc-pkcs11.so
$(1)/usr
/lib
/pkcs11
/
192 define Package
/libpkcs11-spy
/install
193 $(INSTALL_DIR
) $(1)/usr
/lib
194 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkcs11-spy.so
$(1)/usr
/lib
/
195 $(INSTALL_DIR
) $(1)/usr
/lib
/pkcs11
196 $(LN
) ..
/pkcs11-spy.so
$(1)/usr
/lib
/pkcs11
/
199 define Package
/opensc-card-profiles
200 $(INSTALL_DIR
) $(1)/usr
/share
/opensc
201 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/opensc
/* $(1)/usr
/share
/opensc
/
204 define Package
/opensc-utils
/install
209 define Package
/opensc-utils-
$(subst _
,-,$(firstword $(subst :, ,$(1))))/install
210 $(INSTALL_DIR
) $$(1)/usr
/bin
212 $(PKG_INSTALL_DIR
)/usr
/bin
/$(firstword $(subst :, ,$(1))) \
217 define ProfileInstall
218 define Package
/libopensc-profile-
$(subst _
,-,$(firstword $(subst :, ,$(1))))/install
219 $(INSTALL_DIR
) $$(1)/usr
/share
/opensc
221 $(PKG_INSTALL_DIR
)/usr
/share
/opensc
/$(firstword $(subst :, ,$(1))).profile \
222 $$(1)/usr
/share
/opensc
226 $(foreach file
,$(TOOLS
),$(eval
$(call ToolInstall
,$(file
))))
227 $(foreach file
,$(PROFILES
),$(eval
$(call ProfileInstall
,$(file
))))
229 $(eval
$(call BuildPackage
,libopensc
))
230 $(eval
$(call BuildPackage
,libopensc-pkcs11
))
231 $(eval
$(call BuildPackage
,libpkcs11-spy
))
233 $(eval
$(call BuildPackage
,opensc-utils
))
234 $(foreach file
,$(TOOLS
),$(eval
$(call BuildPackage
,opensc-utils-
$(subst _
,-,$(firstword $(subst :, ,$(file
)))))))
235 $(foreach file
,$(PROFILES
),$(eval
$(call BuildPackage
,libopensc-profile-
$(subst _
,-,$(firstword $(subst :, ,$(file
)))))))