Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release-src > by-pkgid > 1135f622e3e467218b6d1f463465be26 > files > 3

checkstyle-5.7-3.mga5.src.rpm

# Copyright (c) 2000-2005, 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.
#

Name:           checkstyle
Version:        5.7
Release:        %mkrel 3
Summary:        Java source code checker
URL:            http://checkstyle.sourceforge.net/
# src/checkstyle/com/puppycrawl/tools/checkstyle/grammars/java.g is GPLv2+
# Most of the files in contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ are BSD
License:        LGPLv2+ and GPLv2+ and BSD
Group:          Development/Java
Source0:        http://download.sf.net/checkstyle/checkstyle-%{version}-src.tar.gz
Source2:        %{name}.catalog

BuildRequires:  java-devel >= 1:1.6.0
BuildRequires:  antlr-maven-plugin
BuildRequires:  apache-commons-beanutils
BuildRequires:  apache-commons-cli
BuildRequires:  apache-commons-logging
BuildRequires:  guava
BuildRequires:  junit
BuildRequires:  maven-local
BuildRequires:  maven-antrun-plugin
BuildRequires:  maven-compiler-plugin
BuildRequires:  maven-enforcer-plugin
BuildRequires:  maven-install-plugin
BuildRequires:  maven-jar-plugin
BuildRequires:  maven-javadoc-plugin
BuildRequires:  maven-resources-plugin
BuildRequires:  maven-site-plugin
BuildRequires:  maven-surefire-plugin

BuildArch:      noarch

Obsoletes:      %{name}-optional < %{version}-%{release}
# revisit later, maybe manual will come back when change from ant to
# maven build system will settle down
Obsoletes:      %{name}-manual < %{version}-%{release}

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

%package        demo
Group:          Development/Java
Summary:        Demos for %{name}
Requires:       %{name} = %{version}-%{release}

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

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

%description    javadoc
API documentation for %{name}.

%prep
%setup -q -n %{name}-%{version}

%pom_remove_parent

sed -i s/guava-jdk5/guava/ pom.xml

# not needed for package build
%pom_remove_plugin :maven-eclipse-plugin

# these are only needed for upstream QA
%pom_remove_plugin :cobertura-maven-plugin
%pom_remove_plugin :exec-maven-plugin
%pom_remove_plugin :maven-linkcheck-plugin

# get rid of system scope
%pom_remove_dep com.sun:tools
%pom_add_dep com.sun:tools

