--- checkstyle-4.4+dfsg.orig/debian/copyright +++ checkstyle-4.4+dfsg/debian/copyright @@ -0,0 +1,23 @@ +This package was debianized by Arnaud Vandyck on +Fri, 6 Feb 2004 20:49:32 +0100. + +It was downloaded from http://checkstyle.sourceforge.net/ + +Upstream Authors: Oliver Burn , + Lars Kühne , + Oleg Sukhodolsky , + Rick Giles . + +Copyright: + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc., + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +See /usr/share/common-licenses/LGPL-2.1 + +Copyright © 2001-2003 Oliver Burn. All rights Reserved. --- checkstyle-4.4+dfsg.orig/debian/watch +++ checkstyle-4.4+dfsg/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts=dversionmangle=s/\+dfsg\d*$// \ + http://sf.net/checkstyle/checkstyle-src-([\d+\.]+)\.tar\.gz debian uupdate --- checkstyle-4.4+dfsg.orig/debian/dirs +++ checkstyle-4.4+dfsg/debian/dirs @@ -0,0 +1,3 @@ +usr/share/java +usr/share/checkstyle/dtd +usr/share/checkstyle/xsl --- checkstyle-4.4+dfsg.orig/debian/Native2Ascii.java +++ checkstyle-4.4+dfsg/debian/Native2Ascii.java @@ -0,0 +1,333 @@ +/* + * Copyright 2000-2005 The Apache Software Foundation + * Copyright 2007 Paul Cager + * + * Licensed 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. + * + * This file is derived from the Ant class org/apache/tools/ant/taskdefs/optional/Native2Ascii.java. + * It provides the native2ascii task for GIJ (the standard ant task only works with SUN and + * Kaffe JREs). + */ + +package org.debian.checkstyle; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileWriter; +import java.io.InputStreamReader; + +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.DirectoryScanner; +import org.apache.tools.ant.Project; +import org.apache.tools.ant.taskdefs.MatchingTask; +import org.apache.tools.ant.taskdefs.optional.native2ascii.Native2AsciiAdapterFactory; +import org.apache.tools.ant.types.Mapper; +import org.apache.tools.ant.util.FileNameMapper; +import org.apache.tools.ant.util.IdentityMapper; +import org.apache.tools.ant.util.SourceFileScanner; +import org.apache.tools.ant.util.facade.FacadeTaskHelper; +import org.apache.tools.ant.util.facade.ImplementationSpecificArgument; + + +/** + * Converts files from native encodings to ASCII. + * + * @since Ant 1.2 + */ +public class Native2Ascii extends MatchingTask { + + private boolean reverse = false; // convert from ascii back to native + private String encoding = null; // encoding to convert to/from + private File srcDir = null; // Where to find input files + private File destDir = null; // Where to put output files + private String extension = null; // Extension of output files if different + + private Mapper mapper; + + public Native2Ascii() { + } + + /** + * Flag the conversion to run in the reverse sense, + * that is Ascii to Native encoding. + * + * @param reverse True if the conversion is to be reversed, + * otherwise false; + */ + public void setReverse(boolean reverse) { + this.reverse = reverse; + } + + /** + * The value of the reverse attribute. + * + * @since Ant 1.6.3 + */ + public boolean getReverse() { + return reverse; + } + + /** + * Set the encoding to translate to/from. + * If unset, the default encoding for the JVM is used. + * + * @param encoding String containing the name of the Native + * encoding to convert from or to. + */ + public void setEncoding(String encoding) { + this.encoding = encoding; + } + + /** + * The value of the reverse attribute. + * + * @since Ant 1.6.3 + */ + public String getEncoding() { + return encoding; + } + + /** + * Set the source directory in which to find files to convert. + * + * @param srcDir directory to find input file in. + */ + public void setSrc(File srcDir) { + this.srcDir = srcDir; + } + + + /** + * Set the destination directory to place converted files into. + * + * @param destDir directory to place output file into. + */ + public void setDest(File destDir) { + this.destDir = destDir; + } + + /** + * Set the extension which converted files should have. + * If unset, files will not be renamed. + * + * @param ext File extension to use for converted files. + */ + public void setExt(String ext) { + this.extension = ext; + } + + /** + * Choose the implementation for this particular task. + * @param impl the name of the implemenation + * @since Ant 1.6.3 + */ + public void setImplementation(String impl) { + } + + /** + * Defines the FileNameMapper to use (nested mapper element). + * + * @return the mapper to use for file name translations. + * + * @throws BuildException if more than one mapper is defined. + */ + public Mapper createMapper() throws BuildException { + if (mapper != null) { + throw new BuildException("Cannot define more than one mapper", + getLocation()); + } + mapper = new Mapper(getProject()); + return mapper; + } + + /** + * A nested filenamemapper + * @param fileNameMapper the mapper to add + * @since Ant 1.6.3 + */ + public void add(FileNameMapper fileNameMapper) { + createMapper().add(fileNameMapper); + } + + /** + * Adds an implementation specific command-line argument. + * @return a ImplementationSpecificArgument to be configured + * + * @since Ant 1.6.3 + */ + public ImplementationSpecificArgument createArg() { + return null; + } + + /** + * Execute the task + * + * @throws BuildException is there is a problem in the task execution. + */ + public void execute() throws BuildException { + + DirectoryScanner scanner = null; // Scanner to find our inputs + String[] files; // list of files to process + + // default srcDir to basedir + if (srcDir == null) { + srcDir = getProject().resolveFile("."); + } + + // Require destDir + if (destDir == null) { + throw new BuildException("The dest attribute must be set."); + } + + // if src and dest dirs are the same, require the extension + // to be set, so we don't stomp every file. One could still + // include a file with the same extension, but .... + if (srcDir.equals(destDir) && extension == null && mapper == null) { + throw new BuildException("The ext attribute or a mapper must be set if" + + " src and dest dirs are the same."); + } + + FileNameMapper m = null; + if (mapper == null) { + if (extension == null) { + m = new IdentityMapper(); + } else { + m = new ExtMapper(); + } + } else { + m = mapper.getImplementation(); + } + + scanner = getDirectoryScanner(srcDir); + files = scanner.getIncludedFiles(); + SourceFileScanner sfs = new SourceFileScanner(this); + files = sfs.restrict(files, srcDir, destDir, m); + int count = files.length; + if (count == 0) { + return; + } + String message = "Converting " + count + " file" + + (count != 1 ? "s" : "") + " from "; + log(message + srcDir + " to " + destDir); + for (int i = 0; i < files.length; i++) { + convert(files[i], m.mapFileName(files[i])[0]); + } + } + + /** + * Convert a single file. + * + * @param srcName name of the input file. + * @param destName name of the input file. + */ + private void convert(String srcName, String destName) + throws BuildException { + File srcFile; // File to convert + File destFile; // where to put the results + + // Build the full file names + srcFile = new File(srcDir, srcName); + destFile = new File(destDir, destName); + + // Make sure we're not about to clobber something + if (srcFile.equals(destFile)) { + throw new BuildException("file " + srcFile + + " would overwrite its self"); + } + + // Make intermediate directories if needed + // XXX JDK 1.1 doesn't have File.getParentFile, + String parentName = destFile.getParent(); + if (parentName != null) { + File parentFile = new File(parentName); + + if ((!parentFile.exists()) && (!parentFile.mkdirs())) { + throw new BuildException("cannot create parent directory " + + parentName); + } + } + + log("converting " + srcName, Project.MSG_VERBOSE); + + process(srcFile, destFile); + } + + private void process(File srcFile, File destFile) throws BuildException + { + BufferedReader br = null; + BufferedWriter bw = null; + + try + { + br = new BufferedReader(new InputStreamReader(new FileInputStream(srcFile), encoding)); + bw = new BufferedWriter(new FileWriter(destFile)); + + String line; + int ch; + while ( (ch = br.read()) != -1) + { + if (ch < 128) + { + bw.write(ch); + } + else + { + bw.write("\\u"); + if (ch < 0x1000) bw.write('0'); + if (ch < 0x100) bw.write('0'); + if (ch < 0x10) bw.write('0'); // Never will be! + bw.write(Integer.toHexString(ch)); + } + } + } + catch (Exception e) + { + throw new BuildException(e); + } + finally + { + if (bw != null) try { bw.close(); } catch (Exception e) { throw new BuildException(e); } + if (br != null) try { br.close(); } catch (Exception e) { throw new BuildException(e); } + } + } + + /** + * Returns the (implementation specific) settings given as nested + * arg elements. + * + * @since Ant 1.6.3 + */ + public String[] getCurrentArgs() { + return null; + } + + private class ExtMapper implements FileNameMapper { + + public void setFrom(String s) { + } + public void setTo(String s) { + } + + public String[] mapFileName(String fileName) { + int lastDot = fileName.lastIndexOf('.'); + if (lastDot >= 0) { + return new String[] {fileName.substring(0, lastDot) + + extension}; + } else { + return new String[] {fileName + extension}; + } + } + } +} --- checkstyle-4.4+dfsg.orig/debian/install +++ checkstyle-4.4+dfsg/debian/install @@ -0,0 +1 @@ +debian/wrappers/checkstyle usr/bin/ --- checkstyle-4.4+dfsg.orig/debian/compat +++ checkstyle-4.4+dfsg/debian/compat @@ -0,0 +1 @@ +5 --- checkstyle-4.4+dfsg.orig/debian/control +++ checkstyle-4.4+dfsg/debian/control @@ -0,0 +1,25 @@ +Source: checkstyle +Section: libs +Priority: optional +Maintainer: Debian Java Maintainers +Uploaders: Arnaud Vandyck , Dominik Smatana , Michael Koch , Paul Cager +Build-Depends: cdbs, debhelper (>= 5), ant +Build-Depends-Indep: default-jdk-builddep, ant-optional, junit (>= 3.8.1), libcommons-beanutils-java (>= 1.5), libcommons-collections-java (>= 2.1), libcommons-logging-java (>= 1.0.3), libregexp-java, antlr (>= 2.7.6), libcommons-cli-java, velocity, libjdom0-java, tofrodos +Standards-Version: 3.8.0 +Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/checkstyle +Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/checkstyle +Homepage: http://checkstyle.sourceforge.net/ + +Package: checkstyle +Architecture: all +Depends: default-jre | java2-runtime, junit (>= 3.8.1), libcommons-beanutils-java (>= 1.5), libcommons-collections-java (>= 2.1), libcommons-logging-java (>= 1.0.3), libregexp-java, antlr, libcommons-cli-java, java-wrappers (>= 0.1.6) +Description: checks Java source against a coding standard + Checkstyle is a development tool to help programmers write Java code that + adheres to a coding standard. It automates the process of checking Java + code to spare humans of this boring (but important) task. This makes it + ideal for projects that want to enforce a coding standard. + . + Checkstyle is highly configurable and can be made to support almost any + coding standard. An example configuration file is supplied supporting the + Sun Code Conventions. As well, other sample configuration files are + supplied for other well known conventions. --- checkstyle-4.4+dfsg.orig/debian/docs +++ checkstyle-4.4+dfsg/debian/docs @@ -0,0 +1,2 @@ +README +target/docs/ --- checkstyle-4.4+dfsg.orig/debian/changelog +++ checkstyle-4.4+dfsg/debian/changelog @@ -0,0 +1,133 @@ +checkstyle (4.4+dfsg-2) unstable; urgency=low + + [ Dominik Smatana ] + * Added wrapper for checkstyle.jar (closes: #512149) + * Updated to standards version 3.8.0 + + [ Michael Koch ] + * Fixed watch file to match current version scheme also. + * Use uscan sf.net helper for SourceForge. Fixes upstream checking. + + -- Dominik Smatana Thu, 26 Mar 2009 20:10:10 +0100 + +checkstyle (4.4+dfsg-1) unstable; urgency=low + + * New upstream release. + * Updated to standards version 3.7.3 + + -- Paul Cager Sat, 29 Dec 2007 21:14:13 +0000 + +checkstyle (4.3+dfsg1-2) unstable; urgency=low + + * Include sun_checks.xml and checkstyle_checks.xml + (Closes: #451802) + * Use Vcs-Browser and Vcs-Svn fields. + + -- Paul Cager Sun, 18 Nov 2007 21:41:24 +0000 + +checkstyle (4.3+dfsg1-1) unstable; urgency=low + + [ Paul Cager ] + * New upstream release. (Closes: #433350) + * FTBFS: Illegal class or package name. + Now built with GIJ and new Ant. (Closes: #432540) + * New version of checkstyle compatible with antlr 2.7.6 (see + upstream change log). + (Closes: #305325) + * Added Homepage, XS-Vcs-Svn and XS-Vcs-Browser tags. + * Ships additional files. (Closes: #434316) + * compat version 5 (no changes necessary). + + [ Michael Koch ] + * Updated watch file. + + -- Michael Koch Fri, 12 Oct 2007 07:31:11 +0200 + +checkstyle (4.1+dfsg-1) unstable; urgency=high + + * Removed third-party Jars in the orig source tarball (Closes #383791). + * Added myself to uploaders. + * Added dos2unix conversion for build.xml (as patches are stored in + svn, and so lose CrLf line terminators). tofrodos added to + Build-Depends-Indep. + + -- Paul Cager Thu, 1 Feb 2007 23:41:01 +0000 + +checkstyle (4.1-1) unstable; urgency=low + + * New upstream release. + - Updated debian/patches/00_build_xml.patch. + * Updated watch file. + + -- Michael Koch Wed, 25 Jan 2006 08:53:26 +0000 + +checkstyle (3.4-9) unstable; urgency=low + + * libant1.6-java to ant transition + * Increased debhelper dependency to make linda happy + * Removed explicit dependencies to gjdoc, jikes - handled by kaffe + * Added myself to uploaders + * Fixed FSF address in copyright + * Standards-Version 3.6.2 (no changes) + + -- Wolfgang Baer Sat, 01 Oct 2005 19:22:52 +0200 + +checkstyle (3.4-8) unstable; urgency=low + + * Include checkstyle-optional.jar (Closes: #270959). + * Fixed watch file. + + -- Michael Koch Mon, 4 Apr 2005 05:31:08 +0000 + +checkstyle (3.4-7) unstable; urgency=low + + * Build-Depend on cdbs (Closes: #301471). + + -- Michael Koch Sat, 26 Mar 2005 16:33:02 +0000 + +checkstyle (3.4-6) unstable; urgency=low + + * Build-Depend on >= gjdoc 0.7.2. + * Use unversioned com-sun-javadoc.jar. + * Build-Depend and Depend on kaffe >= 2:1.1.4.PRECVS8-2. + + -- Michael Koch Wed, 9 Mar 2005 15:59:08 +0000 + +checkstyle (3.4-5) unstable; urgency=low + + * Fixed debian/patches/00_build_xml.patch to call native2ascii correctly. + + -- Michael Koch Sat, 5 Mar 2005 12:55:28 +0000 + +checkstyle (3.4-4) unstable; urgency=low + + * Moved to main. + * Build package with kaffe. + * Cleaned up Build-Depends. + * Use libant1.6-java for building instead of libant1.5 and ant. + * Added debian/patches/00_build_xml.patch. + * Revisited debian/README.Debian. + * Added myself to Uploaders. + + -- Michael Koch Tue, 1 Mar 2005 07:57:45 +0000 + +checkstyle (3.4-3) unstable; urgency=low + + * change the install script/file, now /usr/share/java/checkstyle-3.4.jar + is no more a directory (closes: #265657). + * debian/watch: added. + + -- Arnaud Vandyck Sun, 15 Aug 2004 02:24:22 +0200 + +checkstyle (3.4-2) unstable; urgency=low + + * added a better description + + -- Arnaud Vandyck Sun, 20 Jun 2004 12:50:50 +0200 + +checkstyle (3.4-1) unstable; urgency=low + + * Initial Release (closes: #221892). + + -- Arnaud Vandyck Fri, 4 Jun 2004 14:29:46 +0200 + --- checkstyle-4.4+dfsg.orig/debian/rules +++ checkstyle-4.4+dfsg/debian/rules @@ -0,0 +1,45 @@ +#!/usr/bin/make -f +# debian/rules for checkstyle (uses CDBS) + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +export CLASSPATH=./target/checkstyle/ + +include /usr/share/cdbs/1/rules/simple-patchsys.mk +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/ant.mk + +JAVA_HOME := /usr/lib/jvm/default-java/ +ANT_HOME := /usr/share/ant +DEB_JARS := junit commons-beanutils commons-collections commons-logging regexp antlr commons-cli $(ANT_HOME)/lib/ant-nodeps.jar velocity jdom0 xercesImpl logkit log4j-1.2 +VERSION := $(shell echo $(DEB_UPSTREAM_VERSION) | sed 's/+.*//') +DOWNLOAD := http://heanet.dl.sourceforge.net/sourceforge/checkstyle/checkstyle-src-$(VERSION).tar.gz +#DEB_ANT_ARGS := -verbose +DEB_ANT_BUILD_TARGET := build.bindist #compile.checkstyle #javadoc +PACKAGE := $(DEB_SOURCE_PACKAGE) + +get-orig-source: + echo "Getting $(DOWNLOAD)" + mkdir orig_tmp + cd orig_tmp && \ + wget -O - $(DOWNLOAD) | tar xzf - && \ + rm -rf */lib/* && \ + tar czf ../../$(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz . + rm -rf orig_tmp + +makebuilddir/checkstyle:: + dos2unix build.xml + +clean:: + unix2dos build.xml + +binary-post-install/checkstyle:: + dh_install target/dist/$(PACKAGE)-$(VERSION)/$(PACKAGE)-$(VERSION).jar usr/share/java + dh_install target/dist/$(PACKAGE)-$(VERSION)/$(PACKAGE)-optional-$(VERSION).jar usr/share/java + dh_link usr/share/java/$(PACKAGE)-$(VERSION).jar usr/share/java/$(PACKAGE).jar + dh_link usr/share/java/$(PACKAGE)-optional-$(VERSION).jar usr/share/java/$(PACKAGE)-optional.jar + find target/checkstyle -name '*.dtd' -exec dh_install {} usr/share/checkstyle/dtd \; + find target/dist -name '*.xsl' -exec dh_install {} usr/share/checkstyle/xsl \; + dh_install target/dist/$(PACKAGE)-$(VERSION)/sun_checks.xml usr/share/checkstyle + dh_install target/dist/$(PACKAGE)-$(VERSION)/checkstyle_checks.xml usr/share/checkstyle --- checkstyle-4.4+dfsg.orig/debian/README.Debian +++ checkstyle-4.4+dfsg/debian/README.Debian @@ -0,0 +1,32 @@ +checkstyle for Debian +--------------------- + +USAGE: +------ + +Do not forget to set your CLASSPATH variable to match the correct +requirements to use this library: + +antlrall.jar +regexp.jar +commons-collections.jar +commons-cli.jar +commons-beanutils.jar +commons-logging.jar + +If you did install checkstyle, you already have the correct +dependencies. You'll find all the necessary packages in +'/usr/share/java'. + + + -- Arnaud Vandyck , Fri Jun 4 13:39:14 2004 + + +Wrapper was added in version 4.4+dfsg-2: + +/usr/bin/checkstyle [options] + +There is no need to set CLASSPATH manually anymore. + + -- Dominik Smatana Thu, 26 Mar 2009 19:52:23 +0100 + --- checkstyle-4.4+dfsg.orig/debian/ant.properties +++ checkstyle-4.4+dfsg/debian/ant.properties @@ -0,0 +1,9 @@ +#Do not use sysclasspath=only as we need to define a user-task +#build.sysclasspath=only +antlr.jar=/usr/share/java/antlr.jar +regexp.jar=/usr/share/java/regexp.jar +collections.jar=/usr/share/java/commons-collections.jar +cli.jar=/usr/share/java/commons-cli.jar +beanutils.jar=/usr/share/java/commons-beanutils.jar +logging.jar=/usr/share/java/commons-logging.jar +ant.jar=/usr/share/java/ant.jar --- checkstyle-4.4+dfsg.orig/debian/wrappers/checkstyle +++ checkstyle-4.4+dfsg/debian/wrappers/checkstyle @@ -0,0 +1,10 @@ +#!/bin/sh + +# Include the wrappers utility script +. /usr/lib/java-wrappers/java-wrappers.sh + +find_java_runtime default-jre + +find_jars antlr commons-beanutils commons-collections commons-logging commons-cli checkstyle + +run_java com.puppycrawl.tools.checkstyle.Main "$@" --- checkstyle-4.4+dfsg.orig/debian/patches/35-native-to-ascii.patch +++ checkstyle-4.4+dfsg/debian/patches/35-native-to-ascii.patch @@ -0,0 +1,30 @@ +diff -Nur checkstyle-src-4.3/build.xml checkstyle-src-4.3.new/build.xml +--- checkstyle-src-4.3/build.xml 2007-08-20 23:30:02.000000000 +0100 ++++ checkstyle-src-4.3.new/build.xml 2007-08-20 23:32:12.000000000 +0100 +@@ -4,6 +4,7 @@ + + + ++ + + + +@@ -150,6 +151,18 @@ + + + ++ ++ ++ ++ + + + ++ + + +