[statsvn] 07/37: [statsvn] Very preliminary packaging

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Thu Apr 19 22:55:41 BST 2018


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository statsvn.

commit 96d38392a385f760a9f6e47e7a07bb047ddcc8a3
Author: Vincent Fourmond <fourmond at debian.org>
Date:   Thu Jan 10 23:48:59 2008 +0000

    [statsvn] Very preliminary packaging
---
 Makefile                |   8 ---
 cvslognewformat.patch   |  33 ----------
 debian/README.Debian    |  25 --------
 debian/changelog        |  48 +--------------
 debian/compat           |   1 +
 debian/control          |  44 +++++++------
 debian/copyright        |  27 +++++---
 debian/new-upstream     |  36 +++++++++++
 debian/patches/00list   |   0
 debian/rules            | 125 +++++++------------------------------
 debian/statcvs.dirs     |   2 -
 debian/statcvs.docs     |   2 -
 debian/watch            |   2 +
 debian/wrappers.sh      | 161 ++++++++++++++++++++++++++++++++++++++++++++++++
 debian/wrappers/statsvn |  10 +++
 debian_patch            |   4 --
 statcvs                 |  15 -----
 statcvs.1               |  91 ---------------------------
 18 files changed, 282 insertions(+), 352 deletions(-)

diff --git a/Makefile b/Makefile
deleted file mode 100755
index 47cb4e8..0000000
--- a/Makefile
+++ /dev/null
@@ -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
diff --git a/cvslognewformat.patch b/cvslognewformat.patch
deleted file mode 100644
index 5d6cd87..0000000
--- a/cvslognewformat.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- statcvs-20030713/src/net/sf/statcvs/util/DateUtils.java      2003-04-13 17:04:49.000000000 -0600
-+++ statcvs-20030713/src/net/sf/statcvs/util/DateUtils.java      2004-08-16 13:16:33.000000000 -0600
-@@ -38,10 +38,14 @@
- public class DateUtils {
-	private static final String LOG_TIMESTAMP_FORMAT =
-		"yyyy/MM/dd HH:mm:ss zzz";
-+	private static final String LOG_TIMESTAMP_FORMAT_NEW =
-+		"yyyy-MM-dd HH:mm:ss Z zzz";
-	private static final Locale LOG_TIMESTAMP_LOCALE = Locale.US;
-
-	private static SimpleDateFormat logTimeFormat =
-		new SimpleDateFormat(LOG_TIMESTAMP_FORMAT, LOG_TIMESTAMP_LOCALE);
-+	private static SimpleDateFormat logTimeFormatNew =
-+		new SimpleDateFormat(LOG_TIMESTAMP_FORMAT_NEW, LOG_TIMESTAMP_LOCALE);
-	private static SimpleDateFormat outputDateFormat =
-		new SimpleDateFormat(Messages.getString("DATE_FORMAT"));
-	private static SimpleDateFormat outputDateTimeFormat =
-@@ -81,10 +85,13 @@
-	*/
-	public static Date convertFromLogTime(String modTime) {
-		try {
-+			if (modTime.indexOf('-') > 0)
-+				return logTimeFormatNew.parse(modTime);
-+
-			return logTimeFormat.parse(modTime);
-		} catch (ParseException e) {
-			// fallback is to return null
-			return null;
-		}
-	}
--}
-\ No newline at end of file
-+}
diff --git a/debian/README.Debian b/debian/README.Debian
deleted file mode 100644
index 32504b6..0000000
--- a/debian/README.Debian
+++ /dev/null
@@ -1,25 +0,0 @@
-statcvs for Debian
-------------------
-
-In this package there is straight compile of jcommon-0.6.4 and jfreechart-0.9.2 
-so all code is available
-StatCVS doesn't compile (yet?) with last jcommon and jfreechart code that's why these debian package 
-are not used.
-How to use:
-
-	Checkout a repository in e.g cvsrepos dir
-	cvs log the repository running:
-		cvs log > logfile
-	build the stats running:
- 		java -jar /usr/share/java/statcvs.jar -title <title> logfile cvsrepos
-
-	You can get all options running:
-		java -jar /usr/share/java/statcvs.jar
-
-	This probably run only with Sun JVM
-
-	You may encounter problem with huge log so the statcvs wrapper don't work
-	I had to use as an example 
-		/usr/lib/j2sdk1.4-sun/bin/java -server -mx512m -ms128m -ss128m -jar /usr/share/java/statcvs.jar -verbose -output-dir stats -title GForge ~/local/gforge/gforge_cvs.log ~/local/gforge/
-
- -- Christian Bayle <bayle at debian.org>, Fri, 11 Jul 2003 02:20:51 +0200
diff --git a/debian/changelog b/debian/changelog
index 745ac74..4ecb0dd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,47 +1,5 @@
-statcvs (20030713-4) unstable; urgency=high
+statsvn (0.3.1.dfsg-1) UNRELEASED; urgency=low
 
