This patch moves the processing of misc/pkcsslotd.in to use
a sed script at build time instead of relying on configure
to process it at configure time. This allows us to be more
flexible when building to non-standard directories or other
odd scenarios. Also fixed to use standard directory variables.

Signed-off-by: Klaus Heinrich Kiwi <[email protected]>
---
 configure.in      |    1 -
 misc/Makefile.am  |    7 +++++++
 misc/pkcsslotd.in |    4 ++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/configure.in b/configure.in
index 2039ecd..6eb03cc 100644
--- a/configure.in
+++ b/configure.in
@@ -321,7 +321,6 @@ AC_OUTPUT([Makefile usr/Makefile \
           usr/lib/pkcs11/cca_stdll/tok_struct.h \
           usr/lib/pkcs11/methods/4758_status/Makefile \
           misc/Makefile \
-          misc/pkcsslotd \
          testcases/Makefile \
          testcases/common/Makefile \
          testcases/driver/Makefile \
diff --git a/misc/Makefile.am b/misc/Makefile.am
index e910a4e..d0d1cbd 100644
--- a/misc/Makefile.am
+++ b/misc/Makefile.am
@@ -1,6 +1,13 @@
+EXTRA_DIST = pkcsslotd.in
 if DAEMON
 initdir = /etc/init.d
 init_SCRIPTS = pkcsslotd
 endif
 
 
+CLEANFILES = pkcsslotd
+
+pkcsslotd: pkcsslotd.in
+       @SED@ -e s...@sbindir\@!"@sbindir@"!g < $< > $...@-t
+       @CHMOD@ a+x $...@-t
+       mv $...@-t $@
diff --git a/misc/pkcsslotd.in b/misc/pkcsslotd.in
index aca3751..f615832 100644
--- a/misc/pkcsslotd.in
+++ b/misc/pkcsslotd.in
@@ -14,8 +14,8 @@
 
 PIDFILE=/var/run/pkcsslotd.pid
 LOCKFILE=/var/lock/subsys/pkcsslotd
-slotdb...@method_path@/pkcsslotd
-confsta...@method_path@/pkcs11_startup
+slotdb...@sbindir@/pkcsslotd
+confsta...@sbindir@/pkcs11_startup
 
 [ -f $SLOTDBIN ] || exit 5
 [ -f $CONFSTART ] || exit 5
-- 
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