Blob Blame History Raw
%global snapdate 20100827
#svn 990212.

Name:           apache-rat
Version:        0.8
Release:        12%{?dist}
Summary:        Apache Release Audit Tool (RAT)

Group:          Development/Libraries
License:        ASL 2.0
URL:            http://creadur.apache.org/rat/
#svn had a number of needed bugfixes
#svn export -r 990212 http://svn.apache.org/repos/asf/incubator/rat/main/trunk apache-rat-0.8-20100707
#Source0:        %{name}-%{version}-%{snapdate}.tar.bz2
Source0:        http://www.apache.org/dist/incubator/rat/sources/apache-rat-incubating-%{version}-src.tar.bz2
Patch0:         apache-rat-0.8-doxia-1.1.patch
Patch1:         apache-rat-compat.patch
Patch2:         apache-rat-0.8-test.patch
BuildArch:      noarch

BuildRequires:  jpackage-utils
BuildRequires:  java-devel
BuildRequires:  maven-local
BuildRequires:  maven-antrun-plugin
BuildRequires:  maven-dependency-plugin
BuildRequires:  maven-install-plugin
BuildRequires:  maven-invoker-plugin
BuildRequires:  maven-plugin-plugin
BuildRequires:  maven-site-plugin
BuildRequires:  maven-source-plugin
BuildRequires:  maven-surefire-maven-plugin
BuildRequires:  maven-wagon

BuildRequires:  ant-antunit
BuildRequires:  ant-testutil
BuildRequires:  apache-commons-compress


%description
Release Audit Tool (RAT) is a tool to improve accuracy and efficiency when
checking releases. It is heuristic in nature: making guesses about possible
problems. It will produce false positives and cannot find every possible
issue with a release. It's reports require interpretation.

RAT was developed in response to a need felt in the Apache Incubator to be
able to review releases for the most common faults less labor intensively.
It is therefore highly tuned to the Apache style of releases.

This package just contains meta-data, you will want either apache-rat-tasks,
or apache-rat-plugin.


%package core
Summary:        Core functionality for %{name}
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description core
The core functionality of RAT, shared by the Ant tasks, and the Maven plugin.
It also includes a wrapper script "apache-rat" that should be the equivalent
to running upstream's "java -jar apache-rat.jar".


%package plugin
Summary:        Maven plugin for %{name}
Group:          Development/Libraries
Requires:       %{name}-core = %{version}-%{release}

%description plugin
Maven plugin for running RAT, the Release Audit Tool.


%package tasks
Summary:        Ant tasks for %{name}
Group:          Development/Libraries
Requires:       %{name}-core = %{version}-%{release}

%description tasks
Ant tasks for running RAT.


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

%description javadoc
This package contains the API documentation for %{name}.


%prep
%setup -q -n %{name}-%{version}
%patch0 -p1 -b .doxia-1.1
%patch1 -p1 -b .compat
%patch2 -p1 -b .test

%pom_remove_plugin :maven-antrun-plugin apache-rat-tasks

%mvn_package :apache-rat-project apache-rat

%build
%mvn_build -f -s

%install
%mvn_install

#Wrapper script
%jpackage_script org.apache.rat.Report "" "" %{name}/%{name}-core:commons-cli:commons-io:commons-collections:commons-compress:commons-lang:junit apache-rat true 

#Ant taksks
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ant.d
echo "apache-rat/rat-core apache-rat/rat-tasks" > $RPM_BUILD_ROOT%{_sysconfdir}/ant.d/%{name}


%files -f .mfiles-apache-rat
%doc DISCLAIMER.txt LICENSE NOTICE README.txt RELEASE_NOTES.txt
%dir %{_javadir}/%{name}

%files core -f .mfiles-apache-rat-core
%doc LICENSE NOTICE
%{_bindir}/%{name}

%files plugin -f .mfiles-apache-rat-plugin
%doc LICENSE NOTICE

%files tasks -f .mfiles-apache-rat-tasks
%doc LICENSE NOTICE
%{_sysconfdir}/ant.d/%{name}

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


%changelog
* Tue Aug 27 2013 Michal Srb <msrb@redhat.com> - 0.8-12
- Migrate away from mvn-rpmbuild (Resolves: #997517)

* Fri Jun 28 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.8-11
- Rebuild to regenerate API documentation
- Resolves: CVE-2013-1571

* Tue Jun 11 2013 Orion Poplawski <orion@cora.nwra.com> 0.8-10
- Split up depmap fragments (bug 973242)

* Tue Feb 26 2013 Orion Poplawski <orion@cora.nwra.com> 0.8-9
- Drop BR on maven-doxia and maven-doxia-sitetools (bug #915606)

* Tue Feb 12 2013 Orion Poplawski <orion@cora.nwra.com> 0.8-8
- Add apache-rat wrapper script to apache-rat-core (bug #907782)
- Disable tests for now due to Fedora maven bug

* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 0.8-7
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
- Replace maven BuildRequires with maven-local

* Thu Aug 16 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.8-6
- Run mvn-rpmbuild package instead of install

* Thu Aug 16 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.8-5
- Install NOTICE files
- Remove defattr

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Wed Dec 7 2011 Orion Poplawski <orion@cora.nwra.com> 0.8-2
- Update to maven 3

* Tue Dec 6 2011 Orion Poplawski <orion@cora.nwra.com> 0.8-1
- Update to 0.8 release
- Add BR maven-invoker-plugin

* Thu Apr 28 2011 Orion Poplawski <orion@cora.nwra.com> 0.8-0.7.20100827
- Add needed requires to core

* Thu Mar 3 2011 Orion Poplawski <orion@cora.nwra.com> 0.8-0.6.20100827
- Drop unneeded rm from %%install
- Don't ship BUILD.txt
- Cleanup Requires

* Mon Dec 27 2010 Orion Poplawski <orion@cora.nwra.com> 0.8-0.5.20100827
- Drop maven settings patch
- Add svn revision to export command
- Set maven.test.failure.ignore=true instead of maven.test.skip
- Use %%{_mavenpomdir}

* Thu Dec 9 2010 Orion Poplawski <orion@cora.nwra.com> 0.8-0.4.20100827
- Change BR to ant-antunit
- Drop versioned jar and javadoc
- Drop BuildRoot and %%clean

* Mon Nov 1 2010 Orion Poplawski <orion@cora.nwra.com> 0.8-0.3.20100827
- Add /etc/ant.d/apache-rat

* Fri Oct 29 2010 Orion Poplawski <orion@cora.nwra.com> 0.8-0.2.20100827
- First real working package

* Wed Aug 11 2010 Orion Poplawski <orion@cora.nwra.com> 0.8-0.1
- Initial Fedora package