hello there, the attached patch --already committed-- generates a jarsigner shell script which attempts to find a java executable before invoking it with the tool's main class.
the ChangeLog entry follows:
2006-04-02 Raif S. Naffah <[EMAIL PROTECTED]>
* configure.ac: Added tools/jarsigner.sh to AC_CONFIG_FILES.
* tools/Makefile.am: Generate jarsigner shell script.
* tools/jarsigner.sh.in: New template.
* tools/.cvsignore: Added jarsigner.sh.
built, in classpath top directory, with:
$ make distclean
$ ./autogen.sh
$ ./configure --prefix=/data/workspace/cvs/classpath/install \
--with-classpath-install-dir=/data/workspace/cvs/classpath/install \
--disable-zip
$ make
tested, in classpath/install directory with:
$ ./bin/jamvm -version
java version "1.4.2"
JamVM version 1.4.3-pre
...
cheers;
rsn
Index: .cvsignore
===================================================================
RCS file: /cvsroot/classpath/classpath/tools/.cvsignore,v
retrieving revision 1.3
diff -u -r1.3 .cvsignore
--- .cvsignore 17 Feb 2006 06:59:26 -0000 1.3
+++ .cvsignore 2 Apr 2006 01:10:51 -0000
@@ -1,3 +1,4 @@
+jarsigner.sh
Makefile.in
Makefile
tools.zip
Index: jarsigner.sh.in
===================================================================
RCS file: jarsigner.sh.in
diff -N jarsigner.sh.in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ jarsigner.sh.in 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+## Copyright 2006 Free Software Foundation, Inc.
+##
+## This file is a part of GNU Classpath.
+##
+## GNU Classpath is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or (at
+## your option) any later version.
+##
+## GNU Classpath is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with GNU Classpath; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
+## USA.
+##
+##
+## A simple shell script to launch the GNU Classpath jarsigner tool.
+##
+
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@/@PACKAGE@
+tools_cp=${tools_dir}/tools.zip
+
+# find the java executable...
+if [ -z "${JAVA}" ] ; then
+ if [ -n "${JAVA_HOME}" ] ; then
+ if [ -x "${JAVA_HOME}/jre/sh/java" ] ; then
+ JAVA="${JAVA_HOME}/jre/sh/java"
+ else
+ JAVA="${JAVA_HOME}/bin/java"
+ fi
+ else
+ JAVA=`which java 2> /dev/null `
+ if [ -z "${JAVA}" ] ; then
+ JAVA=java
+ fi
+ fi
+fi
+
+exec "${JAVA}" -cp "${tools_cp}" gnu.classpath.tools.jarsigner.Main $@
Index: Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/tools/Makefile.am,v
retrieving revision 1.8
diff -u -r1.8 Makefile.am
--- Makefile.am 29 Mar 2006 20:24:37 -0000 1.8
+++ Makefile.am 2 Apr 2006 01:12:46 -0000
@@ -19,6 +19,15 @@
endif
endif
+bin_SCRIPTS = jarsigner
+CLEANFILES = $(bin_SCRIPTS)
+EXTRA_DIST = jarsigner.sh.in
+
+jarsigner: $(srcdir)/jarsigner.sh
+ rm -f $(bindir)/jarsigner
+ cat $(srcdir)/jarsigner.sh > $(bindir)/jarsigner
+ chmod ugo+x $(bindir)/jarsigner
+
# All our example java source files
TOOLS_JAVA_FILES = $(srcdir)/gnu/classpath/tools/*.java $(srcdir)/gnu/classpath/tools/*/*.java $(srcdir)/gnu/classpath/tools/*/*/*.java
@@ -30,7 +39,7 @@
BUILT_SOURCES = $(TOOLS_ZIP)
# The templates that must be included into the generated zip file.
-GRMIC_TEMPLATES = $(srcdir)/gnu/classpath/tools/giop/grmic/templates/*.jav
+GRMIC_TEMPLATES = $(srcdir)/gnu/classpath/tools/giop/grmic/templates/*.jav
RMIC_TEMPLATES = $(srcdir)/gnu/classpath/tools/rmi/rmic/templates/*.jav
TOOLS_TEMPLATES = $(GRMIC_TEMPLATES) $(RMIC_TEMPLATES)
@@ -38,8 +47,9 @@
# This covers the built-in help texts, both for giop and rmic subpackages.
GIOP_HELPS = $(srcdir)/gnu/classpath/tools/giop/*.txt
RMI_HELPS = $(srcdir)/gnu/classpath/tools/rmi/*.txt
+SECURITY_HELPS = $(srcdir)/gnu/classpath/tools/jarsigner/*.txt
-TOOLS_HELPS = $(GIOP_HELPS) $(RMI_HELPS)
+TOOLS_HELPS = $(GIOP_HELPS) $(RMI_HELPS) $(SECURITY_HELPS)
# The tool specific README files.
READMES = $(srcdir)/gnu/classpath/tools/giop/README
@@ -74,11 +84,13 @@
$(TOOLS_ZIP): $(TOOLS_JAVA_FILES)
mkdir -p classes/gnu/classpath/tools/giop/grmic/templates
mkdir -p classes/gnu/classpath/tools/rmi/rmic/templates
+ mkdir -p classes/gnu/classpath/tools/jarsigner
cp $(RMIC_TEMPLATES) classes/gnu/classpath/tools/rmi/rmic/templates
- cp $(GRMIC_TEMPLATES) classes/gnu/classpath/tools/giop/grmic/templates
+ cp $(GRMIC_TEMPLATES) classes/gnu/classpath/tools/giop/grmic/templates
cp $(RMI_HELPS) classes/gnu/classpath/tools/rmi/
cp $(GIOP_HELPS) classes/gnu/classpath/tools/giop/
- $(JCOMPILER) -d classes $(TOOLS_JAVA_FILES)
+ cp $(SECURITY_HELPS) classes/gnu/classpath/tools/jarsigner/
+ $(JCOMPILER) -d classes $(TOOLS_JAVA_FILES)
(cd classes; \
if test "$(ZIP)" != ""; then $(ZIP) -r ../$(TOOLS_ZIP) .; fi; \
if test "$(FASTJAR)" != ""; then $(FASTJAR) cf ../$(TOOLS_ZIP) .; fi; \
Index: configure.ac
===================================================================
RCS file: /cvsroot/classpath/classpath/configure.ac,v
retrieving revision 1.139
diff -u -r1.139 configure.ac
--- configure.ac 10 Mar 2006 01:36:10 -0000 1.139
+++ configure.ac 2 Apr 2006 01:15:30 -0000
@@ -621,6 +621,7 @@
lib/gen-classlist.sh
lib/copy-vmresources.sh
tools/Makefile
+tools/jarsigner.sh
examples/Makefile
examples/Makefile.jawt])
AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh])
pgpZbHx4W5ujY.pgp
Description: PGP signature
