[Jpackage-commits] dist/checkstyle4/JPP-6 Makefile, NONE, 1.1 checkstyle4-4.4-script, NONE, 1.1 checkstyle4-4.4.catalog, NONE, 1.1 checkstyle4.spec, NONE, 1.1 sources, NONE, 1.1

jpackage jpackage at ryu.zarb.org
Mon Dec 6 22:29:47 CET 2010


Update of /home/projects/jpackage/cvs/dist/checkstyle4/JPP-6
In directory ryu.zarb.org:/tmp/cvs-serv11634/JPP-6

Added Files:
	Makefile checkstyle4-4.4-script checkstyle4-4.4.catalog 
	checkstyle4.spec sources 
Log Message:
Import checkstyle4 into JPP-6

--- NEW FILE: checkstyle4.spec ---
# Copyright (c) 2000-2010, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the
#    distribution.
# 3. Neither the name of the JPackage Project nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}

%define section free
%define oname checkstyle

Name:           checkstyle4
Version:        4.4
Release:        5%{?dist}
Epoch:          0
Summary:        Java source code checker
License:        LGPL
Group:          Development/Build Tools
Source0:        http://downloads.sourceforge.net/checkstyle/checkstyle-src-4.4.tar.gz
Source1:        %{name}-%{version}-script
Source2:        %{name}-%{version}.catalog

URL:            http://checkstyle.sourceforge.net/
Requires:       java >= 0:1.6.0
Requires:       ant >= 0:1.7.1
Requires:       antlr >= 0:2.7.1
Requires:       regexp >= 0:1.4
Requires:       apache-commons-logging
Requires:       apache-commons-cli
Requires:       apache-commons-beanutils
Requires:       apache-commons-collections
Requires:       jpackage-utils >= 0:1.7.5
Requires:       jaxp_parser_impl
BuildRequires:  java-devel >= 0:1.6.0
BuildRequires:  ant >= 0:1.7.1
BuildRequires:  ant-nodeps
BuildRequires:  ant-junit
BuildRequires:  ant-trax
BuildRequires:  junit
BuildRequires:  antlr >= 0:2.7.1
BuildRequires:  apache-commons-beanutils
BuildRequires:  apache-commons-cli
BuildRequires:  xalan-j2
BuildRequires:  apache-commons-lang
BuildRequires:  apache-commons-logging
BuildRequires:  apache-commons-collections
# xerces-j2 because tests fail with gnujaxp...
BuildRequires:  xerces-j2
BuildRequires:  antlr-javadoc
BuildRequires:  xml-commons-jaxp-1.3-apis-javadoc
BuildRequires:  apache-commons-beanutils-javadoc
BuildRequires:  ant-javadoc
BuildRequires:  /usr/bin/perl
BuildRequires:  excalibur-avalon-logkit 
BuildRequires:  emma
BuildRequires:  jdom
BuildRequires:  velocity14
BuildRequires:  jpackage-utils >= 0:1.7.5
Requires(post):    jpackage-utils >= 0:1.7.5
Requires(postun):  jpackage-utils >= 0:1.7.5
%if %{gcj_support}
BuildRequires:    java-gcj-compat-devel
Requires(post):   java-gcj-compat
Requires(postun): java-gcj-compat
%endif
#Provides:       %{oname} = %{epoch}:%{version}

%if ! %{gcj_support}
BuildArch:      noarch
%endif

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root

%description
A tool for checking Java source code for adherence to a set of rules.

%package        demo
Group:          Development/Build Tools
Summary:        Demos for %{name}
Requires:       %{name} = %{epoch}:%{version}

%description    demo
Demonstrations and samples for %{name}.

%package        javadoc
Group:          Development/Documentation
Summary:        Javadoc for %{name}

%description    javadoc
Javadoc for %{name}.

%package        manual
Group:          Development/Build Tools
Summary:        Manual for %{name}

%description    manual
Manual for %{name}.