-  * Fixed FTBFS: Missing Build-Depends on 'junit, libjdom-java' 
-  (Closes: #306617)
+  * Initial release (Closes: 456250)
 
- -- Christian Bayle <bayle at debian.org>  Thu, 28 Apr 2005 22:20:22 +0200
-
-statcvs (20030713-3) unstable; urgency=low
-
-  * Applied patch proposed by Gary Hennigan
-  to deal with cvs log new format (Closes: #257622)
-  * Modified stacvs wrapper to take in account more possible JVM 
-
- -- Christian Bayle <bayle at debian.org>  Sun,  5 Sep 2004 20:21:19 +0200
-
-statcvs (20030713-2) unstable; urgency=low
-
-  * Corrected dependancies (Closes: bug#201502)
-  * Made more accurate description, a wrapper, a man and
-  changed section to contrib/devel (Closes: bug#201503)
-  * Added support for Kaffe
-
- -- Christian Bayle <bayle at debian.org>  Sat, 19 Jul 2003 02:35:24 +0200
-
-statcvs (20030713-1) unstable; urgency=low
-
-  * Patch that made fail statcvs on some big CVS archive
-  applied upstream, new upstream 
-
- -- Christian Bayle <bayle at debian.org>  Sun, 13 Jul 2003 01:24:11 +0200
-
-statcvs (20030711-2) unstable; urgency=low
-
-  * Added gorilla.jpg missing file
-  * patch that made fail statcvs on some big CVS archive
-
- -- Christian Bayle <bayle at debian.org>  Sat, 12 Jul 2003 23:44:44 +0200
-
-statcvs (20030711-1) unstable; urgency=low
-
-  * Initial Release. (Closes: bug#199758) ITP
-
- -- Christian Bayle <bayle at debian.org>  Fri, 11 Jul 2003 23:21:44 +0200
-
-Local variables:
-mode: debian-changelog
-End:
+ -- Vincent Fourmond <fourmond at debian.org>  Sat, 05 Jan 2008 01:51:53 +0100
\ No newline at end of file
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..bf0d87a
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+4
\ No newline at end of file
diff --git a/debian/control b/debian/control
index 1a8bd70..a530d76 100644
--- a/debian/control
+++ b/debian/control
@@ -1,21 +1,29 @@
-Source: statcvs
-Section: contrib/devel
+Source: statsvn
+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>
+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://www.statsvn.org/
+Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/statsvn
+Vcs-Browser: http://svn.debian.org/viewsvn/pkg-java/trunk/statsvn
 
-Package: statcvs
-Section: contrib/devel
+
+Package: statsvn
 Architecture: all
-Depends: classpath, kaffe | java2-runtime
-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,
- e.g. timeline for the lines of code, contribution of each developer
- etc.
- 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.
- StatCvs uses JFreeChart to generate charts.
+Depends: sun-java5-jre | sun-java6-jre | java2-runtime, libjcommon-java,
+ libjfreechart-java
+Recommends: subversion
+Description: SVN repository statistics
+ StatSVN retrieves information from a Subversion repository and generates
+ various tables and charts describing the project evolution, e.g.
+ the lines of code over time, contribution of each developer, the
+ evolution of modules, directories, files, the time and days when most
+ checkins happen, etc. It also shows the commit logs and integrates 
+ out of the box with ViewVc, BugZilla, Chora and others.
+ .
+ StatSVN generates a static suite of HTML or XDoc documents containing 
+ tables and chart images.
\ No newline at end of file
diff --git a/debian/copyright b/debian/copyright
index 6b1a8f9..5dce534 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,18 +1,28 @@
-This package was debianized by Christian Bayle <bayle at debian.org>, Fri, 11 Jul 2003 02:20:51 +0200
+This package was debianized by Vincent Fourmond <fourmond at debian.org>, Fri Jan 11 00:23:14 CET 2008
 
-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://www.statsvn.org
+
+It was repackaged to remove:
+  * binary only jar files shipped in lib/
+  * contents of the bin/ directory
+  * tests-src/, without 'sources' and copyrights for most
+  * site/ also without 'sources' and copyrights
+
+The debian/new-upstream script from the source package.
+
+Upstream Authors: Lukasz Pekacki and others
+
+Copyright: 
+	   2002, Lukasz Pekacki <lukasz at pekacki.de>
+	   2005, ObjectLab Financial Ltd
 
-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 +36,6 @@ Copyright:
 On Debian systems, the complete text of the GNU Lesser General
 Public License can be found in `/usr/share/common-licenses/LGPL'.
 
+
+The debian packaging is copyright 2008 by Vincent Fourmond,
+licensed under the same terms as statsvn itself.
\ No newline at end of file
diff --git a/debian/new-upstream b/debian/new-upstream
new file mode 100755
index 0000000..c37a677
--- /dev/null
+++ b/debian/new-upstream
@@ -0,0 +1,36 @@
+#!/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=statsvn_$version.dfsg.orig.tar.gz
+
+# We repackage excluding the lib/ subdir
+cd $dir
+tar cvz \
+    --exclude '*/lib/*.jar' \
+    --exclude '*/bin/*' \
+    --exclude '*/tests-src/*' \
+    --exclude '*/site/*' \
+    -f $origname stat*
+cd -
+mv $dir/$origname ..
+rm -rf $dir
\ No newline at end of file
diff --git a/debian/patches/00list b/debian/patches/00list
new file mode 100644
index 0000000..e69de29
diff --git a/debian/rules b/debian/rules
index 803a8f1..eb76c88 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,114 +1,35 @@
 #!/usr/bin/make -f
+# debian/rules for statsvn, 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/statsvn::
+	install -m 644 dist/statsvn.jar debian/statsvn/usr/share/java/statsvn-$(VERSION).jar
+	ln -s statsvn-$(VERSION).jar debian/statsvn/usr/share/java/statsvn.jar
+	install -m 755 -t debian/statsvn/usr/bin debian/wrappers/statsvn
 
-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
diff --git a/debian/statcvs.dirs b/debian/statcvs.dirs
deleted file mode 100644
index bbd7e93..0000000
--- a/debian/statcvs.dirs
+++ /dev/null
@@ -1,2 +0,0 @@
-/usr/share/java
-/usr/bin
diff --git a/debian/statcvs.docs b/debian/statcvs.docs
deleted file mode 100644
index b6998ee..0000000
--- a/debian/statcvs.docs
+++ /dev/null
@@ -1,2 +0,0 @@
-statcvs-20030713/doc
-statcvs-20030713/README
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..9e0af9b
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://sf.net/statsvn/statsvn-(.*)-source.zip debian debian/new-upstream 
\ No newline at end of file
diff --git a/debian/wrappers.sh b/debian/wrappers.sh
new file mode 100644
index 0000000..a571bd7
--- /dev/null
+++ b/debian/wrappers.sh
@@ -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
diff --git a/debian/wrappers/statsvn b/debian/wrappers/statsvn
new file mode 100755
index 0000000..f6f107e
--- /dev/null
+++ b/debian/wrappers/statsvn
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# Include the wrappers utility script
+. /usr/lib/java/wrappers-statcvs.sh
+
+# We unfortunately need sun's runtime
+find_java_runtime sun
+find_jars jfreechart jcommon statcvs
+
+run_java net.sf.statcvs.Main "$@"
diff --git a/debian_patch b/debian_patch
deleted file mode 100755
index 4147cc7..0000000
--- a/debian_patch
+++ /dev/null
@@ -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
diff --git a/statcvs b/statcvs
deleted file mode 100755
index ff53b7e..0000000
--- a/statcvs
+++ /dev/null
@@ -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
diff --git a/statcvs.1 b/statcvs.1
deleted file mode 100644
index 193ccda..0000000
--- a/statcvs.1
+++ /dev/null
@@ -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).

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/statsvn.git



More information about the pkg-java-commits mailing list