* Create the local state directory for opencryptoki (usually
  $prefix/var/lib/opencryptoki) when installing pkcs_slot.
  pkcs_slot can take care of creating it on the first execution,
  but creating it on 'make install' allow us to proper package
  it.

* The pkcs_slot script already creates those directories
  if not present, but explicitly creating them in 'make install'
  allows us to better packaging

Signed-off-by: Klaus Heinrich Kiwi <[email protected]>
---
 usr/lib/pkcs11/cca_stdll/Makefile.am      |    1 +
 usr/lib/pkcs11/ica_s390_stdll/Makefile.am |    1 +
 usr/lib/pkcs11/soft_stdll/Makefile.am     |    1 +
 usr/lib/pkcs11/tpm_stdll/Makefile.am      |    1 +
 usr/sbin/pkcs_slot/Makefile.am            |    3 +++
 5 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/usr/lib/pkcs11/cca_stdll/Makefile.am 
b/usr/lib/pkcs11/cca_stdll/Makefile.am
index 9c7fea1..d6db694 100644
--- a/usr/lib/pkcs11/cca_stdll/Makefile.am
+++ b/usr/lib/pkcs11/cca_stdll/Makefile.am
@@ -56,3 +56,4 @@ noinst_HEADERS = h_extern.h tok_spec_struct.h defs.h 
csulincl.h               \
 install-data-hook:
        cd $(DESTDIR)/$(libdir)/opencryptoki/stdll && \
                ln -sf libpkcs11_cca.so PKCS11_CCA.so
+       $(MKDIR_P) $(DESTDIR)$(localstatedir)/lib/opencryptoki/ccatok
diff --git a/usr/lib/pkcs11/ica_s390_stdll/Makefile.am 
b/usr/lib/pkcs11/ica_s390_stdll/Makefile.am
index b23317d..b881e17 100644
--- a/usr/lib/pkcs11/ica_s390_stdll/Makefile.am
+++ b/usr/lib/pkcs11/ica_s390_stdll/Makefile.am
@@ -29,3 +29,4 @@ INCLUDES = $(ICA_INC_DIRS) -I. 
-I../../../include/pkcs11/stdll        \
 install-data-hook:
        cd $(DESTDIR)$(libdir)/opencryptoki/stdll && \
                ln -sf libpkcs11_ica.so PKCS11_ICA.so
+       $(MKDIR_P) $(DESTDIR)$(localstatedir)/lib/opencryptoki/lite
diff --git a/usr/lib/pkcs11/soft_stdll/Makefile.am 
b/usr/lib/pkcs11/soft_stdll/Makefile.am
index 9e3f03b..ea37e7e 100644
--- a/usr/lib/pkcs11/soft_stdll/Makefile.am
+++ b/usr/lib/pkcs11/soft_stdll/Makefile.am
@@ -50,3 +50,4 @@ opencryptoki_stdll_libpkcs11_sw_la_SOURCES = ../common/asn1.c 
        \
 install-data-hook:
        cd $(DESTDIR)$(libdir)/opencryptoki/stdll && \
                ln -sf libpkcs11_sw.so PKCS11_SW.so
+       $(MKDIR_P) $(DESTDIR)$(localstatedir)/lib/opencryptoki/swtok
diff --git a/usr/lib/pkcs11/tpm_stdll/Makefile.am 
b/usr/lib/pkcs11/tpm_stdll/Makefile.am
index 1718b08..023e959 100644
--- a/usr/lib/pkcs11/tpm_stdll/Makefile.am
+++ b/usr/lib/pkcs11/tpm_stdll/Makefile.am
@@ -56,3 +56,4 @@ noinst_HEADERS = h_extern.h tok_spec_struct.h defs.h  \
 install-data-hook:
        cd $(DESTDIR)$(libdir)/opencryptoki/stdll && \
                ln -sf libpkcs11_tpm.so PKCS11_TPM.so
+       $(MKDIR_P) $(DESTDIR)$(localstatedir)/lib/opencryptoki/tpm
diff --git a/usr/sbin/pkcs_slot/Makefile.am b/usr/sbin/pkcs_slot/Makefile.am
index 3ac2b4d..0d94f6f 100644
--- a/usr/sbin/pkcs_slot/Makefile.am
+++ b/usr/sbin/pkcs_slot/Makefile.am
@@ -12,3 +12,6 @@ pkcs_slot: pkcs_slot.in
                -e s...@chmod\@!"@CHMOD@"!g < $< > $...@-t
        @CHMOD@ +x $...@-t
        mv $...@-t $@
+
+install-data-hook:
+       $(MKDIR_P) $(DESTDIR)$(localstatedir)/lib/opencryptoki
-- 
1.7.1.1


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Opencryptoki-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech

Reply via email to