summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-12-15 22:46:18 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2010-12-15 22:46:18 +0100
commit38af8185ea05a1c5d1abb32a68a025e3b4afa4d6 (patch)
tree7d01524e63fb74a69ec40891058b95dff9f74bd1
parent76b0f0b76d8f8ff93efc1678eb1a329dbfe90667 (diff)
add dev/lib subpackages, enable tools build for opensc, enable openct and pcsc support
-rw-r--r--package/openct/Makefile36
-rw-r--r--package/opensc/Makefile47
-rw-r--r--package/opensc/patches/patch-src_Makefile_in9
-rw-r--r--package/opensc/patches/patch-src_libopensc_internal-winscard_h31
-rw-r--r--package/opensc/patches/patch-src_libopensc_reader-pcsc_c29
-rw-r--r--package/opensc/patches/patch-src_tools_pkcs11-tool_c18
6 files changed, 149 insertions, 21 deletions
diff --git a/package/openct/Makefile b/package/openct/Makefile
index fb5cf15b5..635f95d74 100644
--- a/package/openct/Makefile
+++ b/package/openct/Makefile
@@ -4,25 +4,35 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= openct
-PKG_VERSION:= 0.6.16
+PKG_VERSION:= 0.6.20
PKG_RELEASE:= 1
-PKG_MD5SUM:= d8d8c63269985303a303a218c4b953d7
+PKG_MD5SUM:= a1da3358ab798f1cb9232f1dbababc21
PKG_DESCR:= drivers for smart card readers
PKG_SECTION:= crypto
-PKG_DEPENDS:= libltdl libusb
-PKG_BUILDDEP:= libtool libusb
+PKG_DEPENDS:= libopenct
PKG_URL:= http://www.opensc-project.org/openct/
PKG_SITES:= http://www.opensc-project.org/files/openct/
+PKG_SUBPKGS:= OPENCT LIBOPENCT LIBOPENCT_DEV
+PKGSD_LIBOPENCT:= crypto token library
+PKGSC_LIBOPENCT:= libs
+PKGSS_LIBOPENCT:= libltdl libusb
+PKGSB_LIBOPENCT:= libtool libusb
+PKGSD_LIBOPENCT_DEV:= development files for openct
+PKGSC_LIBOPENCT_DEV:= devel
+
include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,OPENCT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+$(eval $(call PKG_template,LIBOPENCT,libopenct,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_LIBOPENCT},${PKGSD_LIBOPENCT},${PKGSC_LIBOPENCT}))
+$(eval $(call PKG_template,LIBOPENCT_DEV,libopenct-dev,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBOPENCT_DEV},${PKGSC_LIBOPENCT_DEV}))
-post-install:
- ${INSTALL_DIR} ${IDIR_OPENCT}/etc ${IDIR_OPENCT}/usr/bin
- ${INSTALL_DIR} ${IDIR_OPENCT}/usr/sbin ${IDIR_OPENCT}/usr/lib
- ${CP} ${WRKINST}/usr/lib/libopenct.so.* \
- ${IDIR_OPENCT}/usr/lib
+SUB_INSTALLS-y:=
+SUB_INSTALLS-m:=
+SUB_INSTALLS-${ADK_PACKAGE_LIBOPENCT_DEV}+= libopenct-dev-install
+
+post-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y}
+ ${INSTALL_DIR} ${IDIR_OPENCT}/etc ${IDIR_OPENCT}/usr/{sbin,bin}
${INSTALL_BIN} ${WRKINST}/usr/sbin/openct-control \
${IDIR_OPENCT}/usr/sbin
${INSTALL_BIN} ${WRKINST}/usr/sbin/ifd* \
@@ -31,5 +41,13 @@ post-install:
${IDIR_OPENCT}/usr/bin
${INSTALL_DATA} ${WRKBUILD}/etc/openct.conf \
${IDIR_OPENCT}/etc
+ ${INSTALL_DIR} ${IDIR_LIBOPENCT}/usr/lib
+ ${CP} ${WRKINST}/usr/lib/libopenct.so.* \
+ ${IDIR_LIBOPENCT}/usr/lib
+
+libopenct-dev-install:
+ ${INSTALL_DIR} ${IDIR_LIBOPENCT_DEV}/usr/include/openct
+ ${CP} ${WRKINST}/usr/include/openct/*.h \
+ ${IDIR_LIBOPENCT_DEV}/usr/include/openct
include ${TOPDIR}/mk/pkg-bottom.mk
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
+ }
+