%{?scl:%scl_package guava}
%{!?scl:%global pkg_name %{name}}
%{?java_common_find_provides_and_requires}
Name: %{?scl_prefix}guava
Version: 18.0
Release: 4.3%{?dist}
Summary: Google Core Libraries for Java
License: ASL 2.0
URL: https://github.com/google/guava
Source0: https://github.com/google/guava/archive/v%{version}.tar.gz
#Patch0: %{pkg_name}-java8.patch
BuildRequires: %{?scl_prefix_java_common}maven-local
BuildRequires: %{?scl_prefix_maven}mvn(com.google.code.findbugs:jsr305) >= 0-0.6.20090319svn
BuildRequires: %{?scl_prefix_java_common}ant
BuildRequires: %{?scl_prefix_maven}apache-ivy
BuildArch: noarch
# Use the same directory of the main package for subpackage licence and docs
%global _docdir_fmt %{pkg_name}
%description
Guava is a suite of core and expanded libraries that include
utility classes, Google’s collections, io classes, and much
much more.
This project is a complete packaging of all the Guava libraries
into a single jar. Individual portions of Guava can be used
by downloading the appropriate module and its dependencies.
%package javadoc
Summary: Javadoc for %{pkg_name}
%description javadoc
API documentation for %{pkg_name}.
%prep
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
%setup -n %{pkg_name}-%{version} -q
#%patch0 -p1
find . -name '*.jar' -delete
%pom_disable_module guava-gwt
%pom_disable_module guava-testlib
%pom_disable_module guava-tests
%pom_xpath_inject "pom:dependencies/pom:dependency" "provided" guava
%pom_remove_plugin :animal-sniffer-maven-plugin guava
%pom_remove_plugin :maven-gpg-plugin
%pom_remove_dep jdk:srczip guava
# javadoc generation fails due to strict doclint in JDK 8
%pom_remove_plugin :maven-javadoc-plugin guava
%pom_xpath_inject /pom:project/pom:build/pom:plugins/pom:plugin/pom:configuration/pom:instructions "<_nouses>true" guava/pom.xml
%{?scl:EOF}
%build
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
%mvn_file :%{pkg_name} %{pkg_name}
%mvn_alias :%{pkg_name} com.google.collections:google-collections com.google.guava:guava-jdk5
%mvn_build
%{?scl:EOF}
%install
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
%mvn_install
%{?scl:EOF}
%files -f .mfiles
%doc COPYING
%dir %{_mavenpomdir}/guava
%files javadoc -f .mfiles-javadoc
%doc COPYING
%changelog
* Fri Jul 10 2015 Mat Booth - 18.0-4.3
- Fix unowned directories
* Tue Jun 30 2015 Roland Grunberg - 18.0-4.2
- Change %%license to %%doc (for RHEL 6 builds).
- Make additional changes to satisfy build on RHEL 6.
* Mon Jun 29 2015 Mat Booth - 18.0-4.1
- Import latest from Fedora
* Wed Jun 17 2015 Fedora Release Engineering - 18.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Thu May 14 2015 Mikolaj Izdebski - 18.0-3
- Remove maven-javadoc-plugin execution
* Fri Feb 6 2015 Mikolaj Izdebski - 18.0-2
- Update upstream website URL
* Wed Jan 7 2015 Zbigniew Jędrzejewski-Szmek - 18.0-1
- Update to v. 18 (#1175401)
- Use %license
* Wed Oct 8 2014 Mikolaj Izdebski - 17.0-2
- Add alias for com.google.guava:guava-jdk5
* Fri Jun 20 2014 Mikolaj Izdebski - 17.0-1
- Add patch for Java 8
* Tue Jun 17 2014 Roland Grunberg - 15.0-4
- Do not generate uses directive for exports.
* Fri Jun 13 2014 Zbigniew Jędrzejewski-Szmek 17.0-1
- Update to latest upstream version (#1109442).
* Sat Jun 07 2014 Fedora Release Engineering - 15.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Tue Mar 04 2014 Stanislav Ochotnicky - 15.0-2
- Use Requires: java-headless rebuild (#1067528)
* Wed Jan 8 2014 Mikolaj Izdebski - 15.0-1
- Update to upstream version 15.0
* Mon Aug 12 2013 gil cattaneo 13.0-6
- fix rhbz#992456
- update to current packaging guidelines
* Sat Aug 03 2013 Fedora Release Engineering - 13.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Fri Jun 28 2013 Mikolaj Izdebski - 13.0-4
- Replace BR on ant-nodeps with ant
* Fri Jun 28 2013 Mikolaj Izdebski - 13.0-4
- Rebuild to regenerate API documentation
- Resolves: CVE-2013-1571
* Thu Feb 14 2013 Fedora Release Engineering - 13.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Feb 06 2013 Java SIG - 13.0-2
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
- Replace maven BuildRequires with maven-local
* Tue Aug 7 2012 Mikolaj Izdebski - 13.0-1
- Update to upstream version 13.0
- Remove RPM bug workaround
- Convert patches to pom macros
* Thu Jul 19 2012 Fedora Release Engineering - 11.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Apr 28 2012 gil cattaneo 11.0.2-1
- Update to 11.0.2
* Fri Jan 13 2012 Fedora Release Engineering - 09-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Mon Sep 12 2011 Stanislav Ochotnicky - 09-1
- Update to 09
- Packaging fixes
- Build with maven
* Wed Feb 09 2011 Fedora Release Engineering - 05-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Jul 14 2010 Hui wang - 05-4
- Patch pom
* Fri Jun 18 2010 Hui Wang - 05-3
- Fixed jar name in install section
- Removed spaces in description
* Thu Jun 17 2010 Hui Wang - 05-2
- Fixed summary
- Fixed description
- Fixed creating symlink insturctions
- add depmap
* Thu Jun 10 2010 Hui Wang - 05-1
- Initial version of the package