Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > 085db113ef11ef0c4f97404ca96533f9 > files > 11

findbugs-3.0.0-1.mga5.src.rpm

%global noupdatechecks_version 20140707gitcce19ac

Name:           findbugs
Version:        3.0.0
Release:        %mkrel 1
Summary:        Find bugs in Java code

Group:          Development/Java
License:        LGPLv2+
URL:            http://findbugs.sourceforge.net/
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}-source.zip
Source1:        findbugs-ant
Source2:        findbugs-tools-README

Source3:        http://repo1.maven.org/maven2/com/google/code/findbugs/findbugs/3.0.0/findbugs-3.0.0.pom
Source4:        http://repo1.maven.org/maven2/com/google/code/findbugs/annotations/3.0.0/annotations-3.0.0.pom

# This archive contains the source for the noUpdateChecks plugin.
# It was created with:
#   $ git clone --bare https://code.google.com/p/findbugs
#   $ git --git-dir=findbugs.git archive --format tgz cce19ac plugins/noUpdateChecks -o noUpdateChecks-plugin-20140707gitcce19ac.tgz
Source5:        noUpdateChecks-plugin-%{noupdatechecks_version}.tgz

Source6:        http://repo1.maven.org/maven2/com/google/code/findbugs/findbugs-ant/3.0.0/findbugs-ant-3.0.0.pom

# This patch has not been submitted upstream, as it contains Fedora-specific
# changes.  It looks in /usr/share/java for jar files at compile time, instead
# of in findbugs' lib directory.
Patch0:         findbugs-build.patch

# Fedora-specific patch:
#  - Remove Class-Path entry from findbugs.jar manifest; use build-classpath
#    instead (#575632)
#  - Simplify shell fragment that determines findbugs_home (also fixes #848612)
Patch1:         findbugs-fedora.patch

# Fedora-specific patch to allow Ant task to work even though findbugs.jar has
# no Class-Path attribute in its manifest (bug #1080682)
Patch2:         findbugs-ant-task-classpath.patch

Patch3:         findbugs-manual.patch

BuildArch:      noarch

BuildRequires:  findbugs-bcel
BuildRequires:  ant
BuildRequires:  docbook-style-xsl
BuildRequires:  apache-commons-lang
BuildRequires:  dom4j
BuildRequires:  java-devel >= 1:1.6.0
BuildRequires:  jaxen
BuildRequires:  jcip-annotations
BuildRequires:  jdepend
BuildRequires:  jFormatString
BuildRequires:  jpackage-utils
BuildRequires:  jsr-305
BuildRequires:  junit
BuildRequires:  objectweb-asm
BuildRequires:  perl
BuildRequires:  texlive-collection-basic

# For generating HTML version of manual using xsltproc
BuildRequires:  xsltproc
BuildRequires:  docbook-style-xsl

Requires:       findbugs-bcel
Requires:       apache-commons-lang
Requires:       java >= 1:1.6.0
Requires:       jaxen
Requires:       jcip-annotations
Requires:       jFormatString
Requires:       jpackage-utils
Requires:       jsr-305
Requires:       junit
Requires:       objectweb-asm

%description
Findbugs is a program which uses static analysis to look for bugs in Java code.
It can check for null pointer exceptions, multithreaded code errors, and other
bugs.

%package -n ant-findbugs
Group:          Development/Java
Summary:        Ant task for findbugs
Requires:       %{name} = %{version}-%{release}
Requires:       ant

%description -n ant-findbugs
This package defines an ant task for findbugs for easy integration of findbugs
into your ant-controlled project.

%package javadoc
Group:          Documentation
Summary:        Javadoc documentation for findbugs
Requires:       %{name} = %{version}-%{release}

%description javadoc
Javadoc documentation for findbugs.

%package tools
Group:          Development/Java
Summary:        Addon tools for findbugs
Requires:       %{name} = %{version}-%{release}
Requires:       junit

%description tools
This package contains additional tools for use with findbugs.  See
README.fedora for more information.

%prep
%setup -q
%setup -a 5
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1

cp -p %{SOURCE2} README.fedora

