update to 5.3 [release 5.3-1mamba;Mon Feb 28 2011]
This commit is contained in:
parent
2c5a01b0a3
commit
a83db5fa26
@ -1,2 +1,5 @@
|
||||
# java-checkstyle
|
||||
|
||||
Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. By default it supports the Sun Code Conventions, but is highly configurable.
|
||||
It can be invoked with an ANT task and a command line program.
|
||||
|
||||
|
34
java-checkstyle-5.1-anakia.patch
Normal file
34
java-checkstyle-5.1-anakia.patch
Normal file
@ -0,0 +1,34 @@
|
||||
--- build.xml 2011-02-28 14:12:51.000000000 +0100
|
||||
+++ build.xml-gil 2011-02-28 14:20:22.000000000 +0100
|
||||
@@ -635,11 +635,11 @@
|
||||
path="${checkstyle.dest}">
|
||||
</doclet>
|
||||
</javadoc>
|
||||
-
|
||||
+<!--
|
||||
<taskdef name="anakia" classname="org.apache.velocity.anakia.AnakiaTask">
|
||||
<classpath refid="velocity.classpath"/>
|
||||
</taskdef>
|
||||
-
|
||||
+-->
|
||||
<copy todir="${xdocs.dest}">
|
||||
<fileset dir="${xdocs.src}">
|
||||
<include name="**/*.css"/>
|
||||
@@ -647,7 +647,7 @@
|
||||
<include name="**/*.png"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
-
|
||||
+<!--
|
||||
<anakia basedir="${target.dir}/xdocs"
|
||||
destdir="${xdocs.dest}/"
|
||||
extension=".html"
|
||||
@@ -658,7 +658,7 @@
|
||||
lastModifiedCheck="true"
|
||||
templatePath="${xdocs.src}/stylesheets">
|
||||
</anakia>
|
||||
-
|
||||
+-->
|
||||
</target>
|
||||
|
||||
<target name="report.translation"
|
33
java-checkstyle-5.1-ant-1.8.patch
Normal file
33
java-checkstyle-5.1-ant-1.8.patch
Normal file
@ -0,0 +1,33 @@
|
||||
--- checkstyle-5.1.orig/build.xml 2014-04-01 14:50:00.862599675 +0000
|
||||
+++ checkstyle-5.1/build.xml 2014-04-01 15:39:30.080109023 +0000
|
||||
@@ -425,7 +425,7 @@
|
||||
|
||||
<!-- To run the tests need Xalan in the classpath -->
|
||||
<target name="run.tests"
|
||||
- depends="compile.tests,-require.ant17,-require.xalan,compile.testinputs"
|
||||
+ depends="compile.tests,-require.xalan,compile.testinputs"
|
||||
description="Runs the tests for checkstyle">
|
||||
|
||||
<mkdir dir="${testreport.dir}"/>
|
||||
@@ -682,21 +682,6 @@
|
||||
</xmlvalidate>
|
||||
</target>
|
||||
|
||||
- <!-- Targets to verify that ANT version if at least 1.7 -->
|
||||
- <target name="-check.ant17">
|
||||
- <echo>version is ${ant.version}</echo>
|
||||
- <condition property="have.ant17">
|
||||
- <or>
|
||||
- <contains string="${ant.version}"
|
||||
- substring="Apache Ant version 1.7"/>
|
||||
- </or>
|
||||
- </condition>
|
||||
- </target>
|
||||
-
|
||||
- <target name="-require.ant17" depends="-check.ant17" unless="have.ant17">
|
||||
- <fail message="Need at least version 1.7 of ANT - you have ${ant.version}"/>
|
||||
- </target>
|
||||
-
|
||||
<target name="checkstyle.run" depends="compile.checkstyle"
|
||||
description="Runs checkstyle.">
|
||||
<taskdef name="checkstyle"
|
20
java-checkstyle-5.1-javadoc-crosslink.patch
Normal file
20
java-checkstyle-5.1-javadoc-crosslink.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- build.xml 2011-02-28 13:50:48.000000000 +0100
|
||||
+++ build.xml-gil 2011-02-28 13:46:38.000000000 +0100
|
||||
@@ -594,12 +594,11 @@
|
||||
encoding="iso-8859-1"
|
||||
source="${checkstyle.minimum.javaversion}"
|
||||
failonerror="yes" >
|
||||
- <link packagelistLoc="${basedir}/config/jdk-package-list"
|
||||
- offline="yes"
|
||||
- href="http://java.sun.com/j2se/1.5.0/docs/api/" />
|
||||
- <link packagelistLoc="${basedir}/config/antlr-package-list"
|
||||
- offline="yes"
|
||||
- href="http://www.antlr.org/javadoc/" />
|
||||
+ <link href="${ant.javadoc}" />
|
||||
+ <link href="${antlr.javadoc}" />
|
||||
+ <link href="${beanutils.javadoc}" />
|
||||
+ <link href="${java.javadoc}" />
|
||||
+ <link href="${jaxp.javadoc}" />
|
||||
<fileset dir="src/checkstyle">
|
||||
<include name="**/*.java"/>
|
||||
<exclude name="**/Generated*.java" />
|
27
java-checkstyle-5.1-script
Normal file
27
java-checkstyle-5.1-script
Normal file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Checkstyle script
|
||||
# JPackage Project <http://www.jpackage.org/>
|
||||
# $Id: checkstyle.checkstyle.script,v 1.1 2002/07/11 17:37:37 scop Exp $
|
||||
|
||||
# Source functions library
|
||||
if [ -f /usr/share/java-utils/java-functions ] ; then
|
||||
. /usr/share/java-utils/java-functions
|
||||
else
|
||||
echo "Can't find functions library, aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Configuration
|
||||
MAIN_CLASS=com.puppycrawl.tools.checkstyle.Main
|
||||
BASE_JARS="checkstyle.jar checkstyle-all.jar antlr.jar regexp.jar jakarta-commons-beanutils.jar jakarta-commons-cli.jar jakarta-commons-logging.jar jakarta-commons-collections.jar xercesImpl.jar xml-commons-apis.jar"
|
||||
CLASSPATH=$CLASSPATH:$(build-classpath checkstyle-optional 2>/dev/null) || :
|
||||
|
||||
# Set parameters
|
||||
set_jvm
|
||||
set_classpath $BASE_JARS
|
||||
set_flags $BASE_FLAGS
|
||||
set_options $BASE_OPTIONS
|
||||
|
||||
# Let's start
|
||||
run "$@"
|
17
java-checkstyle-5.1.catalog
Normal file
17
java-checkstyle-5.1.catalog
Normal file
@ -0,0 +1,17 @@
|
||||
-- Checkstyle DTD catalog --
|
||||
-- JPackage Project <http://www.jpackage.org/> --
|
||||
|
||||
PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
|
||||
configuration_1_2.dtd
|
||||
|
||||
PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
|
||||
configuration_1_1.dtd
|
||||
|
||||
PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.0//EN
|
||||
configuration_1_0.dtd
|
||||
|
||||
PUBLIC "-//Puppy Crawl//DTD Package Names 1.0//EN"
|
||||
packages_1_0.dtd
|
||||
|
||||
PUBLIC "-//Puppy Crawl//DTD Suppressions 1.0//EN"
|
||||
suppressions_1_0.dtd
|
270
java-checkstyle.spec
Normal file
270
java-checkstyle.spec
Normal file
@ -0,0 +1,270 @@
|
||||
Name: java-checkstyle
|
||||
Version: 5.1
|
||||
Release: 1mamba
|
||||
Summary: Java source code checker
|
||||
Group: Development/Tools
|
||||
Vendor: openmamba
|
||||
Distribution: openmamba
|
||||
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
URL: http://checkstyle.sourceforge.net/
|
||||
# svn co https://checkstyle.svn.sourceforge.net/svnroot/checkstyle/tags/release5_1 checkstyle-5.1
|
||||
Source0: checkstyle-%{version}-src-svn.tar.gz
|
||||
Source1: java-checkstyle-%{version}-script
|
||||
Source2: java-checkstyle-%{version}.catalog
|
||||
Patch0: java-checkstyle-5.1-javadoc-crosslink.patch
|
||||
Patch1: java-checkstyle-5.1-anakia.patch
|
||||
Patch2: java-checkstyle-5.1-ant-1.8.patch
|
||||
License: BSD, GPL, LGPL
|
||||
BuildRequires: antlr == 2.7.7
|
||||
BuildRequires: antlr-javadoc
|
||||
BuildRequires: apache-ant
|
||||
BuildRequires: apache-ant-junit
|
||||
BuildRequires: apache-ant-nodeps
|
||||
BuildRequires: apache-ant-trax
|
||||
BuildRequires: apache-ant-javadoc
|
||||
BuildRequires: apache-log4j
|
||||
BuildRequires: apache-velocity
|
||||
BuildRequires: jakarta-bcel
|
||||
BuildRequires: jakarta-commons-beanutils
|
||||
BuildRequires: jakarta-commons-beanutils-javadoc
|
||||
BuildRequires: jakarta-commons-cli
|
||||
BuildRequires: jakarta-commons-collections
|
||||
BuildRequires: jakarta-commons-logging
|
||||
BuildRequires: java-dom
|
||||
BuildRequires: java-guava
|
||||
BuildRequires: java-junit3
|
||||
BuildRequires: java-junit48
|
||||
BuildRequires: java-openjdk
|
||||
BuildRequires: java-openjdk-javadoc
|
||||
BuildRequires: jpackage-utils
|
||||
BuildRequires: perl
|
||||
BuildRequires: xalan-j2
|
||||
BuildRequires: xerces-j2
|
||||
BuildRequires: xml-commons-apis-javadoc
|
||||
BuildRequires: java-emma
|
||||
Requires: antlr
|
||||
Requires: antlr-javadoc
|
||||
Requires: apache-ant
|
||||
Requires: apache-ant-junit
|
||||
Requires: apache-ant-nodeps
|
||||
Requires: apache-velocity
|
||||
Requires: jakarta-commons-beanutils
|
||||
Requires: jakarta-commons-beanutils-javadoc
|
||||
Requires: jakarta-commons-cli
|
||||
Requires: jakarta-commons-collections
|
||||
Requires: jakarta-commons-logging
|
||||
Requires: jakarta-regexp
|
||||
Requires: java-dom
|
||||
Requires: jpackage-utils
|
||||
Requires: xalan-j2
|
||||
Requires: xerces-j2
|
||||
Requires: xml-commons-apis
|
||||
Requires: xml-commons-apis-javadoc
|
||||
Obsoletes: %{name}-optional
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
|
||||
%description
|
||||
Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. By default it supports the Sun Code Conventions, but is highly configurable.
|
||||
It can be invoked with an ANT task and a command line program.
|
||||
|
||||
%package demo
|
||||
Group: Development/Tools
|
||||
Summary: Samples for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description demo
|
||||
Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard
|
||||
This package contains samples for %{name}.
|
||||
|
||||
%package javadoc
|
||||
Group: Documentation
|
||||
Summary: Javadoc for %{name}
|
||||
|
||||
%description javadoc
|
||||
Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard
|
||||
This package contains javadoc for %{name}.
|
||||
|
||||
%package manual
|
||||
Group: Documentation
|
||||
Summary: Manual for %{name}
|
||||
|
||||
%description manual
|
||||
Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard
|
||||
This package contains documentation for %{name}.
|
||||
|
||||
%package binaries
|
||||
Group: Development/Languages
|
||||
Summary: %{name} binaries
|
||||
|
||||
%description binaries
|
||||
Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard
|
||||
This package contains %{name} binaries
|
||||
|
||||
%prep
|
||||
%setup -q -n checkstyle-%{version}
|
||||
%patch0 -p0
|
||||
%patch2 -p1
|
||||
|
||||
perl -p -i -e 's|\./{\@docRoot}/\.\./index\.html|%{_docdir}/checkstyle-manual-%{version}/index.html|' build.xml
|
||||
|
||||
sed -i 's/\r//' LICENSE LICENSE.apache20 README RIGHTS.antlr build.xml \
|
||||
checkstyle_checks.xml sun_checks.xml suppressions.xml \
|
||||
contrib/hooks/*.pl src/xdocs/css/*css \
|
||||
java.header
|
||||
|
||||
for j in $(find . -name "*.jar"); do
|
||||
rm -rf $j
|
||||
done
|
||||
|
||||
%build
|
||||
pushd lib
|
||||
ln -sf $(build-classpath antlr) antlr.jar
|
||||
ln -sf $(build-classpath jakarta-commons-beanutils-core) commons-beanutils-core.jar
|
||||
ln -sf $(build-classpath commons-collections) commons-collections-3.2.1.jar
|
||||
ln -sf $(build-classpath commons-cli) commons-cli-1.1.jar
|
||||
ln -sf $(build-classpath apache-velocity-dep) velocity-dep-1.4.jar
|
||||
ln -sf $(build-classpath jakarta-commons-logging) commons-logging.jar
|
||||
ln -sf $(build-classpath jakarta-commons-lang24) commons-lang-2.4.jar
|
||||
ln -sf $(build-classpath emma) .
|
||||
ln -sf $(build-classpath emma_ant) .
|
||||
ln -sf $(build-classpath jdom) jdom-b9.jar
|
||||
ln -sf $(build-classpath junit48) junit-4.4.jar
|
||||
ln -sf $(build-classpath log4j) log4j-1.2.12.jar
|
||||
ln -sf $(build-classpath guava) google-collect-1.0.jar
|
||||
popd
|
||||
export CLASSPATH=$(build-classpath guava junit48 log4j apache-velocity \
|
||||
jdom commons-collections jakarta-commons-lang24 ant/ant-trax junit ant/ant-nodeps ant/ant-junit)
|
||||
ant \
|
||||
-Dbuild.sysclasspath=first \
|
||||
-Dbcel.jar=$(build-classpath bcel) \
|
||||
-Dtools.jar=/usr/lib//jvm/java/lib/tool.jar \
|
||||
-Dant.javadoc=%{_javadocdir}/ant-1.7.1 \
|
||||
-Dantlr.javadoc=%{_javadocdir}/antlr-2.7.7 \
|
||||
-Djava.javadoc=%{_javadocdir}/java \
|
||||
-Djaxp.javadoc=%{_javadocdir}/xml-commons-apis \
|
||||
-Dbeanutils.javadoc=%{_javadocdir}/jakarta-commons-beanutils \
|
||||
build.bindist run.tests
|
||||
|
||||
%install
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
|
||||
mkdir -p %{buildroot}%{_javadir}
|
||||
|
||||
pushd target/dist/checkstyle-%{version}
|
||||
install -pm 644 checkstyle-%{version}.jar \
|
||||
%{buildroot}%{_javadir}/checkstyle-%{version}.jar
|
||||
|
||||
install -pm 644 checkstyle-all-%{version}.jar \
|
||||
%{buildroot}%{_javadir}/checkstyle-all-%{version}.jar
|
||||
|
||||
(
|
||||
cd %{buildroot}%{_javadir}
|
||||
for jar in *-%{version}*; do
|
||||
ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
|
||||
done
|
||||
)
|
||||
popd
|
||||
|
||||
mkdir -p %{buildroot}%{_datadir}/maven2/poms
|
||||
install -pm 644 pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP-checkstyle.pom
|
||||
%add_to_maven_depmap checkstyle checkstyle %{version} JPP checkstyle
|
||||
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
install -pm 755 %{S:1} %{buildroot}%{_bindir}/checkstyle
|
||||
|
||||
mkdir -p %{buildroot}%{_datadir}/xml/checkstyle
|
||||
install -pm 644 %{S:2} %{buildroot}%{_datadir}/xml/checkstyle/catalog
|
||||
install -pm 644 target/checkstyle/com/puppycrawl/tools/checkstyle/*.dtd %{buildroot}%{_datadir}/xml/checkstyle
|
||||
|
||||
mkdir -p %{buildroot}%{_javadocdir}/checkstyle-%{version}
|
||||
cp -par target/dist/checkstyle-%{version}/docs/api/* %{buildroot}%{_javadocdir}/checkstyle-%{version}
|
||||
ln -sf checkstyle-%{version} %{buildroot}%{_javadocdir}/checkstyle
|
||||
rm -rf target/dist/checkstyle-%{version}/docs/api
|
||||
|
||||
sed -i "s|./api/index.html|%{_javadocdir}/checkstyle/index.html|" target/dist/checkstyle-%{version}/docs/index.html
|
||||
sed -i "s|api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html|%{_javadocdir}/checkstyle/com/puppycrawl/tools/checkstyle/api/TokenTypes.html|" target/dist/checkstyle-%{version}/docs/config_javadoc.html
|
||||
|
||||
mkdir -p %{buildroot}%{_datadir}/checkstyle-%{version}
|
||||
cp -par target/dist/checkstyle-%{version}/contrib/* %{buildroot}%{_datadir}/checkstyle-%{version}
|
||||
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/ant.d
|
||||
cat > %{buildroot}%{_sysconfdir}/ant.d/checkstyle << EOF
|
||||
checkstyle checkstyle-all antlr regexp jakarta-commons-beanutils jakarta-commons-cli jakarta-commons-logging jakarta-commons-collections xerces-j2 google-collect
|
||||
EOF
|
||||
|
||||
for i in LICENSE LICENSE.apache20 README RIGHTS.antlr \
|
||||
build.xml checkstyle_checks.xml java.header sun_checks.xml suppressions.xml \
|
||||
target/dist/checkstyle-%{version}/docs/css/*; do
|
||||
tr -d \\r < $i > temp_file; mv temp_file $i
|
||||
done
|
||||
|
||||
mkdir -p %{buildroot}%{_sourcedir}/checkstyle-%{version}
|
||||
cp -pr target/dist/*.{tar*,zip} %{buildroot}%{_sourcedir}/checkstyle-%{version}
|
||||
|
||||
%clean
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
|
||||
%post
|
||||
%update_maven_depmap
|
||||
if [ -x %{_bindir}/install-catalog -a -d %{_sysconfdir}/sgml ]; then
|
||||
%{_bindir}/install-catalog --add \
|
||||
%{_sysconfdir}/sgml/checkstyle-%{version}-%{release}.cat \
|
||||
%{_datadir}/xml/checkstyle/catalog > /dev/null || :
|
||||
fi
|
||||
|
||||
%postun
|
||||
%update_maven_depmap
|
||||
if [ -x %{_bindir}/install-catalog -a -d %{_sysconfdir}/sgml ]; then
|
||||
%{_bindir}/install-catalog --remove \
|
||||
%{_sysconfdir}/sgml/checkstyle-%{version}-%{release}.cat \
|
||||
%{_datadir}/xml/checkstyle/catalog > /dev/null || :
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%config(noreplace) %{_sysconfdir}/ant.d/checkstyle
|
||||
%{_bindir}/checkstyle
|
||||
%{_javadir}/checkstyle-%{version}.jar
|
||||
%{_javadir}/checkstyle.jar
|
||||
%{_javadir}/checkstyle-all-%{version}.jar
|
||||
%{_javadir}/checkstyle-all.jar
|
||||
%dir %{_datadir}/xml/checkstyle
|
||||
%{_datadir}/xml/checkstyle/catalog
|
||||
%{_datadir}/xml/checkstyle/*.dtd
|
||||
%{_datadir}/maven2/poms
|
||||
%{_mavendepmapfragdir}
|
||||
%doc LICENSE LICENSE.apache20 README RIGHTS.antlr build.xml checkstyle_checks.xml java.header sun_checks.xml suppressions.xml
|
||||
|
||||
%files demo
|
||||
%defattr(-,root,root)
|
||||
%{_datadir}/checkstyle-%{version}
|
||||
|
||||
%files javadoc
|
||||
%defattr(-,root,root)
|
||||
%{_javadocdir}/checkstyle-%{version}
|
||||
%{_javadocdir}/checkstyle
|
||||
|
||||
%files manual
|
||||
%defattr(-,root,root)
|
||||
%doc target/dist/checkstyle-%{version}/docs/*
|
||||
|
||||
#%files optional
|
||||
#%defattr(-,root,root)
|
||||
#%{_javadir}/checkstyle-optional-%{version}.jar
|
||||
#%{_javadir}/checkstyle-optional.jar
|
||||
|
||||
|
||||
%files binaries
|
||||
%defattr(-,root,root)
|
||||
%{_sourcedir}/checkstyle-%{version}
|
||||
|
||||
%changelog
|
||||
* Mon Feb 28 2011 gil <puntogil@libero.it> 5.3-1mamba
|
||||
- update to 5.3
|
||||
|
||||
* Sat Jun 06 2009 gil <puntogil@libero.it> 5.0-1mamba
|
||||
- update to 5.0
|
||||
- renamed to legacy java-checkstyle5
|
||||
|
||||
* Sat Mar 07 2009 gil <puntogil@libero.it> 4.1-1mamba
|
||||
- package created by autospec
|
Loading…
Reference in New Issue
Block a user