%package        optional
Group:          Development/Build Tools
Summary:        Optional functionality for %{name}
Requires:       %{name} = %{epoch}:%{version}
Provides:       %{oname}-optional = %{epoch}:%{version}
%if %{gcj_support}
Requires(post):   java-gcj-compat
Requires(postun): java-gcj-compat
%endif

%description    optional
Optional functionality for %{name}.

%prep
%setup -q -n %{oname}-src-%{version}

#%__perl -p -i -e 's|\./{\@docRoot}/\.\./index\.html|%{_docdir}/%{name}-manual-%{version}/index.html|' build.xml

# remove all binary libs
#find . -name "*.jar" -exec %__rm -f {} \;
for j in $(find . -name "*.jar"); do
    mv $j $j.no
done

%build
export OPT_JAR_LIST="ant/ant-junit junit ant/ant-nodeps ant/ant-trax jdom velocity14"
export CLASSPATH=$(build-classpath excalibur/avalon-logkit commons-collections commons-lang)

pushd lib
ln -sf $(build-classpath antlr) .
ln -sf $(build-classpath commons-beanutils-core) .
ln -sf $(build-classpath commons-collections) .
ln -sf $(build-classpath commons-cli) .
ln -sf $(build-classpath commons-lang) .
ln -sf $(build-classpath commons-logging) .
ln -sf $(build-classpath emma) .
ln -sf $(build-classpath emma_ant) .
ln -sf $(build-classpath jdom) .
ln -sf $(build-classpath junit) .
ln -sf $(build-classpath velocity14) .
popd

%ant \
  -Dbuild.sysclasspath=first \
  -Dant.javadoc=%{_javadocdir}/ant \
  -Dantlr.javadoc=%{_javadocdir}/antlr \
  -Djaxp.javadoc=%{_javadocdir}/xml-commons-apis \
  -Dbeanutils.javadoc=%{_javadocdir}/jakarta-commons-beanutils \
  run.tests build.bindist

%install
%__rm -rf %{buildroot}

# jars
%__install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
%__install -pm 644 target/dist/%{oname}-%{version}/%{oname}-%{version}.jar \
                     $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
%__install -pm 644 target/dist/%{oname}-%{version}/%{oname}-optional-%{version}.jar \
                     $RPM_BUILD_ROOT%{_javadir}/%{name}-optional-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do %__ln_s ${jar} `echo $jar| %__sed "s|-%{version}||g"`; done)

%add_to_maven_depmap checkstyle checkstyle %{version} JPP %{name}
%add_to_maven_depmap checkstyle checkstyle-optional %{version} JPP %{name}-optional

# poms
%__install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
%__install -pm 644 pom.xml \
            $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom
%__install -pm 644 pom-optional.xml \
            $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}-optional.pom

# script
%__install -d -m 755 $RPM_BUILD_ROOT%{_bindir}
%__install -pm 755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/%{name}