# fix encoding issues in docs
sed -i 's/\r//' LICENSE LICENSE.apache20 README.textile RIGHTS.antlr \
         checkstyle_checks.xml sun_checks.xml suppressions.xml \
         contrib/hooks/*.pl src/site/resources/css/*css \
         java.header

# The following test needs network access, so it would fail on Koji
rm -f src/tests/com/puppycrawl/tools/checkstyle/filters/SuppressionsLoaderTest.java

%build
%mvn_file  : %{name}
%mvn_build


%install
%mvn_install

# script
%jpackage_script com.puppycrawl.tools.checkstyle.Main "" "" checkstyle:antlr:apache-commons-beanutils:apache-commons-cli:apache-commons-logging:guava checkstyle true

# dtds
install -Dm 644 %{SOURCE2} %{buildroot}%{_datadir}/xml/%{name}/catalog
cp -pa src/checkstyle/com/puppycrawl/tools/checkstyle/*.dtd \
  %{buildroot}%{_datadir}/xml/%{name}

# javadoc
install -dm 755  %{buildroot}%{_javadocdir}/%{name}
cp -par target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}

# demo
install -dm 755 %{buildroot}%{_datadir}/%{name}
cp -par contrib/* %{buildroot}%{_datadir}/%{name}

# ant.d
install -dm 755  %{buildroot}%{_sysconfdir}/ant.d
cat > %{buildroot}%{_sysconfdir}/ant.d/%{name} << EOF
checkstyle antlr apache-commons-beanutils apache-commons-cli apache-commons-logging guava
EOF

%post
# 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
# 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

%files -f .mfiles
%doc LICENSE README.textile
%doc checkstyle_checks.xml java.header sun_checks.xml suppressions.xml
%{_datadir}/xml/%{name}
%{_bindir}/%{name}
%config(noreplace) %{_sysconfdir}/ant.d/%{name}

%files demo
%{_datadir}/%{name}

%files javadoc -f .mfiles-javadoc
%doc LICENSE



%changelog
* Thu Jan 08 2015 pterjan <pterjan> 5.7-3.mga5
+ Revision: 809325
- Rebuild to fix antlr dependency

* Thu Dec 25 2014 pterjan <pterjan> 5.7-2.mga5
+ Revision: 805636
- Clean rebuild
- Sync with Fedora 21 (and update to 5.7)
- Restore

  + sander85 <sander85>
    - Depends on broken java stack

* Wed Oct 15 2014 umeabot <umeabot> 5.6-8.mga5
+ Revision: 750723
- Second Mageia 5 Mass Rebuild
- Mageia 5 Mass Rebuild

* Thu Dec 26 2013 dmorgan <dmorgan> 5.6-6.mga4
+ Revision: 560752
- Rebuild against java stack

* Tue Oct 22 2013 umeabot <umeabot> 5.6-5.mga4
+ Revision: 545806
- Mageia 4 Mass Rebuild

* Thu Oct 17 2013 luigiwalser <luigiwalser> 5.6-4.mga4
+ Revision: 501861
- BR maven-local for mvn-rpmbuild

* Fri Jan 11 2013 umeabot <umeabot> 5.6-3.mga3
+ Revision: 347666
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Sun Dec 16 2012 dmorgan <dmorgan> 5.6-2.mga3
+ Revision: 331653
- New version

* Thu Apr 28 2011 dmorgan <dmorgan> 5.3-3.mga1
+ Revision: 93286
- Fix requires in the demo package

* Thu Apr 28 2011 dmorgan <dmorgan> 5.3-2.mga1
+ Revision: 93270
- Add patch2 to fix build against new ant
- Add apache-commons-exec as buildrequires
- Fix java requires
- New version 5.3 ( sync with fedora)

* Sun Jan 16 2011 dmorgan <dmorgan> 0:4.4-0.0.4.mga1
+ Revision: 20184
- imported package checkstyle


* Tue Nov 30 2010 Oden Eriksson <oeriksson@mandriva.com> 0:4.4-0.0.4mdv2011.0
+ Revision: 603826
- rebuild

* Tue Mar 16 2010 Oden Eriksson <oeriksson@mandriva.com> 0:4.4-0.0.3mdv2010.1
+ Revision: 522358
- rebuilt for 2010.1

* Sun Aug 09 2009 Oden Eriksson <oeriksson@mandriva.com> 0:4.4-0.0.2mdv2010.0
+ Revision: 413232
- rebuild

* Tue Apr 07 2009 Funda Wang <fwang@mandriva.org> 0:4.4-0.0.1mdv2009.1
+ Revision: 364751
- rediff javadoc patch

* Wed Jan 02 2008 Olivier Blin <oblin@mandriva.com> 0:4.4-0.0.1mdv2009.0
+ Revision: 140692
- restore BuildRoot

* Thu Dec 20 2007 David Walluck <walluck@mandriva.org> 0:4.4-0.0.1mdv2008.1
+ Revision: 135942
- 4.4

  + Thierry Vignaud <tv@mandriva.org>
    - kill re-definition of %%buildroot on Pixel's request

* Sun Dec 16 2007 Anssi Hannula <anssi@mandriva.org> 0:4.3-5mdv2008.1
+ Revision: 120849
- buildrequire java-rpmbuild, i.e. build with icedtea on x86(_64)

* Mon Nov 26 2007 David Walluck <walluck@mandriva.org> 0:4.3-4mdv2008.1
+ Revision: 112037
- fix build by requiring commons-lang (thanks akurtakov)

  + Anssi Hannula <anssi@mandriva.org>
    - remove unnecessary Requires(post) on java-gcj-compat

  + Thierry Vignaud <tv@mandriva.org>
    - kill file require on perl-base


* Sun Mar 04 2007 David Walluck <walluck@mandriva.org> 4.3-1mdv2007.0
+ Revision: 132014
- 4.3
- Import checkstyle

* Tue Jul 11 2006 David Walluck <walluck@mandriva.org> 0:4.2-1mdv2007.0
- 4.2
- add supressions 1.2 dtd to catalog

* Tue Jun 06 2006 David Walluck <walluck@mandriva.org> 0:4.1-4mdv2007.0
- fix macro in %%post

* Mon Jun 05 2006 David Walluck <walluck@mandriva.org> 0:4.1-3
- rebuild for libgcj.so.7
- own %%{_libdir}/gcj/%%{name}

* Wed Jan 18 2006 David Walluck <walluck@mandriva.org> 0:4.1-2mdk
- BuildRequires
- fix javadoc build
- fix file permissions

* Fri Dec 16 2005 David Walluck <walluck@mandriva.org> 0:4.1-1mdk
- 4.1

* Tue Nov 29 2005 David Walluck <walluck@mandriva.org> 0:4.0-1mdk
* Tue Nov 08 2005 David Walluck <walluck@mandriva.org> 0:4.0-0.beta6.2mdk
- don't require ant-junit unconditionally
- include xsl files in main package instead of demo package

* Wed Nov 02 2005 David Walluck <walluck@mandriva.org> 0:4.0-0.beta6.1mdk
- 4.0-beta6
- natively compile

* Sun May 29 2005 David Walluck <walluck@mandriva.org> 0:3.5-1.1mdk
- release

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

* Sat Aug 21 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

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

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

* Tue Apr 13 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.