This is an automated email from the git hooks/post-receive script. ebourg-guest pushed a commit to branch master in repository statcvs.
commit dc4b780435d4d574dc1db53305714a88603bd811 Author: Vincent Fourmond <[email protected]> Date: Sat Jan 5 00:23:43 2008 +0000 [statcvs] Bring it nearly back into shape. There is a null pointer exception, however --- Makefile | 8 -- debian/changelog | 14 +++ debian/compat | 1 + debian/control | 19 ++-- debian/copyright | 15 ++- statcvs.1 => debian/manpages/statcvs.1 | 0 debian/new-upstream | 31 +++++++ debian/patches/00list | 1 + debian/patches/01-disable-unjar.dpatch | 21 +++++ debian/rules | 126 +++++--------------------- debian/statcvs.dirs | 1 + debian/statcvs.docs | 3 +- debian/statcvs.manpages | 1 + debian/watch | 2 + debian/wrappers.sh | 161 +++++++++++++++++++++++++++++++++ debian/wrappers/statcvs | 9 ++ debian_patch | 4 - statcvs | 15 --- 18 files changed, 290 insertions(+), 142 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:[email protected]:/cvsroot/statcvs login -co: - cvs -d:pserver:[email protected]:/cvsroot/statcvs co . -update: - cvs -d:pserver:[email protected]:/cvsroot/statcvs -z9 update -PdA diff --git a/debian/changelog b/debian/changelog index 745ac74..aeadaf9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 <[email protected]> Sat, 05 Jan 2008 00:51:38 +0100 + statcvs (20030713-4) unstable; urgency=high * Fixed FTBFS: Missing Build-Depends on 'junit, libjdom-java' 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..ff01da3 100644 --- a/debian/control +++ b/debian/control @@ -1,14 +1,21 @@ Source: statcvs -Section: contrib/devel +Section: devel Priority: optional -Maintainer: Christian Bayle <[email protected]> -Build-Depends-Indep: debhelper, sun-j2sdk1.5 | sun-j2sdk1.4, ant, junit, libjdom-java -Standards-Version: 3.6.0 +Maintainer: Debian Java Maintainers <[email protected]> +Uploaders: Vincent Fourmond <[email protected]>, Christian Bayle <[email protected]> +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, diff --git a/debian/copyright b/debian/copyright index 6b1a8f9..131c1ed 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,18 +1,18 @@ This package was debianized by Christian Bayle <[email protected]>, 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 @@ Copyright: 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 diff --git a/statcvs.1 b/debian/manpages/statcvs.1 similarity index 100% rename from statcvs.1 rename to debian/manpages/statcvs.1 diff --git a/debian/new-upstream b/debian/new-upstream new file mode 100755 index 0000000..c99f931 --- /dev/null +++ b/debian/new-upstream @@ -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 <[email protected]> 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 diff --git a/debian/patches/00list b/debian/patches/00list new file mode 100644 index 0000000..5fa4290 --- /dev/null +++ b/debian/patches/00list @@ -0,0 +1 @@ +01-disable-unjar \ No newline at end of file diff --git a/debian/patches/01-disable-unjar.dpatch b/debian/patches/01-disable-unjar.dpatch new file mode 100755 index 0000000..584ca3c --- /dev/null +++ b/debian/patches/01-disable-unjar.dpatch @@ -0,0 +1,21 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01-disable-unjar.dpatch by <[email protected]> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@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> diff --git a/debian/rules b/debian/rules index 803a8f1..7069e92 100755 --- a/debian/rules +++ b/debian/rules @@ -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 diff --git a/debian/statcvs.dirs b/debian/statcvs.dirs index bbd7e93..5c6bc8c 100644 --- a/debian/statcvs.dirs +++ b/debian/statcvs.dirs @@ -1,2 +1,3 @@ /usr/share/java /usr/bin +/usr/lib/java diff --git a/debian/statcvs.docs b/debian/statcvs.docs index b6998ee..8e695ec 100644 --- a/debian/statcvs.docs +++ b/debian/statcvs.docs @@ -1,2 +1 @@ -statcvs-20030713/doc -statcvs-20030713/README +doc diff --git a/debian/statcvs.manpages b/debian/statcvs.manpages new file mode 100644 index 0000000..f234563 --- /dev/null +++ b/debian/statcvs.manpages @@ -0,0 +1 @@ +debian/manpages/statcvs.1 \ No newline at end of file diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..80ef633 --- /dev/null +++ b/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://sf.net/statcvs/statcvs-(.*)-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..69d774a --- /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/statcvs b/debian/wrappers/statcvs new file mode 100755 index 0000000..a47055b --- /dev/null +++ b/debian/wrappers/statcvs @@ -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 "$@" 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 -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/statcvs.git _______________________________________________ pkg-java-commits mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-java-commits