# dtds
%__install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/xml/%{name}
%__install -pm 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/xml/%{name}/catalog
%__cp -a src/checkstyle/com/puppycrawl/tools/checkstyle/*.dtd \
            $RPM_BUILD_ROOT%{_datadir}/xml/%{name}

# javadoc
%__install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
%__cp -ar target/dist/%{oname}-%{version}/docs/api/* \
            $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
%__rm -rf target/dist/%{oname}-%{version}/docs/api
%__ln_s %{_javadocdir}/%{name} target/dist/%{oname}-%{version}/docs/api
%__ln_s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink

# demo
%__install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}
%__cp -ar target/dist/%{oname}-%{version}/contrib/* \
                     $RPM_BUILD_ROOT%{_datadir}/%{name}

# ant.d
%__install -d -m 755  $RPM_BUILD_ROOT%{_sysconfdir}/ant.d
%__cat > $RPM_BUILD_ROOT%{_sysconfdir}/ant.d/%{name} << EOF
checkstyle4 antlr regexp jakarta-commons-beanutils jakarta-commons-cli jakarta-commons-logging jakarta-commons-collections jaxp_parser_impl
EOF

%if %{gcj_support}
export CLASSPATH=$(build-classpath gnu-crypto)
%{_bindir}/aot-compile-rpm
%endif

%clean
%__rm -rf %{buildroot}

%post
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif
# Note that we're using a fully versioned catalog, so this is always ok.
if [ -x %{_bindir}/install-catalog -a -d %{_sysconfdir}/sgml ]; then
  %{_bindir}/install-catalog --add \
    %{_sysconfdir}/sgml/%{name}-%{version}-%{release}.cat \
    %{_datadir}/xml/%{name}/catalog > /dev/null || :
fi

%postun
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif
# Note that we're using a fully versioned catalog, so this is always ok.
if [ -x %{_bindir}/install-catalog -a -d %{_sysconfdir}/sgml ]; then
  %{_bindir}/install-catalog --remove \
    %{_sysconfdir}/sgml/%{name}-%{version}-%{release}.cat \
    %{_datadir}/xml/%{name}/catalog > /dev/null || :
fi

%post optional
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif
%__grep -q checkstyle-optional %{_sysconfdir}/ant.d/%{name} || \
%__perl -p -i -e 's|checkstyle|checkstyle4 checkstyle4-optional|' %{_sysconfdir}/ant.d/%{name}

%postun optional
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif
%__grep -q checkstyle4-optional %{_sysconfdir}/ant.d/%{name} && \
%__perl -p -i -e 's|checkstyle4-optional ||' %{_sysconfdir}/ant.d/%{name} || :

%files
%defattr(0644,root,root,0755)
%doc LICENSE LICENSE.apache README RIGHTS.antlr
%doc build.xml checkstyle_checks.xml java.header sun_checks.xml suppressions.xml
%{_javadir}/%{name}.jar
%{_javadir}/%{name}-%{version}.jar
%{_datadir}/xml/%{name}
%attr(0755,root,root) %{_bindir}/*
%config(noreplace) %{_sysconfdir}/ant.d/%{name}
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}/*
%if %{gcj_support}
%dir %attr(-,root,root) %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-%{version}.jar.*
%endif

%files demo
%defattr(0644,root,root,0755)
%{_datadir}/%{name}

%files javadoc
%defattr(0644,root,root,0755)
%doc %{_javadocdir}/%{name}-%{version}
%doc %{_javadocdir}/%{name}

%files manual
%defattr(0644,root,root,0755)
%doc target/dist/%{oname}-%{version}/docs/*

%files optional
%defattr(0644,root,root,0755)
%{_javadir}/%{name}-optional.jar
%{_javadir}/%{name}-optional-%{version}.jar
%if %{gcj_support}
%dir %attr(-,root,root) %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-optional-%{version}.jar.*
%endif

%changelog
* Mon Dec 06 2010 Ralph Apel <r.apel at r-apel.de> 0:4.4-5
- Adapt to JPP-6

* Thu Oct 29 2009 Ralph Apel <r.apel at r-apel.de> 0:4.4-4
- Fix naming of poms

* Tue Mar 10 2009 Ralph Apel <r.apel at r-apel.de> 0:4.4-3.jpp5
- Don't provide both checkstyle nor checkstyle-optional

* Mon Feb 02 2009 Ralph Apel <r.apel at r-apel.de> 0:4.4-2.jpp5
- provide both checkstyle and checkstyle-optional = 4.4

* Mon Feb 02 2009 Ralph Apel <r.apel at r-apel.de> 0:4.4-1.jpp5
- Change name to checkstyle4 and upgrade to 4.4

* Wed Jul 04 2007 Ralph Apel <r.apel at r-apel.de> 0:4.3-1jpp
- Upgrade to 4.3
- Make Vendor, Distribution based on macro
- Add gcj_support option

* Thu Mar 30 2006 Ralph Apel <r.apel at r-apel.de> 0:4.1-3jpp
- replace avalon-logkit by excalibur-avalon-logkit as BR

* Wed Feb 22 2006 Ralph Apel <r.apel at r-apel.de> 0:4.1-2jpp
- add exclude to javadoc task iot build with java-1.4.2-bea

* Wed Feb 15 2006 Ralph Apel <r.apel at r-apel.de> 0:4.1-1jpp
- update to 4.1 for JPP-1.7
- reduce dependencies

* Wed Feb 15 2006 Ralph Apel <r.apel at r-apel.de> 0:3.5-2jpp
- set locale iot avoid failure of GeneratedJava14LexerTest

%changelog
* Mon Feb 21 2005 David Walluck <david at jpackage.org> 0:3.5-1jpp
- 0.3.5
- fix ant task with new ant
- add more files to %%doc

* Fri Aug 20 2004 Ralph Apel <r.apel at r-apel.de> - 0:3.4-4jpp
- Build with ant-1.6.2
- Runtime Req ant >= 0:1.6.2

* Fri Aug 06 2004 Ralph Apel <r.apel at r-apel.de> - 0:3.4-3jpp
- Void change

* Tue Jun 01 2004 Randy Watler <rwatler at finali.com> - 0:3.4-2jpp
- Upgrade to Ant 1.6.X

* Mon Apr 12 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:3.4-1jpp
- Update to 3.4.
- Make -optional depend on the main package.
- Update DTD catalog, move DTDs to %%{_datadir}/xml/%%{name}.
- New style versionless javadoc dir symlinking.
- Add -optional jar to classpath in startup script if available.

* Tue Jan 20 2004 David Walluck <david at anti-microsoft.org> 0:3.3-1jpp
- 3.3
- rediff patches
- add `optional' subpackage

* Fri Jul 11 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:3.1-2jpp
- Install DTDs into %%{_datadir}/sgml/%%{name}.
- Include catalog for DTDs, and install it if %%{_bindir}/install-catalog
  is available.
- Javadoc crosslinking.

* Wed Jun  4 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:3.1-1jpp
- Update to 3.1.
- Non-versioned javadoc symlinking.

* Fri Apr  4 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:3.0-2jpp
- Rebuild for JPackage 1.5.

* Sat Mar  1 2003 Ville Skyttä <ville.skytta at iki.fi> - 3.0-1jpp
- Update to 3.0.
- Run unit tests during build.
- Separate manual package.

* Sat Sep 14 2002 Ville Skyttä <ville.skytta at iki.fi> 2.4-1jpp
- 2.4.
- No RPM macros in source URL.
- Use (patched) ant build.bindist task to fix docs.

* Thu Jul 11 2002 Ville Skyttä <ville.skytta at iki.fi> 2.3-2jpp
- Unbreak build.
- Add shell script.

* Tue Jul  9 2002 Ville Skyttä <ville.skytta at iki.fi> 2.3-1jpp
- Updated to 2.3.
- Use sed instead of bash 2 extension when symlinking jars during build.
- BuildRequires ant-optional.

* Fri May 10 2002 Ville Skyttä <ville.skytta at iki.fi> 2.2-1jpp
- Updated to 2.2.
- Added versioned requirements.
- Fixed Distribution and Group tags.
- Added demo package.

* Sun Mar 03 2002 Guillaume Rousse <guillomovitch at users.sourceforge.net> 2.1-1jpp
- first jpp release

--- NEW FILE: sources ---
bd2e832004cd3af1af19437ec561bea5  checkstyle-src-4.4.tar.gz

--- NEW FILE: Makefile ---
# Makefile for source rpm: checkstyle4
# $Id: Makefile,v 1.1 2010/12/06 21:29:45 jpackage Exp $
NAME := checkstyle4
SPECFILE = $(firstword $(wildcard *.spec))

define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef

MAKEFILE_COMMON := $(shell $(find-makefile-common))

ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef

MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif

include $(MAKEFILE_COMMON)

--- NEW FILE: checkstyle4-4.4.catalog ---
-- 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

--- NEW FILE: checkstyle4-4.4-script ---
#!/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="checkstyle4.jar antlr.jar regexp.jar jakarta-commons-beanutils.jar jakarta-commons-cli.jar jakarta-commons-logging.jar jakarta-commons-collections.jar jaxp_parser_impl.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 "$@"




More information about the JPackage-commits mailing list