# Make sure we don't accidentally use any existing JAR files
rm -f lib/*.jar

# Get rid of code for Mac OS X that depends on a jar from Apple
rm -f src/gui/edu/umd/cs/findbugs/gui2/OSXAdapter.java

%build
# Build the class files and docs
ant docs build

# Build the javadocs
ant apiJavadoc

# Build the architecture PDF
pushd design/architecture
make depend
make
popd

# Package up the tools
pushd build/classes
jar cf ../../lib/findbugs-tools.jar edu/umd/cs/findbugs/tools
popd

# Build the noUpdateChecks plugin
pushd plugins/noUpdateChecks
ant plugin-jar
popd

%install
# Install the jars
mkdir -p $RPM_BUILD_ROOT%{_javadir}
cp -p lib/annotations.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-annotations.jar
cp -p lib/%{name}-tools.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-tools.jar
cp -p lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar

# Install the ant task
mkdir -p $RPM_BUILD_ROOT%{_javadir}/ant
cp -p lib/%{name}-ant.jar $RPM_BUILD_ROOT%{_javadir}/ant/ant-%{name}.jar
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ant.d
cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/ant.d/%{name}

# Install the javadocs
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}
cp -a apiJavaDoc $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}

# Install the scripts
mkdir -p $RPM_BUILD_ROOT%{_bindir}
for f in $(find bin -maxdepth 1 -type f \! -name '*.bat' \! -name '*.ico'); do
  cp -p $f $RPM_BUILD_ROOT%{_bindir}
done

# Install the shared files
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
cp -a etc plugin $RPM_BUILD_ROOT%{_datadir}/%{name}

# Install the noUpdateChecks plugin
cp -p plugins/noUpdateChecks/build/noUpdateChecks.jar $RPM_BUILD_ROOT%{_datadir}/%{name}/plugin

# Create /usr/share/findbugs/lib directory containing symlinks to required JARs (bug #1080682)
# List is based on the Class-Path attribute in etc/MANIFEST-findbugs.MF
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/lib
for i in findbugs findbugs-bcel dom4j jaxen objectweb-asm/asm-debug-all jsr-305 \
  jFormatString apache-commons-lang; do
    ln -s %{_javadir}/$i.jar $RPM_BUILD_ROOT%{_datadir}/%{name}/lib
done

# Remove now unnecessary build-only manual files so %%doc doesn't get them
rm -f build/doc/manual*.xml build/doc/manual*.xsl

# Install poms
mkdir -p $RPM_BUILD_ROOT%{_mavenpomdir}
cp %{SOURCE3} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
cp %{SOURCE4} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}-annotations.pom
cp %{SOURCE6} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.ant-ant-%{name}.pom

# Add depmaps
%add_maven_depmap -a net.sourceforge.findbugs:findbugs JPP-%{name}.pom %{name}.jar
%add_maven_depmap -a net.sourceforge.findbugs:annotations JPP-%{name}-annotations.pom %{name}-annotations.jar
%add_maven_depmap -a net.sourceforge.findbugs:findbugs-ant JPP.ant-ant-%{name}.pom ant/ant-findbugs.jar -f ant

%files -f .mfiles
%doc licenses/LICENSE.txt design/DecouplingFromBCEL.txt design/VisitingAndCaching.txt
%doc README.txt "design/eclipse findbugs plugin features.sxw"
%doc design/architecture/architecture.pdf build/doc
%{_bindir}/*
%{_datadir}/%{name}

%files -n ant-findbugs -f .mfiles-ant
%doc licenses/LICENSE.txt
%config(noreplace) %{_sysconfdir}/ant.d/%{name}

%files javadoc
%{_javadocdir}/*

%files tools
%doc licenses/LICENSE.txt README.fedora
%{_javadir}/findbugs-tools.jar




%changelog
* Sat Dec 27 2014 pterjan <pterjan> 3.0.0-1.mga5
+ Revision: 806702
- Sync with Fedora 21 (update to 3.0.0)

  + umeabot <umeabot>
    - Second Mageia 5 Mass Rebuild
    - Mageia 5 Mass Rebuild

* Wed Jan 08 2014 dmorgan <dmorgan> 2.0.3-3.mga4
+ Revision: 565597
- Fix Depmap

* Wed Jan 08 2014 dmorgan <dmorgan> 2.0.3-2.mga4
+ Revision: 565581
- Add Maven alias for groupId net.sourceforge.findbugs
- Resolves: rhbz#1049949

* Mon Jan 06 2014 dmorgan <dmorgan> 2.0.3-1.mga4
+ Revision: 565069
- New version
- Add noUpdateChecks plugin, and fix bug #1157
- New version

  + umeabot <umeabot>
    - Mageia 4 Mass Rebuild

  + luigiwalser <luigiwalser>
    - BR texlive-texmf

* Fri Feb 08 2013 fwang <fwang> 1.3.9-7.mga3
+ Revision: 395558
- fix build with latest rpm

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

* Tue Dec 25 2012 pterjan <pterjan> 1.3.9-5.mga3
+ Revision: 335019
- Fix documentation files list for new rpm

* Tue Sep 18 2012 dmorgan <dmorgan> 1.3.9-4.mga3
+ Revision: 295946
- Fix build
- Clean spec file

* Sun Jun 24 2012 dmorgan <dmorgan> 1.3.9-2.mga3
+ Revision: 262880
- Remove versionned jar files
  Clean spec file
- Fix maven macros

* Sun Sep 04 2011 dmorgan <dmorgan> 1.3.9-1.mga2
+ Revision: 138498
- Add jdepend as buildrequire
- Clean spec file

  + gil <gil>
    - imported package findbugs


* Mon Jun 27 2011 gil <gil> 1.3.9-0.%%mkrel
- initial rpm