Main changes are:
 - Create soft link in TPM token (for completeness)
 - Use proper paths

Signed-off-by: Klaus Heinrich Kiwi <[email protected]>
---
 usr/lib/pkcs11/aep_stdll/Makefile.am           |    4 ++--
 usr/lib/pkcs11/aep_stdll/tok_struct.h.in       |    2 +-
 usr/lib/pkcs11/bcom_stdll/Makefile.am          |    4 ++--
 usr/lib/pkcs11/bcom_stdll/tok_struct.h.in      |    2 +-
 usr/lib/pkcs11/cca_stdll/Makefile.am           |    9 +++++----
 usr/lib/pkcs11/cca_stdll/tok_struct.h.in       |    2 +-
 usr/lib/pkcs11/cr_stdll/Makefile.am            |    4 ++--
 usr/lib/pkcs11/cr_stdll/tok_struct.h.in        |    2 +-
 usr/lib/pkcs11/ica_s390_stdll/Makefile.am      |    5 ++---
 usr/lib/pkcs11/ica_s390_stdll/tok_struct.h.in  |    2 +-
 usr/lib/pkcs11/ica_stdll/Makefile.am           |    5 ++---
 usr/lib/pkcs11/ica_stdll/tok_struct.h.in       |    2 +-
 usr/lib/pkcs11/leeds_stdll/Makefile.am         |   16 +++++++---------
 usr/lib/pkcs11/methods/4758_status/Makefile.am |   12 ++----------
 usr/lib/pkcs11/methods/Makefile.am             |    2 +-
 usr/lib/pkcs11/soft_stdll/Makefile.am          |    4 ++--
 usr/lib/pkcs11/soft_stdll/tok_struct.h.in      |    2 +-
 usr/lib/pkcs11/tpm_stdll/Makefile.am           |    3 +++
 18 files changed, 37 insertions(+), 45 deletions(-)

diff --git a/usr/lib/pkcs11/aep_stdll/Makefile.am 
b/usr/lib/pkcs11/aep_stdll/Makefile.am
index ea6e98b..604460b 100644
--- a/usr/lib/pkcs11/aep_stdll/Makefile.am
+++ b/usr/lib/pkcs11/aep_stdll/Makefile.am
@@ -29,6 +29,6 @@ aeptok_specific.c aeptok_api.c
 INCLUDES = -I/usr/include -I. -I../../../include/pkcs11/stdll  \
 -I../../../include/pkcs11 -I ../common
 
-install-data-local:
-       cd $(DESTDIR)/$(libdir)/opencryptoki/stdll && rm -f PKCS11_AEP.so && \
+install-data-hook:
+       cd $(DESTDIR)/$(libdir)/opencryptoki/stdll && \
                ln -sf libpkcs11_aep.so PKCS11_AEP.so
