summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2015-12-09 14:59:24 +0100
committerMarc Kleine-Budde <mkl@pengutronix.de>2015-12-10 11:39:36 +0100
commit880a9489f343eb1742e215447a622311b63a5980 (patch)
tree711229055662644ac17ab6800546daf18b6ab9fe
parentcb92eb444ab59953a28616ae96d250fa54a93d23 (diff)
downloadptxdist-880a9489f343eb1742e215447a622311b63a5980.tar.gz
ptxdist-880a9489f343eb1742e215447a622311b63a5980.tar.xz
opensc: add new package
-rw-r--r--rules/opensc.in42
-rw-r--r--rules/opensc.make138
2 files changed, 180 insertions, 0 deletions
diff --git a/rules/opensc.in b/rules/opensc.in
new file mode 100644
index 000000000..e42d79259
--- /dev/null
+++ b/rules/opensc.in
@@ -0,0 +1,42 @@
+## SECTION=communication
+
+menuconfig OPENSC
+ tristate "opensc "
+ select ZLIB
+ select READLINE if OPENSC_READLINE
+ select OPENCT if OPENSC_OPENCT
+ select PCSC_LITE if OPENSC_PCSC
+ help
+ Smart card utilities with support for PKCS#15 compatible cards
+
+ OpenSC provides a set of libraries and utilities to access
+ smart cards. It mainly focuses on cards that support
+ cryptographic operations. It facilitates their use in
+ security applications such as mail encryption,
+ authentication, and digital signature. OpenSC implements the
+ PKCS#11 API.
+
+if OPENSC
+
+choice
+ prompt "select SIM provider"
+ default OPENSC_PCSC
+
+ config OPENSC_OPENCT
+ bool "openct"
+
+ config OPENSC_PCSC
+ bool "pcsc-lite"
+
+endchoice
+
+config OPENSC_READLINE
+ bool "readline support"
+
+config OPENSC_TOOLS
+ bool "install tools"
+
+config OPENSC_TESTSUITE
+ bool "install testsuite"
+
+endif
diff --git a/rules/opensc.make b/rules/opensc.make
new file mode 100644
index 000000000..36fd8fa24
--- /dev/null
+++ b/rules/opensc.make
@@ -0,0 +1,138 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2010 by Juergen Beisert <jbe@pengutronix.de>
+# 2015 by Marc Kleine-Budde <mkl@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_OPENSC) += opensc
+
+#
+# Paths and names
+#
+OPENSC_VERSION := 0.15.0
+OPENSC_MD5 := 01e6b803865f7b7574ee65a7b2d63c17
+OPENSC := opensc-$(OPENSC_VERSION)
+OPENSC_SUFFIX := tar.gz
+OPENSC_URL := $(call ptx/mirror, SF, opensc/OpenSC/$(OPENSC)/$(OPENSC).$(OPENSC_SUFFIX))
+OPENSC_SOURCE := $(SRCDIR)/$(OPENSC).$(OPENSC_SUFFIX)
+OPENSC_DIR := $(BUILDDIR)/$(OPENSC)
+OPENSC_LICENSE := LGPL-2.1+ AND Expat AND ISC
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+OPENSC_CONF_TOOL := autoconf
+OPENSC_CONF_OPT := \
+ $(CROSS_AUTOCONF_USR) \
+ --sysconfdir=/etc/opensc \
+ --enable-zlib \
+ --$(call ptx/endis,PTXCONF_OPENSC_READLINE)-readline \
+ --disable-openssl \
+ --$(call ptx/endis,PTXCONF_OPENSC_OPENCT)-openct \
+ --$(call ptx/endis,PTXCONF_OPENSC_PCSC)-pcsc \
+ --disable-ctapi \
+ --disable-minidriver \
+ --enable-sm \
+ --disable-man \
+ --disable-doc \
+ --disable-dnie-ui \
+ --disable-static
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+OPENSC_TESTS := \
+ base64 \
+ lottery \
+ p15dump \
+ pintest \
+ prngtest \
+ \
+ regression/crypt0001 \
+ regression/crypt0002 \
+ regression/crypt0003 \
+ regression/crypt0004 \
+ regression/crypt0005 \
+ regression/crypt0006 \
+ regression/crypt0007 \
+ regression/erase \
+ regression/functions \
+ regression/init0001 \
+ regression/init0002 \
+ regression/init0003 \
+ regression/init0004 \
+ regression/init0005 \
+ regression/init0006 \
+ regression/init0007 \
+ regression/init0008 \
+ regression/init0009 \
+ regression/init0010 \
+ regression/init0011 \
+ regression/init0012 \
+ regression/pin0001 \
+ regression/pin0002 \
+ regression/run-all
+
+$(STATEDIR)/opensc.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, opensc)
+ @$(call install_fixup, opensc,PRIORITY,optional)
+ @$(call install_fixup, opensc,SECTION,base)
+ @$(call install_fixup, opensc,AUTHOR,"Juergen Beisert <jbe@pengutronix.de>")
+ @$(call install_fixup, opensc,DESCRIPTION,missing)
+
+ @$(call install_alternative, opensc, 0, 0, 0644, /etc/opensc/opensc.conf)
+
+ @$(call install_lib, opensc, 0, 0, 0644, libopensc)
+ @$(call install_copy, opensc, 0, 0, 0755, /usr/lib/pkcs11)
+ @$(call install_lib, opensc, 0, 0, 0644, onepin-opensc-pkcs11)
+ @$(call install_link, opensc, ../onepin-opensc-pkcs11.so, /usr/lib/pkcs11/onepin-opensc-pkcs11.so)
+ @$(call install_lib, opensc, 0, 0, 0644, opensc-pkcs11)
+ @$(call install_link, opensc, ../opensc-pkcs11.so, /usr/lib/pkcs11/opensc-pkcs11.so)
+ @$(call install_lib, opensc, 0, 0, 0644, pkcs11-spy)
+ @$(call install_link, opensc, ../pkcs11-spy.so, /usr/lib/pkcs11/pkcs11-spy.so)
+
+ifdef PTXCONF_OPENSC_TOOLS
+ @$(call install_copy, opensc, 0, 0, 0755, -, /usr/bin/cardos-tool)
+ @$(call install_copy, opensc, 0, 0, 0755, -, /usr/bin/eidenv)
+ @$(call install_copy, opensc, 0, 0, 0755, -, /usr/bin/iasecc-tool)
+ @$(call install_copy, opensc, 0, 0, 0755, -, /usr/bin/openpgp-tool)
+ @$(call install_copy, opensc, 0, 0, 0755, -, /usr/bin/opensc-explorer)
+ @$(call install_copy, opensc, 0, 0, 0755, -, /usr/bin/opensc-tool)
+ @$(call install_copy, opensc, 0, 0, 0755, -, /usr/bin/pkcs11-tool)
+ @$(call install_copy, opensc, 0, 0, 0755, -, /usr/bin/pkcs15-crypt)
+ @$(call install_copy, opensc, 0, 0, 0755, -, /usr/bin/pkcs15-tool)
+endif
+
+ifdef PTXCONF_OPENSC_TESTSUITE
+ @$(call install_copy, opensc, 0, 0, 0755, /usr/lib/opensc/tests)
+ @$(call install_copy, opensc, 0, 0, 0755, /usr/lib/opensc/tests/regression)
+ @$(foreach prog, $(OPENSC_TESTS), \
+ $(call install_copy, opensc, 0, 0, 0755, $(OPENSC_DIR)/src/tests/$(prog), \
+ /usr/lib/opensc/tests/$(prog));)
+
+ @$(call install_copy, opensc, 0, 0, 0644, $(OPENSC_DIR)/src/tests/regression/bintest, \
+ /usr/lib/opensc/tests/regression/bintest)
+ @$(call install_copy, opensc, 0, 0, 0644, $(OPENSC_DIR)/src/tests/regression/test.p12, \
+ /usr/lib/opensc/tests/regression/test.p12)
+endif
+
+ @$(call install_finish, opensc)
+
+ @$(call touch)
+
+# vim: syntax=make