CVS gjdoc/debian/scripts

Arnaud Vandyck avdyk@haydn.debian.org
Thu Nov 18 14:51:12 2004


Update of /cvsroot/pkg-java/gjdoc/debian/scripts
In directory haydn:/tmp/cvs-serv28299/scripts

Modified Files:
	dh_javadoc gjdoc 
Log Message:
debian/README.Debian: added to explain how to override CLASSPATH and virtual machine; gjdoc: modify the script to check for an existing JAVA_HOME, JAVACMD and CLASSPATH

--- /cvsroot/pkg-java/gjdoc/debian/scripts/dh_javadoc	2003/09/11 19:36:48	1.1.1.1
+++ /cvsroot/pkg-java/gjdoc/debian/scripts/dh_javadoc	2004/11/18 21:50:49	1.2
@@ -119,6 +119,8 @@
 	doit('install', '-g', '0', '-o', '0', '-d', "$tmp/usr/share/doc/$package/api/");
 	# generate javadoc
 	doit('gjdoc', "-sourcepath",  $src_dir, "-d",  "$tmp/usr/share/doc/$package/api/", @packages);
+  # and remove gjdoc_rawcomment.cache
+  doit('rm', "gjdoc_rawcomment.cache");
 
 }
 
--- /cvsroot/pkg-java/gjdoc/debian/scripts/gjdoc	2003/09/11 19:36:48	1.1.1.1
+++ /cvsroot/pkg-java/gjdoc/debian/scripts/gjdoc	2004/11/18 21:50:49	1.2
@@ -1,3 +1,23 @@
 #!/bin/sh
 
-exec java -classpath /usr/share/java/gjdoc.jar:/usr/share/java/libgnujaxp-java.jar:/usr/share/java/gnujaxp.jar gnu.classpath.tools.gjdoc.Main "$@" 
+GJDOCCP=/usr/share/java/gjdoc.jar:/usr/share/java/gnujaxp.jar
+
+if [ -z $CLASSPATH ] ; then
+    CLASSPATH=$GJDOCCP
+else
+    CLASSPATH=$CLASSPATH:$GJDOCCP
+fi
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD=`which java 2> /dev/null `
+    if [ -z "$JAVACMD" ] ; then
+        JAVACMD=kaffe
+    fi
+  fi
+fi
+
+LD_LIBRARY_PATH=/usr/lib/jni exec $JAVACMD -classpath $CLASSPATH gnu.classpath.tools.gjdoc.Main "$@"