[pkg-java] r7121 - trunk/fop/debian

fourmond at alioth.debian.org fourmond at alioth.debian.org
Mon Oct 6 18:29:02 UTC 2008


Author: fourmond
Date: 2008-10-06 18:29:01 +0000 (Mon, 06 Oct 2008)
New Revision: 7121

Modified:
   trunk/fop/debian/changelog
   trunk/fop/debian/control
   trunk/fop/debian/fop.sh
   trunk/fop/debian/rules
Log:
[fop] Few cleanups + switching fop.sh to java-wrappers

Modified: trunk/fop/debian/changelog
===================================================================
--- trunk/fop/debian/changelog	2008-10-06 16:33:20 UTC (rev 7120)
+++ trunk/fop/debian/changelog	2008-10-06 18:29:01 UTC (rev 7121)
@@ -1,4 +1,4 @@
-fop (1:0.95.dfsg-1) unstable; urgency=low
+fop (1:0.95.dfsg-1) experimental UNRELEASED; urgency=low
 
   [ Sylvestre Ledru ]
   * New upstream version (Closes: #494041)
@@ -16,8 +16,15 @@
   [ Michael Koch ]
   * Fixed watch file for changed upstream location.
 	
- -- Sylvestre Ledru <sylvestre.ledru at inria.fr>  Thu, 14 Aug 2008 15:45:50 +0200
+  [ Vincent Fourmond ]
+  * Added myself to uploaders
+  * There are no reasons to keep fop in contrib now that batik and
+    xml-graphics-common are in main
+  * Tighten up dependencies of fop on batik 1.7
+  * Convert fop.sh to java-wrappers
 
+ -- Vincent Fourmond <fourmond at debian.org>  Mon, 06 Oct 2008 20:26:52 +0200
+
 fop (1:0.94.dfsg-2) unstable; urgency=low
 
   * Fixed name of versioned jar.

Modified: trunk/fop/debian/control
===================================================================
--- trunk/fop/debian/control	2008-10-06 16:33:20 UTC (rev 7120)
+++ trunk/fop/debian/control	2008-10-06 18:29:01 UTC (rev 7121)
@@ -1,8 +1,8 @@
 Source: fop
-Section: contrib/text
+Section: text
 Priority: optional
 Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
-Uploaders: Arnaud Vandyck <avdyk at debian.org>, Michael Koch <konqueror at gmx.de>, Sylvestre Ledru <sylvestre.ledru at inria.fr>
+Uploaders: Arnaud Vandyck <avdyk at debian.org>, Michael Koch <konqueror at gmx.de>, Sylvestre Ledru <sylvestre.ledru at inria.fr>, Vincent Fourmond <fourmond at debian.org>
 Build-Depends: debhelper (>= 5), cdbs (>= 0.4.27)
 Build-Depends-Indep: ant-optional, libbatik-java (>= 1.7), libavalon-framework-java (>=4.1.2-2), libxalan2-java, libxerces2-java, openjdk-6-jdk, libcommons-io-java, libcommons-logging-java, junit, libxmlgraphics-commons-java (>= 1.2), libservlet2.4-java, libxml-commons-external-java
 Standards-Version: 3.8.0
@@ -13,7 +13,7 @@
 
 Package: fop
 Architecture: all
-Depends: java-gcj-compat-dev | java2-runtime, libxerces2-java, libxalan2-java, libbsf-java, libavalon-framework-java (>=4.1.2-2), libbatik-java (>= 1.5.1-1), libcommons-io-java, libcommons-logging-java, libxp6, libxt6, libxtst6, libxmlgraphics-commons-java (>= 1.2)
+Depends: java-gcj-compat-dev | java2-runtime, libxerces2-java, libxalan2-java, libbsf-java, libavalon-framework-java (>=4.1.2-2), libbatik-java (>= 1.7), libcommons-io-java, libcommons-logging-java, libxp6, libxt6, libxtst6, libxmlgraphics-commons-java (>= 1.2), java-wrappers (>= 1.9)
 Suggests: fop-doc, libservlet2.4-java
 Replaces: libfop-java
 Description: XML to PDF Translator
@@ -25,7 +25,7 @@
  Document or (in the case of xalan) SAX events.
 
 Package: fop-doc
-Section: contrib/doc
+Section: doc
 Architecture: all
 Replaces: libfop-java-doc
 Description: Documentation for fop

Modified: trunk/fop/debian/fop.sh
===================================================================
--- trunk/fop/debian/fop.sh	2008-10-06 16:33:20 UTC (rev 7120)
+++ trunk/fop/debian/fop.sh	2008-10-06 18:29:01 UTC (rev 7121)
@@ -1,259 +1,23 @@
 #! /bin/sh
+
+# Shell script wrapper around the fop program,
+# Copyright 2008 by Vincent Fourmond <fourmond at debian.org>
 #
-#   Licensed to the Apache Software Foundation (ASF) under one or more
-#   contributor license agreements.  See the NOTICE file distributed with
-#   this work for additional information regarding copyright ownership.
-#   The ASF licenses this file to You under the Apache License, Version 2.0
-#   (the "License"); you may not use this file except in compliance with
-#   the License.  You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
+# Licensed under the same terms as fop itself, that is under
+# the conditions of the Apache 2 licencee.
 
-# Shell script to run FOP, adapted from the Jakarta-Ant project.
+# Include the wrappers utility script
+. /usr/lib/java-wrappers/java-wrappers.sh
 
-rpm_mode=true
-fop_exec_args=
-no_config=false
-fop_exec_debug=false
-show_help=false
-for arg in "$@" ; do
-  if [ "$arg" = "--noconfig" ] ; then
-    no_config=true
-  elif [ "$arg" = "--execdebug" ] ; then
-    fop_exec_debug=true
-  elif [ my"$arg" = my"--h"  -o my"$arg" = my"--help"  ] ; then
-    show_help=true
-    fop_exec_args="$fop_exec_args -h"
-  else
-    if [  my"$arg" = my"-h"  -o  my"$arg" = my"-help" ] ; then
-      show_help=true
-    fi
-    fop_exec_args="$fop_exec_args \"$arg\""
-  fi
-done
 
-# Source/default fop configuration
-if $no_config ; then
-  rpm_mode=false
-else
-  # load system-wide fop configuration
-  if [ -f "/etc/fop.conf" ] ; then
-    . /etc/fop.conf
-  fi
+# We prefer to use openjdk or Sun's java if available
+find_java_runtime openjdk sun  || find_java_runtime 
 
-  # load user fop configuration
-  if [ -f "$HOME/.fop/fop.conf" ] ; then
-    . $HOME/.fop/fop.conf
-  fi
-  if [ -f "$HOME/.foprc" ] ; then
-    . "$HOME/.foprc"
-  fi
+find_jars commons-io avalon-framework serializer xalan2 xml-apis 
+find_jars batik-all commons-logging servlet-api xercesImpl xmlgraphics-commons
 
-  # provide default configuration values
-  if [ -z "$rpm_mode" ] ; then
-    rpm_mode=false
-  fi
-  if [ -z "$usejikes" ] ; then
-    usejikes=$use_jikes_default
-  fi
-fi
 
-# Setup Java environment in rpm mode
-if $rpm_mode ; then
-  if [ -f /usr/share/java-utils/java-functions ] ; then
-    . /usr/share/java-utils/java-functions
-    set_jvm
-    set_javacmd
-  fi
-fi
-
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false;
-darwin=false;
-case "`uname`" in
-  CYGWIN*) cygwin=true ;;
-  Darwin*) darwin=true
-           if [ -z "$JAVA_HOME" ] ; then
-             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
-           fi
-           ;;
-esac
-
-if [ -z "$FOP_HOME" -o ! -d "$FOP_HOME" ] ; then
-  ## resolve links - $0 may be a link to fop's home
-  PRG="$0"
-  progname=`basename "$0"`
-
-  # need this for relative symlinks
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-      PRG="$link"
-    else
-      PRG=`dirname "$PRG"`"/$link"
-    fi
-  done
-
-  FOP_HOME=`dirname "$PRG"`
-
-  # make it fully qualified
-  FOP_HOME=`cd "$FOP_HOME" && pwd`
-fi
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
-  [ -n "$FOP_HOME" ] &&
-    FOP_HOME=`cygpath --unix "$FOP_HOME"`
-  [ -n "$JAVA_HOME" ] &&
-    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-if [ "$OS" = "Windows_NT" ] ; then
-    pathSepChar=";"
-else
-    pathSepChar=":"
-fi
-
-if [ -z "$JAVACMD" ] ; then
-  if [ -n "$JAVA_HOME"  ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-      # IBM's JDK on AIX uses strange locations for the executables
-      JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-      JAVACMD="$JAVA_HOME/bin/java"
-    fi
-  else
-    JAVACMD=`which java 2> /dev/null `
-    if [ -z "$JAVACMD" ] ; then
-        JAVACMD=java
-    fi
-  fi
-fi
-
-if [ ! -x "$JAVACMD" ] ; then
-  echo "Error: JAVA_HOME is not defined correctly."
-  echo "  We cannot execute $JAVACMD"
-  exit 1
-fi
-
-if [ -n "$CLASSPATH" ] ; then
-  LOCALCLASSPATH=$CLASSPATH
-fi
-
-# add fop.jar, fop-sandbox and fop-hyph.jar, which reside in $FOP_HOME/build
-#LOCALCLASSPATH=${FOP_HOME}/build/fop.jar${pathSepChar}${FOP_HOME}/build/fop-sandbox.jar${pathSepChar}${FOP_HOME}/build/fop-hyph.jar${pathSepChar}$LOCALCLASSPATH
-JLIBS=/usr/share/java
-# Debian specific LOCALCLASSPATH
-LOCALCLASSPATH=${JLIBS}/fop.jar${pathSepChar}$LOCALCLASSPATH
-
-# Does not exists in the the Debian package ${pathSepChar}${FOP_HOME}/build/fop-sandbox.jar${pathSepChar}${FOP_HOME}/build/fop-hyph.jar
-
-# add in the dependency .jar files, which reside in $FOP_HOME/lib
-DIRLIBS="${JLIBS}/commons-io.jar ${JLIBS}/avalon-framework.jar ${JLIBS}/serializer.jar ${JLIBS}/xalan2.jar ${JLIBS}/xml-apis.jar ${JLIBS}/batik-all.jar ${JLIBS}/commons-logging.jar ${JLIBS}/servlet-api.jar ${JLIBS}/xercesImpl.jar ${JLIBS}/xmlgraphics-commons.jar"
-
-for i in ${DIRLIBS}
-do
-    # if the directory is empty, then it will return the input string
-    # this is stupid, so case for it
-    if [ "$i" != "${DIRLIBS}" ] ; then
-      if [ -z "$LOCALCLASSPATH" ] ; then
-        LOCALCLASSPATH=$i
-      else
-        LOCALCLASSPATH="$i"${pathSepChar}$LOCALCLASSPATH
-      fi
-    fi
-done
-
-# add in user-defined hyphenation JARs
-if [ -n "$FOP_HYPHENATION_PATH" ] ; then
-  LOCALCLASSPATH=$LOCALCLASSPATH${pathSepChar}$FOP_HYPHENATION_PATH
-fi
-
-# For Cygwin, switch paths to appropriate format before running java
-# For PATHs convert to unix format first, then to windows format to ensure
-# both formats are supported. Probably this will fail on directories with ;
-# in the name in the path. Let's assume that paths containing ; are more
-# rare than windows style paths on cygwin.
-if $cygwin; then
-  if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
-    format=mixed
-  else
-    format=windows
-  fi
-  FOP_HOME=`cygpath --$format "$FOP_HOME"`
-  LCP_TEMP=`cygpath --path --unix "$LOCALCLASSPATH"`
-  LOCALCLASSPATH=`cygpath --path --$format "$LCP_TEMP"`
-  if [ -n "$CLASSPATH" ] ; then
-    CP_TEMP=`cygpath --path --unix "$CLASSPATH"`
-    CLASSPATH=`cygpath --path --$format "$CP_TEMP"`
-  fi
-  CYGHOME=`cygpath --$format "$HOME"`
-fi
-
-# Show script help if requested
-if $show_help ; then
-  fop_exec_args=""
-  echo $0 '[script options] [FOP options]'
-  echo 'Script Options:'
-  echo '  --help, -h             print this message and FOP help'
-  echo '  --noconfig             suppress sourcing of /etc/fop.conf,'
-  echo '                         $HOME/.fop/fop.conf, and $HOME/.foprc'
-  echo '                         configuration files'
-  echo '  --execdebug            print FOP exec line generated by this'
-  echo '                         launch script'
-fi
-
-# add a second backslash to variables terminated by a backslash under cygwin
-if $cygwin; then
-  case "$FOP_HOME" in
-    *\\ )
-    FOP_HOME="$FOP_HOME\\"
-    ;;
-  esac
-  case "$CYGHOME" in
-    *\\ )
-    CYGHOME="$CYGHOME\\"
-    ;;
-  esac
-  case "$LOCALCLASSPATH" in
-    *\\ )
-    LOCALCLASSPATH="$LOCALCLASSPATH\\"
-    ;;
-  esac
-  case "$CLASSPATH" in
-    *\\ )
-    CLASSPATH="$CLASSPATH\\"
-    ;;
-  esac
-fi
-
-# The default commons logger for JDK1.4 is JDK1.4Logger.
-# To use a different logger, uncomment the one desired below
-# LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
-# LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
-# LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
-
-# Logging levels
-# Below option is only if you are using SimpleLog instead of the default JDK1.4 Logger.
-# To set logging levels for JDK 1.4 Logger, edit the %JAVA_HOME%/JRE/LIB/logging.properties 
-# file instead.
-# Possible SimpleLog values:  "trace", "debug", "info" (default), "warn", "error", or "fatal".
-# LOGLEVEL=-Dorg.apache.commons.logging.simplelog.defaultlog=INFO
-
 # comment this line if you want fop to run without headless property
 HEADLESS=-Djava.awt.headless=true
 
-# Execute FOP using eval/exec to preserve spaces in paths,
-# java options, and FOP args
-fop_exec_command="exec \"$JAVACMD\" $HEADLESS $LOGCHOICE $LOGLEVEL -classpath \"$LOCALCLASSPATH\" $FOP_OPTS org.apache.fop.cli.Main $fop_exec_args"
-if $fop_exec_debug ; then
-    echo $fop_exec_command
-fi
-eval $fop_exec_command
+run_java $HEADLESS org.apache.fop.cli.Main "$@"

Modified: trunk/fop/debian/rules
===================================================================
--- trunk/fop/debian/rules	2008-10-06 16:33:20 UTC (rev 7120)
+++ trunk/fop/debian/rules	2008-10-06 18:29:01 UTC (rev 7121)
@@ -30,7 +30,7 @@
 		debian/fop-ttfreader.pod > build/fop-ttfreader.1
 
 install/fop-doc::
-	-mkdir -p html/api
+	-mkdir -p debian/fop-doc/usr/share/doc/fop-doc/html/api
 	#No documentation at the moment... FORREST needed
 	#cp -a build/docs/* html/
 	cp -a build/javadocs/* debian/fop-doc/usr/share/doc/fop-doc/html/api/




More information about the pkg-java-commits mailing list