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_LICENSE
:=LGPL-2.1
+
14 PKG_LICENSE_FILES
:=COPYING
15 PKG_MAINTAINER
:=Daniel Golle
<daniel@makrotopia.org
>
17 PKG_RELEASE
=$(PKG_SOURCE_VERSION
)
20 PKG_SOURCE_URL
:=https
://github.com
/OpenSC
/OpenSC.git
21 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
22 PKG_SOURCE_VERSION
:=a09ca246a797230c14bc33a34f2dddc4a4dbff40
23 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
24 PKG_BUILD_DEPENDS
:=+libpcsclite
29 include $(INCLUDE_DIR
)/package.mk
31 define Package
/libopensc
34 TITLE
:=OpenSC libraries for smart cards
35 URL
:=https
://github.com
/OpenSC
/OpenSC
/wiki
36 DEPENDS
:=+libopenssl
+libpthread
40 define Package
/libopensc
/description
41 OpenSC provides a set of libraries and utilities to work with smart cards.
42 Its main focus is on cards that support cryptographic operations
, and
43 facilitate their use in security applications such
as authentication
,
44 mail encryption and digital signatures.
47 define Package
/libopensc-pkcs11
50 TITLE
:=OpenSC
- PKCS11 provider
51 URL
:=https
://github.com
/OpenSC
/OpenSC
/wiki
55 define Package
/libopensc-pkcs11
/description
56 OpenSC PKCS
#11 provider
59 define Package
/libpkcs11-spy
62 TITLE
:=PKCS11 spying wrapper
63 URL
:=https
://github.com
/OpenSC
/OpenSC
/wiki
64 DEPENDS
:=+libopenssl
+libpthread
67 define Package
/libpkcs11-spy
/dscription
68 PKCS
#11 spying wrapper
71 define Package
/opensc-utils
74 TITLE
:=OpenSC
- tools for smart cards
75 URL
:=https
://github.com
/OpenSC
/OpenSC
/wiki
80 define Package
/opensc-utils
/description
85 define Package
/opensc-utils-
$(subst _
,-,$(firstword $(subst :, ,$(1))))
86 TITLE
:=$(firstword $(subst :, ,$(1))) utility from opensc
87 URL
:=https
://github.com
/OpenSC
/OpenSC
/wiki
90 DEPENDS
:=opensc-utils
$(wordlist
2,$(words $(subst :, ,$(1))),$(subst :, ,$(1)))
95 define Package
/libopensc-profile-
$(subst _
,-,$(firstword $(subst :, ,$(1))))
96 TITLE
:=$(firstword $(subst :, ,$(1))) card profile for opensc
97 URL
:=https
://github.com
/OpenSC
/OpenSC
/wiki
113 opensc-explorer
:+libncurses
:+libreadline \
135 iasecc_generic_oberthur \
153 $(foreach file
,$(TOOLS
),$(eval
$(call ToolGen
,$(file
))))
154 $(foreach file
,$(PROFILES
),$(eval
$(call ProfileGen
,$(file
))))
156 define Build
/InstallDev
157 $(INSTALL_DIR
) $(1)/usr
/lib
158 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libopensc.
{a
,so
}* $(1)/usr
/lib
/
159 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libsmm-local.
{a
,so
}* $(1)/usr
/lib
/
160 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/opensc-pkcs11.so
$(1)/usr
/lib
/
161 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkcs11-spy.so
$(1)/usr
/lib
/
162 $(INSTALL_DIR
) $(1)/usr
/lib
/pkcs11
163 $(LN
) ..
/pkcs11-spy.so
$(1)/usr
/lib
/pkcs11
/
164 $(LN
) ..
/opensc-pkcs11.so
$(1)/usr
/lib
/pkcs11
/
165 $(INSTALL_DIR
) $(1)/usr
/share
/opensc
166 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/opensc
/* $(1)/usr
/share
/opensc
/
169 define Package
/libopensc
/install
170 $(INSTALL_DIR
) $(1)/usr
/lib
171 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libopensc.so
* $(1)/usr
/lib
/
172 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libsmm-local.so
* $(1)/usr
/lib
/
173 $(INSTALL_DIR
) $(1)/etc
174 $(CP
) $(PKG_INSTALL_DIR
)/etc
/opensc.conf
$(1)/etc
/
177 define Package
/libopensc-pkcs11
/install
178 $(INSTALL_DIR
) $(1)/usr
/lib
179 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/opensc-pkcs11.so
$(1)/usr
/lib
/
180 $(INSTALL_DIR
) $(1)/usr
/lib
/pkcs11
181 $(LN
) ..
/opensc-pkcs11.so
$(1)/usr
/lib
/pkcs11
/
184 define Package
/libpkcs11-spy
/install
185 $(INSTALL_DIR
) $(1)/usr
/lib
186 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkcs11-spy.so
$(1)/usr
/lib
/
187 $(INSTALL_DIR
) $(1)/usr
/lib
/pkcs11
188 $(LN
) ..
/pkcs11-spy.so
$(1)/usr
/lib
/pkcs11
/
191 define Package
/opensc-card-profiles
192 $(INSTALL_DIR
) $(1)/usr
/share
/opensc
193 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/opensc
/* $(1)/usr
/share
/opensc
/
196 define Package
/opensc-utils
/install
201 define Package
/opensc-utils-
$(subst _
,-,$(firstword $(subst :, ,$(1))))/install
202 $(INSTALL_DIR
) $$(1)/usr
/bin
204 $(PKG_INSTALL_DIR
)/usr
/bin
/$(firstword $(subst :, ,$(1))) \
209 define ProfileInstall
210 define Package
/libopensc-profile-
$(subst _
,-,$(firstword $(subst :, ,$(1))))/install
211 $(INSTALL_DIR
) $$(1)/usr
/share
/opensc
213 $(PKG_INSTALL_DIR
)/usr
/share
/opensc
/$(firstword $(subst :, ,$(1))).profile \
214 $$(1)/usr
/share
/opensc
218 $(foreach file
,$(TOOLS
),$(eval
$(call ToolInstall
,$(file
))))
219 $(foreach file
,$(PROFILES
),$(eval
$(call ProfileInstall
,$(file
))))
221 $(eval
$(call BuildPackage
,libopensc
))
222 $(eval
$(call BuildPackage
,libopensc-pkcs11
))
223 $(eval
$(call BuildPackage
,libpkcs11-spy
))
225 $(eval
$(call BuildPackage
,opensc-utils
))
226 $(foreach file
,$(TOOLS
),$(eval
$(call BuildPackage
,opensc-utils-
$(subst _
,-,$(firstword $(subst :, ,$(file
)))))))
227 $(foreach file
,$(PROFILES
),$(eval
$(call BuildPackage
,libopensc-profile-
$(subst _
,-,$(firstword $(subst :, ,$(file
)))))))