Hello,

gregor herrmann wrote:
> On Wed, 19 Nov 2008 14:59:26 +0100, Vincent Fourmond wrote:
> 
>>   Would you be interested to use java-wrappers for the jabref wrapper
>> script ? It is an attempt to unify wrapper scripts, providing easier
>> writing for developers and also much more functionality for users (including
>> potential functionalities that won't exists at the time you choose to use it 
>> !).
> 
> Sure, I think that's a good idea in general.
> 
> (Just that the last time I looked, java-wrappers and me didn't become
> friends for a reason I can't remember.)
>  
>>   I'd be happy to write the script and adapt the manual page accordingly,
>> of course.
> 
> That would be nice, thanks!

  There you go, in the attached diff.

  Cheers,

        Vincent


-- 
Vincent Fourmond, Debian Developer
http://vince-debian.blogspot.com/

find(1):
 A `%' at the end of the format argument causes undefined behaviour
 since there is no following character. In some locales, it may
 hide your door keys, while in others it may remove the final page
 from the novel you are reading.

Vincent, listening to The Importance Of Being Idle (Oasis)
diff -u jabref-2.3.1/debian/control jabref-2.3.1/debian/control
--- jabref-2.3.1/debian/control
+++ jabref-2.3.1/debian/control
@@ -17,7 +17,7 @@
 Depends: openjdk-6-jre | sun-java6-jre | sun-java5-jre, antlr, antlr3,
  libjgoodies-looks-java, libjgoodies-forms-java, libspin-java,
  libglazedlists-java, libmicroba-java, libpdfbox-java,
- libjempbox-java (>= 0.2.0)
+ libjempbox-java (>= 0.2.0), java-wrappers (>= 0.1.6)
 Suggests: gv | postscript-viewer, xpdf | pdf-viewer
 Description: graphical frontend to manage BibTeX databases
  JabRef is a GUI to manage BibTeX databases, the standard LaTeX bibliography
diff -u jabref-2.3.1/debian/jabref-wrapper jabref-2.3.1/debian/jabref-wrapper
--- jabref-2.3.1/debian/jabref-wrapper
+++ jabref-2.3.1/debian/jabref-wrapper
@@ -3,13 +3,10 @@
-# jabref wrapper script
-# code for java detection borrowed from tuxguitar
+# Include the wrappers utility script
+. /usr/lib/java-wrappers/java-wrappers.sh
 
-if [ -z "$JAVA_HOME" ] ; then
-       t=/usr/lib/jvm/java-1.5.0-sun && test -d $t && JAVA_HOME=$t
-       t=/usr/lib/jvm/java-6-sun && test -d $t && JAVA_HOME=$t
-       t=/usr/lib/jvm/java-6-openjdk && test -d $t && JAVA_HOME=$t
-       test -n "$JAVA_HOME" && JAVA=${JAVA_HOME}/jre/bin/java
-fi
+# We need sun runtime.
+find_java_runtime openjdk || find_java_runtime sun 
 
-export JAVA=${JAVA:=java}
+find_jars jabref antlr antlr3 looks forms spin glazedlists
+find_jars microba pdfbox jempbox
 
-exec $JAVA -cp 
/usr/share/java/jabref.jar:/usr/share/java/antlr.jar:/usr/share/java/antlr3.jar:/usr/share/java/looks.jar:/usr/share/java/forms.jar:/usr/share/java/spin.jar:/usr/share/java/glazedlists.jar:/usr/share/java/microba.jar:/usr/share/java/pdfbox.jar:/usr/share/java/jempbox.jar
 net.sf.jabref.JabRefMain "$@"
+run_java net.sf.jabref.JabRefMain "$@"
diff -u jabref-2.3.1/debian/jabref.1 jabref-2.3.1/debian/jabref.1
--- jabref-2.3.1/debian/jabref.1
+++ jabref-2.3.1/debian/jabref.1
@@ -65,10 +65,25 @@
 .TP
 \fB\-s\fR, \fB\-\-nosplash\fR=<BOOLEAN>
 Do not show splash window at startup
+
+.SH JAVA-WRAPPERS NOTE
+
+This program is a shell script wrapper based on
+.BR java-wrappers (7).
+You therefore benefit from several features; please see the 
+.BR java-wrappers (7)
+manual page for more information about them.
+
+
+
 .SH SEE ALSO
 the included help
 .br
 http://jabref.sourceforge.net/
+
+.BR java-wrappers (7)
+
+
 .SH AUTHOR
 jabref was written by Morten O. Alver and Nizar Batada.
 .PP

Reply via email to