diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-12-15 22:46:18 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-12-15 22:46:18 +0100 |
commit | 38af8185ea05a1c5d1abb32a68a025e3b4afa4d6 (patch) | |
tree | 7d01524e63fb74a69ec40891058b95dff9f74bd1 /package/opensc | |
parent | 76b0f0b76d8f8ff93efc1678eb1a329dbfe90667 (diff) |
add dev/lib subpackages, enable tools build for opensc, enable openct and pcsc support
Diffstat (limited to 'package/opensc')
-rw-r--r-- | package/opensc/Makefile | 47 | ||||
-rw-r--r-- | package/opensc/patches/patch-src_Makefile_in | 9 | ||||
-rw-r--r-- | package/opensc/patches/patch-src_libopensc_internal-winscard_h | 31 | ||||
-rw-r--r-- | package/opensc/patches/patch-src_libopensc_reader-pcsc_c | 29 | ||||
-rw-r--r-- | package/opensc/patches/patch-src_tools_pkcs11-tool_c | 18 |
5 files changed, 122 insertions, 12 deletions
diff --git a/package/opensc/Makefile b/package/opensc/Makefile index 9218a8c5e..24d89aa2a 100644 --- a/package/opensc/Makefile +++ b/package/opensc/Makefile @@ -9,23 +9,56 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= 98fa151e947941f9c3f27420fdf47c11 PKG_DESCR:= utilities to access smart cards PKG_SECTION:= crypto -PKG_BUILDDEP:= libtool +PKG_DEPENDS:= libopensc PKG_URL:= http://www.opensc-project.org/opensc/ PKG_SITES:= http://www.opensc-project.org/files/opensc/ +PKG_SUBPKGS:= OPENSC LIBOPENSC LIBOPENSC_DEV +PKGSD_LIBOPENSC:= opensc library +PKGSC_LIBOPENSC:= libs +PKGSS_LIBOPENSC:= libltdl +PKGSB_LIBOPENSC:= libtool +PKGSD_LIBOPENSC_DEV:= development files for opensc +PKGSC_LIBOPENSC_DEV:= devel + include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,OPENSC,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,LIBOPENSC,libopensc,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_LIBOPENSC},${PKGSD_LIBOPENSC},${PKGSC_LIBOPENSC})) +$(eval $(call PKG_template,LIBOPENSC_DEV,libopensc-dev,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBOPENSC_DEV},${PKGSC_LIBOPENSC_DEV})) + +CONFIGURE_ARGS+= --disable-man \ + --disable-iconv \ + --enable-pcsc \ + --enable-openct -post-install: - ${INSTALL_DIR} ${IDIR_OPENSC}/usr/lib +SUB_INSTALLS-y:= +SUB_INSTALLS-m:= +SUB_INSTALLS-${ADK_PACKAGE_LIBOPENSC_DEV}+= libopensc-dev-install + +post-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y} + ${INSTALL_DIR} ${IDIR_OPENSC}/usr/bin + ${INSTALL_BIN} ${WRKINST}/usr/bin/opensc-explorer \ + ${IDIR_OPENSC}/usr/bin + ${INSTALL_BIN} ${WRKINST}/usr/bin/opensc-tool \ + ${IDIR_OPENSC}/usr/bin + ${INSTALL_BIN} ${WRKINST}/usr/bin/pkcs15-init \ + ${IDIR_OPENSC}/usr/bin + ${INSTALL_BIN} ${WRKINST}/usr/bin/pkcs15-tool \ + ${IDIR_OPENSC}/usr/bin + ${INSTALL_DIR} ${IDIR_LIBOPENSC}/usr/lib ${CP} ${WRKINST}/usr/lib/libopensc.so* \ - ${IDIR_OPENSC}/usr/lib + ${IDIR_LIBOPENSC}/usr/lib ${CP} ${WRKINST}/usr/lib/libpkcs15init.so* \ - ${IDIR_OPENSC}/usr/lib + ${IDIR_LIBOPENSC}/usr/lib ${CP} ${WRKINST}/usr/lib/libscconf.so* \ - ${IDIR_OPENSC}/usr/lib + ${IDIR_LIBOPENSC}/usr/lib ${CP} ${WRKINST}/usr/lib/opensc-pkcs11.so \ - ${IDIR_OPENSC}/usr/lib + ${IDIR_LIBOPENSC}/usr/lib + +libopensc-dev-install: + ${INSTALL_DIR} ${IDIR_LIBOPENSC_DEV}/usr/include/opensc + ${CP} ${WRKINST}/usr/include/opensc/*.h \ + ${IDIR_LIBOPENSC_DEV}/usr/include/opensc include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/opensc/patches/patch-src_Makefile_in b/package/opensc/patches/patch-src_Makefile_in index 367ed98ca..63d41a20e 100644 --- a/package/opensc/patches/patch-src_Makefile_in +++ b/package/opensc/patches/patch-src_Makefile_in @@ -1,13 +1,12 @@ -$Id$ ---- opensc-0.11.1.orig/src/Makefile.in 2006-05-30 23:06:00.000000000 +0200 -+++ opensc-0.11.1/src/Makefile.in 2007-04-08 13:21:01.000000000 +0200 -@@ -208,8 +208,8 @@ MAINTAINERCLEANFILES = Makefile.in +--- opensc-0.11.13.orig/src/Makefile.in 2010-02-16 10:32:17.000000000 +0100 ++++ opensc-0.11.13/src/Makefile.in 2010-12-15 21:48:57.000000000 +0100 +@@ -260,8 +260,8 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefil EXTRA_DIST = Makefile.mak # Order IS important -SUBDIRS = common include scconf libopensc pkcs15init pkcs11 \ - tests tools openssh signer -+SUBDIRS = common include scconf libopensc pkcs15init pkcs11 ++SUBDIRS = common include scconf libopensc pkcs15init pkcs11 tools + all: all-recursive diff --git a/package/opensc/patches/patch-src_libopensc_internal-winscard_h b/package/opensc/patches/patch-src_libopensc_internal-winscard_h new file mode 100644 index 000000000..462100356 --- /dev/null +++ b/package/opensc/patches/patch-src_libopensc_internal-winscard_h @@ -0,0 +1,31 @@ +--- opensc-0.11.13.orig/src/libopensc/internal-winscard.h 2010-02-16 10:03:28.000000000 +0100 ++++ opensc-0.11.13/src/libopensc/internal-winscard.h 2010-12-15 21:47:38.000000000 +0100 +@@ -77,7 +77,7 @@ typedef struct + unsigned long cbAtr; + unsigned char rgbAtr[MAX_ATR_SIZE]; + } +-SCARD_READERSTATE_A; ++SCARD_READERSTATE; + + typedef struct _SCARD_IO_REQUEST + { +@@ -87,8 +87,8 @@ typedef struct _SCARD_IO_REQUEST + SCARD_IO_REQUEST, *PSCARD_IO_REQUEST, *LPSCARD_IO_REQUEST; + + typedef const SCARD_IO_REQUEST *LPCSCARD_IO_REQUEST; +-typedef SCARD_READERSTATE_A SCARD_READERSTATE, *PSCARD_READERSTATE_A, +- *LPSCARD_READERSTATE_A; ++typedef SCARD_READERSTATE SCARD_READERSTATE, *PSCARD_READERSTATE, ++ *SCARD_READERSTATE; + + #endif /* HAVE_SCARD_H */ + +@@ -113,7 +113,7 @@ typedef LONG (PCSC_API *SCardEndTransact + typedef LONG (PCSC_API *SCardStatus_t)(SCARDHANDLE hCard, LPSTR mszReaderNames, LPDWORD pcchReaderLen, + LPDWORD pdwState, LPDWORD pdwProtocol, LPBYTE pbAtr, LPDWORD pcbAtrLen); + typedef LONG (PCSC_API *SCardGetStatusChange_t)(SCARDCONTEXT hContext, DWORD dwTimeout, +- LPSCARD_READERSTATE_A rgReaderStates, DWORD cReaders); ++ SCARD_READERSTATE *rgReaderStates, DWORD cReaders); + typedef LONG (PCSC_API *SCardControlOLD_t)(SCARDHANDLE hCard, LPCVOID pbSendBuffer, DWORD cbSendLength, + LPVOID pbRecvBuffer, LPDWORD lpBytesReturned); + typedef LONG (PCSC_API *SCardControl_t)(SCARDHANDLE hCard, DWORD dwControlCode, LPCVOID pbSendBuffer, diff --git a/package/opensc/patches/patch-src_libopensc_reader-pcsc_c b/package/opensc/patches/patch-src_libopensc_reader-pcsc_c new file mode 100644 index 000000000..cd4123a16 --- /dev/null +++ b/package/opensc/patches/patch-src_libopensc_reader-pcsc_c @@ -0,0 +1,29 @@ +--- opensc-0.11.13.orig/src/libopensc/reader-pcsc.c 2010-02-16 10:03:28.000000000 +0100 ++++ opensc-0.11.13/src/libopensc/reader-pcsc.c 2010-12-15 21:44:53.000000000 +0100 +@@ -80,7 +80,7 @@ struct pcsc_private_data { + + struct pcsc_slot_data { + SCARDHANDLE pcsc_card; +- SCARD_READERSTATE_A reader_state; ++ SCARD_READERSTATE reader_state; + DWORD verify_ioctl; + DWORD verify_ioctl_start; + DWORD verify_ioctl_finish; +@@ -353,7 +353,7 @@ static int pcsc_wait_for_event(sc_reader + sc_context_t *ctx; + SCARDCONTEXT pcsc_ctx; + LONG ret; +- SCARD_READERSTATE_A rgReaderStates[SC_MAX_READERS]; ++ SCARD_READERSTATE rgReaderStates[SC_MAX_READERS]; + unsigned long on_bits, off_bits; + time_t end_time, now, delta; + size_t i; +@@ -401,7 +401,7 @@ static int pcsc_wait_for_event(sc_reader + /* Wait for a status change and return if it's a card insert/removal + */ + for( ; ; ) { +- SCARD_READERSTATE_A *rsp; ++ SCARD_READERSTATE *rsp; + + /* Scan the current state of all readers to see if they + * match any of the events we're polling for */ diff --git a/package/opensc/patches/patch-src_tools_pkcs11-tool_c b/package/opensc/patches/patch-src_tools_pkcs11-tool_c new file mode 100644 index 000000000..0e9f5a66a --- /dev/null +++ b/package/opensc/patches/patch-src_tools_pkcs11-tool_c @@ -0,0 +1,18 @@ +--- opensc-0.11.13.orig/src/tools/pkcs11-tool.c 2010-02-16 10:03:25.000000000 +0100 ++++ opensc-0.11.13/src/tools/pkcs11-tool.c 2010-12-15 21:54:01.000000000 +0100 +@@ -2235,7 +2235,6 @@ static int sign_verify_openssl(CK_SLOT_I + EVP_sha1(), + EVP_sha1(), + EVP_md5(), +- EVP_ripemd160(), + }; + #endif + +@@ -2820,7 +2819,6 @@ static int test_unwrap(CK_SLOT_ID slot, + errors += wrap_unwrap(slot, sess, EVP_des_cbc(), privKeyObject); + errors += wrap_unwrap(slot, sess, EVP_des_ede3_cbc(), privKeyObject); + errors += wrap_unwrap(slot, sess, EVP_bf_cbc(), privKeyObject); +- errors += wrap_unwrap(slot, sess, EVP_cast5_cfb(), privKeyObject); + #endif + } + |