diff --git a/usr/lib/pkcs11/aep_stdll/tok_struct.h.in 
b/usr/lib/pkcs11/aep_stdll/tok_struct.h.in
index 0bf0b1b..d512df9 100644
--- a/usr/lib/pkcs11/aep_stdll/tok_struct.h.in
+++ b/usr/lib/pkcs11/aep_stdll/tok_struct.h.in
@@ -309,7 +309,7 @@
 //
 
 token_spec_t token_specific  = {
-     "@DB_PATH@/aep",
+     "@localstatedir@/lib/opencryptoki/aep",
      "aep",
      "AEP_STDLL_Debug",
      &token_specific_init,
diff --git a/usr/lib/pkcs11/bcom_stdll/Makefile.am 
b/usr/lib/pkcs11/bcom_stdll/Makefile.am
index c3fe28a..8f6c4f6 100644
--- a/usr/lib/pkcs11/bcom_stdll/Makefile.am
+++ b/usr/lib/pkcs11/bcom_stdll/Makefile.am
@@ -33,6 +33,6 @@ INCLUDES = $(BC_INC_DIRS) -I/usr/include                      
\
 -I../common -I../../../ica/inc -I../../../../ica/include       \
 -I.. -I../../../../ica/src/inc
 
-install-data-local:
-       cd $(DESTDIR)/$(libdir)/opencryptoki/stdll && rm -f PKCS11_BC.so && \
+install-data-hook:
+       cd $(DESTDIR)/$(libdir)/opencryptoki/stdll && \
                ln -sf libpkcs11_bc.so PKCS11_BC.so
diff --git a/usr/lib/pkcs11/bcom_stdll/tok_struct.h.in 
b/usr/lib/pkcs11/bcom_stdll/tok_struct.h.in
index 168a627..646f652 100644
--- a/usr/lib/pkcs11/bcom_stdll/tok_struct.h.in
+++ b/usr/lib/pkcs11/bcom_stdll/tok_struct.h.in
@@ -309,7 +309,7 @@
 //
 
 token_spec_t token_specific  = {
-     "@DB_PATH@/bcom",
+     "@localstatedir@/lib/opencryptoki/bcom",
      "bcom",
      "BC_STDLL_Debug",
      &token_specific_init,
diff --git a/usr/lib/pkcs11/cca_stdll/Makefile.am 
b/usr/lib/pkcs11/cca_stdll/Makefile.am
index 0e5236c..309b6fa 100644
--- a/usr/lib/pkcs11/cca_stdll/Makefile.am
+++ b/usr/lib/pkcs11/cca_stdll/Makefile.am
@@ -6,6 +6,8 @@
 #
 nobase_lib_LTLIBRARIES=opencryptoki/stdll/libpkcs11_cca.la
 
+pkgdata_DATA=README.cca_stdll README-IBM_CCA_users
+
 # Not all versions of automake observe libname_CFLAGS
 opencryptoki_stdll_libpkcs11_cca_la_CFLAGS = -DLINUX -DSPINXPL -DNOCDMF        
\
        -DNODSA -DNODH -DNOECB                                          \
@@ -57,7 +59,6 @@ opencryptoki_stdll_libpkcs11_cca_la_SOURCES = asn1.c          
        \
 noinst_HEADERS = h_extern.h tok_spec_struct.h defs.h csulincl.h                
\
                 host_defs.h cca_stdll.h tok_specific.h
 
-install-data-local:
-       mkdir -p -- "$(DESTDIR)/$(datadir)/opencryptoki"
-       @INSTALL@ README-IBM_CCA_users $(DESTDIR)/$(datadir)/opencryptoki
-
+install-data-hook:
+       cd $(DESTDIR)/$(libdir)/opencryptoki/stdll && \
+               ln -sf libpkcs11_cca.so PKCS11_CCA.so
diff --git a/usr/lib/pkcs11/cca_stdll/tok_struct.h.in 
b/usr/lib/pkcs11/cca_stdll/tok_struct.h.in
index 9fccf8a..437b0c5 100644
--- a/usr/lib/pkcs11/cca_stdll/tok_struct.h.in
+++ b/usr/lib/pkcs11/cca_stdll/tok_struct.h.in
@@ -15,7 +15,7 @@
 #include "tok_spec_struct.h"
 
 token_spec_t token_specific  = {
-     "@DB_PATH@/ccatok",
+     "@localstatedir@/lib/opencryptoki/ccatok",
      "ccatok",
      "CCA_STDLL_Debug",
      &token_specific_init,
diff --git a/usr/lib/pkcs11/cr_stdll/Makefile.am 
b/usr/lib/pkcs11/cr_stdll/Makefile.am
index 33c8f0b..705ee29 100644
--- a/usr/lib/pkcs11/cr_stdll/Makefile.am
+++ b/usr/lib/pkcs11/cr_stdll/Makefile.am
@@ -32,6 +32,6 @@ INCLUDES = $(CR_INC_DIRS) -I/usr/include                      
\
 -I../common -I../../../ica/inc -I../../../../ica/include       \
 -I.. -I../../../../ica/src/inc
 
-install-data-local:
-       cd $(DESTDIR)/$(libdir)/opencryptoki/stdll && rm -f PKCS11_CR.so && \
+install-data-hook:
+       cd $(DESTDIR)$(libdir)/opencryptoki/stdll && \
                ln -sf libpkcs11_cr.so PKCS11_CR.so
diff --git a/usr/lib/pkcs11/cr_stdll/tok_struct.h.in 
b/usr/lib/pkcs11/cr_stdll/tok_struct.h.in
index a12af5c..e66a817 100644
--- a/usr/lib/pkcs11/cr_stdll/tok_struct.h.in
+++ b/usr/lib/pkcs11/cr_stdll/tok_struct.h.in
@@ -321,7 +321,7 @@
 //
 
 token_spec_t token_specific  = {
-     "@DB_PATH@/crtok",
+     "@localstatedir@/lib/opencryptoki/crtok",
      "crtok",
      "CR_STDLL_Debug",
      &token_specific_init,
diff --git a/usr/lib/pkcs11/ica_s390_stdll/Makefile.am 
b/usr/lib/pkcs11/ica_s390_stdll/Makefile.am
index 7d4b654..57cd8c7 100644
--- a/usr/lib/pkcs11/ica_s390_stdll/Makefile.am
+++ b/usr/lib/pkcs11/ica_s390_stdll/Makefile.am
@@ -30,7 +30,6 @@ INCLUDES = $(ICA_INC_DIRS) -I. 
-I../../../include/pkcs11/stdll        \
 -I../../../include/pkcs11 -I../common -I../../../ica/inc       \
 -I../../../../ica/include -I.. -I../../../../ica/src/inc
 
-install-data-local:
-       mkdir -p $(DESTDIR)/$(libdir)/opencryptoki/stdll
-       cd $(DESTDIR)/$(libdir)/opencryptoki/stdll && rm -f PKCS11_ICA.so && \
+install-data-hook:
+       cd $(DESTDIR)$(libdir)/opencryptoki/stdll && \
                ln -sf libpkcs11_ica.so PKCS11_ICA.so
diff --git a/usr/lib/pkcs11/ica_s390_stdll/tok_struct.h.in 
b/usr/lib/pkcs11/ica_s390_stdll/tok_struct.h.in
index f7279be..d217394 100644
--- a/usr/lib/pkcs11/ica_s390_stdll/tok_struct.h.in
+++ b/usr/lib/pkcs11/ica_s390_stdll/tok_struct.h.in
@@ -309,7 +309,7 @@
 //
 
 token_spec_t token_specific  = {
-     "@DB_PATH@/lite",
+     "@localstatedir@/lib/opencryptoki/lite",
      "lite",
      "ICA_STDLL_Debug",
      &token_specific_init,
diff --git a/usr/lib/pkcs11/ica_stdll/Makefile.am 
b/usr/lib/pkcs11/ica_stdll/Makefile.am
index 1c0fc5e..d5e60b5 100644
--- a/usr/lib/pkcs11/ica_stdll/Makefile.am
+++ b/usr/lib/pkcs11/ica_stdll/Makefile.am
@@ -30,7 +30,6 @@ INCLUDES = $(ICA_INC_DIRS) -I/usr/include                     
\
 -I../common -I../../../ica/inc -I../../../../ica/include       \
 -I.. -I../../../../ica/src/inc
 
-install-data-local:
-       mkdir -p $(DESTDIR)/$(libdir)/opencryptoki/stdll
-       cd $(DESTDIR)/$(libdir)/opencryptoki/stdll && rm -f PKCS11_ICA.so && \
+install-data-hook:
+       cd $(DESTDIR)$(libdir)/opencryptoki/stdll && \
                ln -sf libpkcs11_ica.so PKCS11_ICA.so
diff --git a/usr/lib/pkcs11/ica_stdll/tok_struct.h.in 
b/usr/lib/pkcs11/ica_stdll/tok_struct.h.in
index dc5d69a..6fa962a 100644
--- a/usr/lib/pkcs11/ica_stdll/tok_struct.h.in
+++ b/usr/lib/pkcs11/ica_stdll/tok_struct.h.in
@@ -298,7 +298,7 @@
 #include "tok_spec_struct.h"
 
 token_spec_t token_specific  = {
-     "@DB_PATH@/lite",
+     "@localstatedir@/lib/opencryptoki/lite",
      "lite",
      "ICA_STDLL_Debug",
      &token_specific_init,
diff --git a/usr/lib/pkcs11/leeds_stdll/Makefile.am 
b/usr/lib/pkcs11/leeds_stdll/Makefile.am
index 1550317..5a216af 100644
--- a/usr/lib/pkcs11/leeds_stdll/Makefile.am
+++ b/usr/lib/pkcs11/leeds_stdll/Makefile.am
@@ -1,21 +1,19 @@
-lib_LTLIBRARIES=libpkcs11_4758.la
-libdir = $(exec_prefix)/lib/opencryptoki/stdll
+nobase_lib_LTLIBRARIES=opencryptoki/stdll/libpkcs11_4758.la
 
-libpkcs11_4758_la_LDFLAGS = $(SCC_LIB_DIRS) -nostartfiles -shared \
-                           -Wl,-Bsymbolic -Wl,-soname,[email protected] -lpthread -lscc \
-                           -ldl
+opencryptoki_stdll_libpkcs11_4758_la_LDFLAGS = $(SCC_LIBS) -nostartfiles 
-shared       \
+       -Wl,-Bsymbolic -Wl,-soname,[email protected] -lpthread -lscc -ldl
 
 # Not all versions of automake observe libname_CFLAGS
-libpkcs11_4758_la_CFLAGS = -DDEV -D_THREAD_SAFE -DLEEDS_BUILD
+opencryptoki_stdll_libpkcs11_4758_la_CFLAGS = -DDEV -D_THREAD_SAFE 
-DLEEDS_BUILD
 
 # Not all versions of automake observe libname_CFLAGS
 AM_CFLAGS = -DDEV -D_THREAD_SAFE -DLEEDS_BUILD
 
-libpkcs11_4758_la_SOURCES = host_api.c util.c
+opencryptoki_stdll_libpkcs11_4758_la_SOURCES = host_api.c util.c
 
 INCLUDES = $(SCC_INC_DIRS) -I/usr/include -I. -I../../../include/pkcs11/stdll \
           -I../../../include/pkcs11 
 
-install-data-local:
-       cd $(STDLL_PATH) && rm -f PKCS11_4758.so && \
+install-data-hook:
+       cd $(DESTDIR)$(libdir)/opencryptoki/stdll && \
                ln -sf libpkcs11_4758.so PKCS11_4758.so
diff --git a/usr/lib/pkcs11/methods/4758_status/Makefile.am 
b/usr/lib/pkcs11/methods/4758_status/Makefile.am
index 3eadb1a..a639c37 100644
--- a/usr/lib/pkcs11/methods/4758_status/Makefile.am
+++ b/usr/lib/pkcs11/methods/4758_status/Makefile.am
@@ -1,16 +1,8 @@
-bin_PROGRAMS=4758_status
-bindir=/tmp
-
+libexec_PROGRAMS=4758_status
 
 4758_status_LDFLAGS = -ldl -lpthread -lscc
 4758_status_CFLAGS = -DDEV -D_THREAD_SAFE -DDEBUG -DAPI
 
-SOURCES = 4758_status.c
+4758_status_SOURCES = 4758_status.c
  
 INCLUDES = $(CPPFLAGS) -I. -I../../../../include/pkcs11/
-
-install-data-local:
-       mkdir -p $(INSROOT)/usr/lib/pkcs11/methods; \
-       if [ $(shell uname -m) != s390x ] ;then cp 4758_status \
-       $(INSROOT)/usr/lib/pkcs11/methods/; fi; \
-       rm -f /tmp/4758*;
diff --git a/usr/lib/pkcs11/methods/Makefile.am 
b/usr/lib/pkcs11/methods/Makefile.am
index f8bbaf4..8a59270 100644
--- a/usr/lib/pkcs11/methods/Makefile.am
+++ b/usr/lib/pkcs11/methods/Makefile.am
@@ -1,7 +1,7 @@
 if S390
 SUBDIRS =
 else
-if ICC
+if ENABLE_ICCTOK
 SUBDIRS = 4758_status
 endif
 endif
diff --git a/usr/lib/pkcs11/soft_stdll/Makefile.am 
b/usr/lib/pkcs11/soft_stdll/Makefile.am
index 7297a67..5470b8e 100644
--- a/usr/lib/pkcs11/soft_stdll/Makefile.am
+++ b/usr/lib/pkcs11/soft_stdll/Makefile.am
@@ -54,6 +54,6 @@ opencryptoki_stdll_libpkcs11_sw_la_SOURCES = ../common/asn1.c 
        \
                                             ../common/mech_list.c      \
                                             soft_specific.c
 
-install-data-local:
-       cd $(DESTDIR)/$(libdir)/opencryptoki/stdll && rm -f PKCS11_SW.so && \
+install-data-hook:
+       cd $(DESTDIR)$(libdir)/opencryptoki/stdll && \
                ln -sf libpkcs11_sw.so PKCS11_SW.so
diff --git a/usr/lib/pkcs11/soft_stdll/tok_struct.h.in 
b/usr/lib/pkcs11/soft_stdll/tok_struct.h.in
index ff8bff0..53d73be 100644
--- a/usr/lib/pkcs11/soft_stdll/tok_struct.h.in
+++ b/usr/lib/pkcs11/soft_stdll/tok_struct.h.in
@@ -320,7 +320,7 @@
 //
 
 token_spec_t token_specific  = {
-     "@DB_PATH@/swtok",
+     "@localstatedir@/lib/opencryptoki/swtok",
      "swtok",
      "SW_STDLL_Debug",
      &token_specific_init,
diff --git a/usr/lib/pkcs11/tpm_stdll/Makefile.am 
b/usr/lib/pkcs11/tpm_stdll/Makefile.am
index 18dc2f6..d27b844 100644
--- a/usr/lib/pkcs11/tpm_stdll/Makefile.am
+++ b/usr/lib/pkcs11/tpm_stdll/Makefile.am
@@ -58,3 +58,6 @@ opencryptoki_stdll_libpkcs11_tpm_la_SOURCES = 
../common/asn1.c           \
 noinst_HEADERS = h_extern.h tok_spec_struct.h defs.h   \
                 host_defs.h tpm_specific.h tok_specific.h
 
+install-data-hook:
+       cd $(DESTDIR)$(libdir)/opencryptoki/stdll && \
+               ln -sf libpkcs11_tpm.so PKCS11_TPM.so
-- 
1.6.2.5


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Opencryptoki-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech

Reply via email to