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
12 PKG_RELEASE
:=$(AUTORELEASE
)
13 PKG_HASH
:=8d4e5347195ebea332be585df61dcc470331c26969e4b0447c851fb0844c7186
15 PKG_LICENSE
:=LGPL-2.1
-or-later
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
:=pcsc-lite
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
114 opensc-explorer
:+libncurses
:+libreadline \
136 iasecc_generic_oberthur \
154 $(foreach file
,$(TOOLS
),$(eval
$(call ToolGen
,$(file
))))
155 $(foreach file
,$(PROFILES
),$(eval
$(call ProfileGen
,$(file
))))
157 define Build
/InstallDev
158 $(INSTALL_DIR
) $(1)/usr
/lib
159 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libopensc.
{la
,so
}* $(1)/usr
/lib
/
160 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libsmm-local.
{la
,so
}* $(1)/usr
/lib
/
161 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/opensc-pkcs11.so
$(1)/usr
/lib
/
162 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkcs11-spy.so
$(1)/usr
/lib
/
163 $(INSTALL_DIR
) $(1)/usr
/lib
/pkcs11
164 $(LN
) ..
/pkcs11-spy.so
$(1)/usr
/lib
/pkcs11
/
165 $(LN
) ..
/opensc-pkcs11.so
$(1)/usr
/lib
/pkcs11
/
166 $(INSTALL_DIR
) $(1)/usr
/share
/opensc
167 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/opensc
/* $(1)/usr
/share
/opensc
/
170 define Package
/libopensc
/install
171 $(INSTALL_DIR
) $(1)/usr
/lib
172 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libopensc.so
* $(1)/usr
/lib
/
173 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libsmm-local.so
* $(1)/usr
/lib
/
174 $(INSTALL_DIR
) $(1)/etc
175 $(CP
) $(PKG_INSTALL_DIR
)/etc
/opensc.conf
$(1)/etc
/
178 define Package
/libopensc-pkcs11
/install
179 $(INSTALL_DIR
) $(1)/usr
/lib
180 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/opensc-pkcs11.so
$(1)/usr
/lib
/
181 $(INSTALL_DIR
) $(1)/usr
/lib
/pkcs11
182 $(LN
) ..
/opensc-pkcs11.so
$(1)/usr
/lib
/pkcs11
/
185 define Package
/libpkcs11-spy
/install
186 $(INSTALL_DIR
) $(1)/usr
/lib
187 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkcs11-spy.so
$(1)/usr
/lib
/
188 $(INSTALL_DIR
) $(1)/usr
/lib
/pkcs11
189 $(LN
) ..
/pkcs11-spy.so
$(1)/usr
/lib
/pkcs11
/
192 define Package
/opensc-card-profiles
193 $(INSTALL_DIR
) $(1)/usr
/share
/opensc
194 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/opensc
/* $(1)/usr
/share
/opensc
/
197 define Package
/opensc-utils
/install
202 define Package
/opensc-utils-
$(subst _
,-,$(firstword $(subst :, ,$(1))))/install
203 $(INSTALL_DIR
) $$(1)/usr
/bin
205 $(PKG_INSTALL_DIR
)/usr
/bin
/$(firstword $(subst :, ,$(1))) \
210 define ProfileInstall
211 define Package
/libopensc-profile-
$(subst _
,-,$(firstword $(subst :, ,$(1))))/install
212 $(INSTALL_DIR
) $$(1)/usr
/share
/opensc
214 $(PKG_INSTALL_DIR
)/usr
/share
/opensc
/$(firstword $(subst :, ,$(1))).profile \
215 $$(1)/usr
/share
/opensc
219 $(foreach file
,$(TOOLS
),$(eval
$(call ToolInstall
,$(file
))))
220 $(foreach file
,$(PROFILES
),$(eval
$(call ProfileInstall
,$(file
))))
222 $(eval
$(call BuildPackage
,libopensc
))
223 $(eval
$(call BuildPackage
,libopensc-pkcs11
))
224 $(eval
$(call BuildPackage
,libpkcs11-spy
))
226 $(eval
$(call BuildPackage
,opensc-utils
))
227 $(foreach file
,$(TOOLS
),$(eval
$(call BuildPackage
,opensc-utils-
$(subst _
,-,$(firstword $(subst :, ,$(file
)))))))
228 $(foreach file
,$(PROFILES
),$(eval
$(call BuildPackage
,libopensc-profile-
$(subst _
,-,$(firstword $(subst :, ,$(file
)))))))