[pkg-java] r5307 - in trunk/statcvs: . debian debian/manpages debian/patches debian/wrappers
fourmond at alioth.debian.org
fourmond at alioth.debian.org
Sat Jan 5 00:23:44 UTC 2008
Author: fourmond
Date: 2008-01-05 00:23:43 +0000 (Sat, 05 Jan 2008)
New Revision: 5307
Added:
trunk/statcvs/debian/compat
trunk/statcvs/debian/manpages/
trunk/statcvs/debian/manpages/statcvs.1
trunk/statcvs/debian/new-upstream
trunk/statcvs/debian/patches/
trunk/statcvs/debian/patches/00list
trunk/statcvs/debian/patches/01-disable-unjar.dpatch
trunk/statcvs/debian/statcvs.manpages
trunk/statcvs/debian/watch
trunk/statcvs/debian/wrappers.sh
trunk/statcvs/debian/wrappers/
trunk/statcvs/debian/wrappers/statcvs
Removed:
trunk/statcvs/Makefile
trunk/statcvs/debian_patch
trunk/statcvs/statcvs
trunk/statcvs/statcvs.1
Modified:
trunk/statcvs/debian/changelog
trunk/statcvs/debian/control
trunk/statcvs/debian/copyright
trunk/statcvs/debian/rules
trunk/statcvs/debian/statcvs.dirs
trunk/statcvs/debian/statcvs.docs
Log:
[statcvs] Bring it nearly back into shape. There is a null pointer exception, however
Deleted: trunk/statcvs/Makefile
===================================================================
--- trunk/statcvs/Makefile 2008-01-04 23:30:58 UTC (rev 5306)
+++ trunk/statcvs/Makefile 2008-01-05 00:23:43 UTC (rev 5307)
@@ -1,8 +0,0 @@
-default: update
-login:
- echo "Password: <Enter>"
- cvs -d:pserver:anonymous at cvs.sf.net:/cvsroot/statcvs login
-co:
- cvs -d:pserver:anonymous at cvs.sf.net:/cvsroot/statcvs co .
-update:
- cvs -d:pserver:anonymous at cvs.sf.net:/cvsroot/statcvs -z9 update -PdA
Modified: trunk/statcvs/debian/changelog
===================================================================
--- trunk/statcvs/debian/changelog 2008-01-04 23:30:58 UTC (rev 5306)
+++ trunk/statcvs/debian/changelog 2008-01-05 00:23:43 UTC (rev 5307)
@@ -1,3 +1,17 @@
+statcvs (1:0.3.dfsg-1) unstable; urgency=low
+
+ * New upstream release (Closes: #280326)
+ * Now team-maintained
+ * Updated standards to 3.7.3, with amazingly no changes needed.
+ * Watchfile + debian/new-upstream to repackage upstream tarball
+ * Switching to CDBS + dpatch
+ * Moving away from contrib, as it builds fine with gcj
+ * New statcvs script (closes: #343869)
+ * Does not depend on libjdom-java anymore (closes: #331703)
+ * Recommends: cvs as users won't make much of statcvs without it.
+
+ -- Vincent Fourmond <fourmond at debian.org> Sat, 05 Jan 2008 00:51:38 +0100
+
statcvs (20030713-4) unstable; urgency=high
* Fixed FTBFS: Missing Build-Depends on 'junit, libjdom-java'
Added: trunk/statcvs/debian/compat
===================================================================
--- trunk/statcvs/debian/compat (rev 0)
+++ trunk/statcvs/debian/compat 2008-01-05 00:23:43 UTC (rev 5307)
@@ -0,0 +1 @@
+4
\ No newline at end of file
Modified: trunk/statcvs/debian/control
===================================================================
--- trunk/statcvs/debian/control 2008-01-04 23:30:58 UTC (rev 5306)
+++ trunk/statcvs/debian/control 2008-01-05 00:23:43 UTC (rev 5307)
@@ -1,14 +1,21 @@
Source: statcvs
-Section: contrib/devel
+Section: devel
Priority: optional
-Maintainer: Christian Bayle <bayle at debian.org>
-Build-Depends-Indep: debhelper, sun-j2sdk1.5 | sun-j2sdk1.4, ant, junit, libjdom-java
-Standards-Version: 3.6.0
+Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
+Uploaders: Vincent Fourmond <fourmond at debian.org>, Christian Bayle <bayle at debian.org>
+Build-Depends-Indep: java-gcj-compat-dev
+Build-Depends: cdbs, debhelper (>= 5), dpatch, ant, junit,
+ libjcommon-java, libjfreechart-java
+Standards-Version: 3.7.3
+Homepage: http://statcvs.sourceforge.net/
+Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/statcvs
+Vcs-Browser: http://svn.debian.org/viewsvn/pkg-java/trunk/statcvs
+
Package: statcvs
-Section: contrib/devel
Architecture: all
-Depends: classpath, kaffe | java2-runtime
+Depends: java-gcj-compat | java2-runtime, libjcommon-java, libjfreechart-java
+Recommends: cvs
Description: CVS Repository statistic analysis tool, written in Java
StatCvs retrieves information from a CVS repository and generates
various tables and charts describing the project development,
Modified: trunk/statcvs/debian/copyright
===================================================================
--- trunk/statcvs/debian/copyright 2008-01-04 23:30:58 UTC (rev 5306)
+++ trunk/statcvs/debian/copyright 2008-01-05 00:23:43 UTC (rev 5307)
@@ -1,18 +1,18 @@
This package was debianized by Christian Bayle <bayle at debian.org>, Fri, 11 Jul 2003 02:20:51 +0200
-It was downloaded from http://statcvs.sf.net CVS
-This package contain code of jcommon-0.6.4 jfreechart-0.9.2 downloaded from http://sourceforge.net/projects/jfreechart
-This was build using the j2sdk1.4 package built with mpkg-j2sdk
+It was downloaded from http://statcvs.sf.net
+It was repackaged to remove binary only jar files shipped in lib/. The
+debian/new-upstream script from the source package.
+
Upstream Authors: Manuel Schulze, Lukasz Pekacki, Richard Cyganiak, Anja Jentzsch
-JFreechart Author is David Gilbert and others
Copyright:
This package is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -26,3 +26,8 @@
On Debian systems, the complete text of the GNU Lesser General
Public License can be found in `/usr/share/common-licenses/LGPL'.
+
+The original debian packaging is by Christian Bayle.
+
+The current debian packaging is copyright 2008 by Vincent Fourmond,
+licensed under the same terms as statcvs itself.
\ No newline at end of file
Copied: trunk/statcvs/debian/manpages/statcvs.1 (from rev 5261, trunk/statcvs/statcvs.1)
===================================================================
--- trunk/statcvs/debian/manpages/statcvs.1 (rev 0)
+++ trunk/statcvs/debian/manpages/statcvs.1 2008-01-05 00:23:43 UTC (rev 5307)
@@ -0,0 +1,91 @@
+.\" Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH STATCVS 1 "juillet 20, 2003"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh disable hyphenation
+.\" .hy enable hyphenation
+.\" .ad l left justify
+.\" .ad b justify to both left and right margins
+.\" .nf disable filling
+.\" .fi enable filling
+.\" .br insert line break
+.\" .sp <n> insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+statcvs \- CVS Repository statistic analysis tool, written in Java
+.SH SYNOPSIS
+.B statcvs
+.RI [ options ]
+.RI <logfile>
+.RI <directory>
+.br
+.SH DESCRIPTION
+This manual page documents briefly the
+.B statcvs
+command.
+This manual page was written for the Debian distribution
+because the original program does not have a manual page.
+Instead, it has documentation in the GNU Info format; see below.
+.PP
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
+.\" respectively.
+\fBstatcvs\fP is a program that retrieves information from
+a CVS repository and generates
+various tables and charts describing
+the project development,
+e.g. timeline for the lines of code,
+contribution of each developer
+etc.
+.br
+The current version of StatCvs generates a static suite of
+HTML documents containing tables and chart images.
+StatCvs is opens source software,
+released under the terms oft the LGPL.
+.br
+StatCvs uses JFreeChart to generate charts.
+.TP
+.B <logfile>
+path to the cvs logfile of the module
+.TP
+.B <directory>
+path to the directory of the checked out module
+
+.SH OPTIONS
+These programs follow the usual command line syntax, with long
+options starting with one dashe ("\-").
+A list of options is included below.
+For a complete description, run the program without parameters
+.TP
+.B \-version
+print the version information and exit
+.TP
+.B \-output\-dir <dir>
+directory where HTML suite will be saved
+.TP
+.B \-include <pattern>
+include only files matching pattern, e.g. **/*.c;**/*.h
+.TP
+.B \-exclude <pattern>
+exclude matching files, e.g. tests/**;docs/**
+.TP
+.B \-title <title>
+Project title to be used in reports
+.TP
+.B \-viewcvs <url>
+integrate with ViewCVS installation at <url>
+.TP
+.B \-output\-dir <dir>
+directory where HTML suite will be saved
+.TP
+.B \-verbose
+print extra progress information
+.SH SEE ALSO
+.br
+.SH AUTHOR
+This manual page was written by Christian Bayle <bayle at debian.org>,
+for the Debian project (but may be used by others).
Added: trunk/statcvs/debian/new-upstream
===================================================================
--- trunk/statcvs/debian/new-upstream (rev 0)
+++ trunk/statcvs/debian/new-upstream 2008-01-05 00:23:43 UTC (rev 5307)
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# new-upstream: copyright 2007 by Vincent Fourmond.
+# See debian/copyright file for details.
+#
+# Called by uscan; from uscan(1):
+#
+# Finally, if a third parameter (an action) is given in the watchfile
+# line, this is taken as the name of a command, and the command
+# command --upstream-version version filename
+#
+# is executed, using either the original file or the symlink name.
+#
+# Thanks to Sam Morris <sam at robots.org.uk> for giving me the idea
+#
+
+version=$2
+filename=$3
+
+dir=`mktemp -d`
+
+# We repackage the upstream source zip file:
+unzip $filename -d $dir
+origname=statcvs_$version.dfsg.orig.tar.gz
+
+# We repackage excluding the lib/ subdir
+cd $dir
+tar cvz --exclude '*/lib/*.jar' -f $origname stat*
+cd -
+mv $dir/$origname ..
+rm -rf $dir
\ No newline at end of file
Property changes on: trunk/statcvs/debian/new-upstream
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/statcvs/debian/patches/00list
===================================================================
--- trunk/statcvs/debian/patches/00list (rev 0)
+++ trunk/statcvs/debian/patches/00list 2008-01-05 00:23:43 UTC (rev 5307)
@@ -0,0 +1 @@
+01-disable-unjar
\ No newline at end of file
Added: trunk/statcvs/debian/patches/01-disable-unjar.dpatch
===================================================================
--- trunk/statcvs/debian/patches/01-disable-unjar.dpatch (rev 0)
+++ trunk/statcvs/debian/patches/01-disable-unjar.dpatch 2008-01-05 00:23:43 UTC (rev 5307)
@@ -0,0 +1,21 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01-disable-unjar.dpatch by <fourmond at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad statcvs-0.3.dfsg~/build.xml statcvs-0.3.dfsg/build.xml
+--- statcvs-0.3.dfsg~/build.xml 2006-12-08 17:25:14.000000000 +0100
++++ statcvs-0.3.dfsg/build.xml 2008-01-05 00:12:47.000000000 +0100
+@@ -141,8 +141,8 @@
+
+ <target name="jar" depends="test">
+ <!-- Creates an executable jar file for the project -->
+- <unjar src="${lib}/${jfreechart.jar}" dest="${build}"/>
+- <unjar src="${lib}/${jcommon.jar}" dest="${build}"/>
++<!-- <unjar src="${lib}/${jfreechart.jar}" dest="${build}"/> -->
++<!-- <unjar src="${lib}/${jcommon.jar}" dest="${build}"/> -->
+ <mkdir dir="${dist}"/>
+ <jar jarfile="${dist}/${project.jar}" basedir="${build}">
+ <manifest>
Property changes on: trunk/statcvs/debian/patches/01-disable-unjar.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/statcvs/debian/rules
===================================================================
--- trunk/statcvs/debian/rules 2008-01-04 23:30:58 UTC (rev 5306)
+++ trunk/statcvs/debian/rules 2008-01-05 00:23:43 UTC (rev 5307)
@@ -1,114 +1,36 @@
#!/usr/bin/make -f
+# debian/rules for statcvs, based on the one from Batik (uses CDBS)
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-# Build
-JAVA_HOME_DIRS=/usr/lib/j2sdk1.5-sun /usr/lib/j2sdk1.4-sun
-export JAVA_HOME ?= $(shell for j in $(JAVA_HOME_DIRS); do [ -d "$$j" ] && echo $$j && exit 0; done)
-export JAVA=$(JAVA_HOME)/bin/java
-export JAVAC=$(JAVA_HOME)/bin/javac
-export JAR=$(JAVA_HOME)/bin/jar
-# this only compile with sun javac and jar at the moment
+VERSION = $(shell dpkg-parsechangelog | egrep '^Version' | \
+ sed -r 's/Version:\s*//' | sed -r 's/^[0-9]+://' | \
+ sed -r 's/(\.dfsg)?-[0-9.]+//')
-#export CLASSPATH=$(JAVA_HOME)/lib/tools.jar:$(JAVA_HOME)/lib/classes.zip
-#export CLASSPATH=$(JAVA_HOME)/lib/tools.jar:/usr/share/ant1.6/lib/ant.jar
+# export JITC_PROCESSOR_TYPE=6
-export LIBRARY = statcvs
-export VERSION = $(shell head -1 debian/changelog | sed 's/.*(\(.*\)-.*).*/\1/' )
-export SRCDIR=$(LIBRARY)-$(VERSION)
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/ant.mk
+include /usr/share/cdbs/1/rules/dpatch.mk
+JAVA_HOME_DIRS := /usr/lib/jvm/java-gcj
+ANT_HOME := /usr/share/ant
+DEB_JARS := $(ANT_HOME)/lib/ant-launcher.jar \
+ junit jcommon jfreechart
+DEB_ANT_COMPILER := modern
+# DEB_ANT_BUILD_TARGET := all-jar libs-jar ext-jar transcoder
+DEB_BUILDDIR := .
+DEB_ANT_BUILDFILE := build.xml
+DEB_ANT_CLEAN_TARGET := clean
-configure: configure-stamp
-configure-stamp:
- dh_testdir
- # Add here commands to configure the package.
- tar xvzf statcvs-$(VERSION).tar.gz
- -mkdir statcvs-$(VERSION)/lib
- # If upstream make StatCVS port for new jfreechart one day
- #cp /usr/share/java/jfreechart.jar statcvs-$(VERSION)/lib
- #cp /usr/share/java/jcommon.jar statcvs-$(VERSION)/lib
- cp /usr/share/java/junit.jar statcvs-$(VERSION)/lib
- cp /usr/share/java/jdom.jar statcvs-$(VERSION)/lib
- tar xvzf jcommon-0.6.4.tar.gz
- tar xvzf jfreechart-0.9.2.tar.gz
- # This part would require batik (http://xml.apache.org/batik/) to compile a demo jfreechart don't use
- # So I don't compile this
- -rm -rf jfreechart-0.9.2/source/com/jrefinery/chart/demo
- # patch to take in account new cvs log format
- patch -p0 < cvslognewformat.patch
- touch configure-stamp
+print-version:
+ echo $(VERSION)
+install/statcvs::
+ install -m 644 dist/statcvs.jar debian/statcvs/usr/share/java/statcvs-$(VERSION).jar
+ ln -s statcvs-$(VERSION).jar debian/statcvs/usr/share/java/statcvs.jar
+ install -m 644 debian/wrappers.sh debian/statcvs/usr/lib/java/wrappers-statcvs.sh
+ install -m 755 -t debian/statcvs/usr/bin debian/wrappers/statcvs
-build: configure build-stamp
-build-stamp:
- dh_testdir
- -mkdir jfree
- $(JAVAC) -classpath /usr/share/java/junit.jar -d jfree `find jcommon-0.6.4 -name "*.java"`
- $(JAVAC) -classpath /usr/share/java/junit.jar:/usr/share/java/servlet-2.2.jar:jfree -d jfree `find jfreechart-0.9.2 -name "*.java"`
- cp gorilla.jpg jfree/com/jrefinery/chart/
- (cd jfree; $(JAR) cvf ../statcvs-$(VERSION)/lib/jfreechart.jar .)
- cd $(SRCDIR); ant dist
- #rm -rf jfree
- #-mkdir jfree
- # this could be usefull to compile with kaffe one day
- #$(JAVAC) -classpath statcvs-$(VERSION)/lib/jfreechart.jar:statcvs-$(VERSION)/lib/jdom.jar:statcvs-$(VERSION)/lib/junit.jar:/usr/share/ant1.6/lib/ant.jar:jfree -d jfree `find statcvs-$(VERSION) -name "*.java"`
- touch build-stamp
-
-javadoc:
- echo $(SRCDIR)/doc > debian/statcvs.docs
- echo $(SRCDIR)/README >> debian/statcvs.docs
- -rm -rf $(SRCDIR)/doc
- cd $(SRCDIR); ant javadoc
-clean:
- dh_testdir
- dh_testroot
- -rm -f build-stamp
- -rm -f configure-stamp
- -rm -rf $(SRCDIR)
- -rm -rf jfree jfreechart-0.9.2 jcommon-0.6.4
- dh_clean
-
-install: build javadoc
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
- #
- # Package
- #
- install -m 644 $(SRCDIR)/dist/$(LIBRARY).jar \
- debian/tmp/usr/share/java/
- install -m 755 statcvs \
- debian/tmp/usr/bin
-
-# Build architecture-independent files here.
-binary-indep: build install
- dh_testdir
- dh_testroot
-# dh_installdebconf
- dh_installdocs
- dh_installexamples
-# dh_installmenu
-# dh_installemacsen
-# dh_installpam
-# dh_installinit
-# dh_installcron
- dh_installman statcvs.1
-# dh_installinfo
-# dh_undocumented
- dh_installchangelogs
- dh_link
- dh_compress
- dh_fixperms
- dh_installdeb
-# dh_perl
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-
-binary: binary-indep
-
-.PHONY: binary binary-indep clean
Modified: trunk/statcvs/debian/statcvs.dirs
===================================================================
--- trunk/statcvs/debian/statcvs.dirs 2008-01-04 23:30:58 UTC (rev 5306)
+++ trunk/statcvs/debian/statcvs.dirs 2008-01-05 00:23:43 UTC (rev 5307)
@@ -1,2 +1,3 @@
/usr/share/java
/usr/bin
+/usr/lib/java
Modified: trunk/statcvs/debian/statcvs.docs
===================================================================
--- trunk/statcvs/debian/statcvs.docs 2008-01-04 23:30:58 UTC (rev 5306)
+++ trunk/statcvs/debian/statcvs.docs 2008-01-05 00:23:43 UTC (rev 5307)
@@ -1,2 +1 @@
-statcvs-20030713/doc
-statcvs-20030713/README
+doc
Added: trunk/statcvs/debian/statcvs.manpages
===================================================================
--- trunk/statcvs/debian/statcvs.manpages (rev 0)
+++ trunk/statcvs/debian/statcvs.manpages 2008-01-05 00:23:43 UTC (rev 5307)
@@ -0,0 +1 @@
+debian/manpages/statcvs.1
\ No newline at end of file
Added: trunk/statcvs/debian/watch
===================================================================
--- trunk/statcvs/debian/watch (rev 0)
+++ trunk/statcvs/debian/watch 2008-01-05 00:23:43 UTC (rev 5307)
@@ -0,0 +1,2 @@
+version=3
+http://sf.net/statcvs/statcvs-(.*)-source.zip debian debian/new-upstream
\ No newline at end of file
Added: trunk/statcvs/debian/wrappers/statcvs
===================================================================
--- trunk/statcvs/debian/wrappers/statcvs (rev 0)
+++ trunk/statcvs/debian/wrappers/statcvs 2008-01-05 00:23:43 UTC (rev 5307)
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Include the wrappers utility script
+. /usr/lib/java/wrappers-statcvs.sh
+
+find_java_runtime
+find_jars jfreechart jcommon statcvs
+
+run_java net.sf.statcvs.Main "$@"
Property changes on: trunk/statcvs/debian/wrappers/statcvs
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/statcvs/debian/wrappers.sh
===================================================================
--- trunk/statcvs/debian/wrappers.sh (rev 0)
+++ trunk/statcvs/debian/wrappers.sh 2008-01-05 00:23:43 UTC (rev 5307)
@@ -0,0 +1,161 @@
+# Functions for execution of Java wrapper scripts
+
+# Some initializations:
+[ "$DESTDIR" ] || DESTDIR=
+[ "$JAVA_CLASSPATH" ] || JAVA_CLASSPATH=
+
+
+# Display a debugging message
+java_debug() {
+ if [ "$DEBUG" ]; then
+ echo "[debug] $0: $@" >&2;
+ fi
+}
+
+# Displays a warning
+java_warning() {
+ echo "[warning] $0: $@" >&2;
+}
+
+# Exit with an error message
+java_fail() {
+ echo "[error] $0: $@" >&2;
+ exit 1;
+}
+
+
+# Try to find a Java runtime and set JAVA_HOME and JAVACMD accordingly.
+# If JAVACMD exists, nothing is done. If JAVA_HOME exists, only that
+# is searched.
+#
+# In the other cases, the runtime is looked for according to one of the
+# following arguments:
+# * 2 : java runtime 2
+# * swing : a JVM that has swing
+# * fullxml: a JVM that has all XML classes, including
+# javax.xml.stream.util.StreamReaderDelegate
+# * sun: sun's JVM, for stuff depending on the infamous com.sun classes
+# * sun6: sun's JVM version 6
+#
+# If JAVA_DEBUG is set, we try to use jdb rather than java, if it is
+# present.
+#
+# This information is currently *far from complete* !!!
+find_java_runtime() {
+ # First, known runtimes:
+ sun_java="/usr/lib/jvm/java-6-sun /usr/lib/jvm/java-1.5.0-sun /usr/lib/j2sdk1.4-sun "
+ gcj2="/usr/lib/jvm/java-*-gcj-4.* "
+ sablevm="/usr/lib/sablevm"
+ kaffe="/usr/lib/kaffe /usr/lib/kaffe/pthreads /usr/lib/kaffe/jthreads"
+ icedtea="/usr/lib/jvm/java-7-icedtea"
+ cacao="/usr/lib/jvm/cacao"
+
+ # Then, classes of JVM:
+ all_runtimes="$gcj2 $cacao $sablevm $kaffe $icedtea $sun_java /usr/lib/jvm/*"
+
+ # Java2 runtimes:
+ java2_runtimes="$gcj2 $iced_tea $sun_java"
+
+ # Full swing runtimes:
+ full_swing_runtimes="$iced_tea $sun_java"
+
+ # Sun java apparently has some XML functions more than concurrents:
+ xml_extra="/usr/lib/jvm/java-6-sun /usr/lib/jvm/java-1.5.0-sun"
+
+ if [ "$JAVACMD" ]; then
+ java_debug "Using already set JAVACMD = $JAVACMD"
+ return 0; # Nothing to do
+ fi
+
+ if [ -z "$JAVA_HOME" ]; then
+ # We now try to look for a reasonable JAVA_HOME.
+ # First, narrow the choices, approximately according to what
+ # was asked
+ case $1 in
+ # A java2 runtime
+ 2) DIRS=$java2_runtimes
+ ;;
+ swing) DIRS="$icedtea $sun_java";
+ ;;
+ sun) DIRS=$sun_java
+ ;;
+ sun6) DIRS=/usr/lib/jvm/java-6-sun
+ ;;
+ fullxml) DIRS=$xml_extra
+ ;;
+ *) DIRS=$all_runtimes
+ ;;
+ esac
+ # And pick up the first one that works
+ for dir in $DIRS; do
+ if [ -x $dir/bin/java ]; then
+ JAVA_HOME=$dir
+ break;
+ fi
+ done
+ fi
+ if [ "$JAVA_HOME" ] ; then
+ if [ "$JAVA_DEBUG" ] && [ -x "$JAVA_HOME/bin/jdb" ]; then
+ JAVACMD="$JAVA_HOME/bin/jdb"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ java_debug "Found JAVA_HOME = $JAVA_HOME"
+ java_debug "Found JAVACMD = $JAVACMD"
+ return 0 # Fine
+ else
+ java_warning "No java runtime was found for flavor '${1:-none}'"
+ return 1;
+ fi
+}
+
+# Same as find_java_runtime, but fails with an error if
+# nothing is found.
+require_java_runtime() {
+ find_java_runtime "$@" || \
+ java_fail "Unable to find an appropriate java runtime"
+}
+
+# Find jars and add them to the classpath
+find_jars() {
+ for jar in $@ ; do
+ if [ -r $DESTDIR/usr/share/java/$jar ]; then
+ JAVA_CLASSPATH=$JAVA_CLASSPATH:$DESTDIR/usr/share/java/$jar
+ elif [ -r $DESTDIR/usr/share/java/$jar.jar ]; then
+ JAVA_CLASSPATH=$JAVA_CLASSPATH:$DESTDIR/usr/share/java/$jar.jar
+ else
+ java_warning "Unable to locate $jar in $DESTDIR/usr/share/java/"
+ fi
+ done
+}
+
+# Adds the first jar found to the classpath. Useful for alternative
+# dependencies.
+find_one_jar_in() {
+ for jar in $@ ; do
+ if [ -r $DESTDIR/usr/share/java/$jar ]; then
+ JAVA_CLASSPATH=$JAVA_CLASSPATH:$DESTDIR/usr/share/java/$jar
+ return 0
+ elif [ -r $DESTDIR/usr/share/java/$jar.jar ]; then
+ JAVA_CLASSPATH=$JAVA_CLASSPATH:$DESTDIR/usr/share/java/$jar.jar
+ return 0
+ fi
+ done
+ java_warning "Could fine none of $@ in $DESTDIR/usr/share/java/"
+ return 1
+}
+
+# Runs the program !
+run_java() {
+ if [ -z "$JAVACMD"]; then
+ java_warning "No JAVACMD set for run_java, using JAVACMD = java"
+ JAVACMD=java
+ fi
+ if [ "$JAVA_CLASSPATH" ]; then
+ cp="-cp $JAVA_CLASSPATH";
+ else
+ cp="";
+ fi
+ java_debug "Runnning $JAVACMD $JAVA_ARGS $cp $@"
+ exec $JAVACMD $JAVA_ARGS $cp "$@"
+}
\ No newline at end of file
Deleted: trunk/statcvs/debian_patch
===================================================================
--- trunk/statcvs/debian_patch 2008-01-04 23:30:58 UTC (rev 5306)
+++ trunk/statcvs/debian_patch 2008-01-05 00:23:43 UTC (rev 5307)
@@ -1,4 +0,0 @@
-#grep -r com.jrefinery statcvs-* | cut -d: -f1 | sort -u | while read file
-#do
-# perl -pi -e 's/com\.jrefinery/org.jfree/g' $file
-#done
Deleted: trunk/statcvs/statcvs
===================================================================
--- trunk/statcvs/statcvs 2008-01-04 23:30:58 UTC (rev 5306)
+++ trunk/statcvs/statcvs 2008-01-05 00:23:43 UTC (rev 5307)
@@ -1,15 +0,0 @@
-#! /bin/sh
-# let's try to find a sun JVM
-for javabin in /usr/lib/j2re1.4-sun/bin/java /usr/lib/j2sdk1.4-sun/bin/java /usr/lib/j2se/1.4/bin/java /usr/lib/j2sdk1.4/bin/java /usr/lib/j2re1.4/bin/java
-do
- if [ -f $javabin ]
- then
- $javabin -jar /usr/share/java/statcvs.jar $@
- exit $?
- fi
-done
-# this should also work with kaffe
-if [ -f /usr/bin/kaffe ]
-then
- /usr/bin/kaffe -classpath /usr/share/kaffe/Klasses.jar:/usr/share/classpath/glibj.zip -jar /usr/share/java/statcvs.jar $@
-fi
Deleted: trunk/statcvs/statcvs.1
===================================================================
--- trunk/statcvs/statcvs.1 2008-01-04 23:30:58 UTC (rev 5306)
+++ trunk/statcvs/statcvs.1 2008-01-05 00:23:43 UTC (rev 5307)
@@ -1,91 +0,0 @@
-.\" Hey, EMACS: -*- nroff -*-
-.\" First parameter, NAME, should be all caps
-.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
-.\" other parameters are allowed: see man(7), man(1)
-.TH STATCVS 1 "juillet 20, 2003"
-.\" Please adjust this date whenever revising the manpage.
-.\"
-.\" Some roff macros, for reference:
-.\" .nh disable hyphenation
-.\" .hy enable hyphenation
-.\" .ad l left justify
-.\" .ad b justify to both left and right margins
-.\" .nf disable filling
-.\" .fi enable filling
-.\" .br insert line break
-.\" .sp <n> insert n+1 empty lines
-.\" for manpage-specific macros, see man(7)
-.SH NAME
-statcvs \- CVS Repository statistic analysis tool, written in Java
-.SH SYNOPSIS
-.B statcvs
-.RI [ options ]
-.RI <logfile>
-.RI <directory>
-.br
-.SH DESCRIPTION
-This manual page documents briefly the
-.B statcvs
-command.
-This manual page was written for the Debian distribution
-because the original program does not have a manual page.
-Instead, it has documentation in the GNU Info format; see below.
-.PP
-.\" TeX users may be more comfortable with the \fB<whatever>\fP and
-.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
-.\" respectively.
-\fBstatcvs\fP is a program that retrieves information from
-a CVS repository and generates
-various tables and charts describing
-the project development,
-e.g. timeline for the lines of code,
-contribution of each developer
-etc.
-.br
-The current version of StatCvs generates a static suite of
-HTML documents containing tables and chart images.
-StatCvs is opens source software,
-released under the terms oft the LGPL.
-.br
-StatCvs uses JFreeChart to generate charts.
-.TP
-.B <logfile>
-path to the cvs logfile of the module
-.TP
-.B <directory>
-path to the directory of the checked out module
-
-.SH OPTIONS
-These programs follow the usual command line syntax, with long
-options starting with one dashe ("\-").
-A list of options is included below.
-For a complete description, run the program without parameters
-.TP
-.B \-version
-print the version information and exit
-.TP
-.B \-output\-dir <dir>
-directory where HTML suite will be saved
-.TP
-.B \-include <pattern>
-include only files matching pattern, e.g. **/*.c;**/*.h
-.TP
-.B \-exclude <pattern>
-exclude matching files, e.g. tests/**;docs/**
-.TP
-.B \-title <title>
-Project title to be used in reports
-.TP
-.B \-viewcvs <url>
-integrate with ViewCVS installation at <url>
-.TP
-.B \-output\-dir <dir>
-directory where HTML suite will be saved
-.TP
-.B \-verbose
-print extra progress information
-.SH SEE ALSO
-.br
-.SH AUTHOR
-This manual page was written by Christian Bayle <bayle at debian.org>,
-for the Debian project (but may be used by others).
More information about the pkg-java-commits
mailing list