361b64
%bcond_with bootstrap
361b64
361b64
Name:           guava
361b64
Version:        31.0.1
361b64
Release:        4%{?dist}
361b64
Summary:        Google Core Libraries for Java
361b64
# Most of the code is under ASL 2.0
361b64
# Few classes are under CC0, grep for creativecommons
361b64
License:        ASL 2.0 and CC0
361b64
URL:            https://github.com/google/guava
361b64
BuildArch:      noarch
361b64
ExclusiveArch:  %{java_arches} noarch
361b64
361b64
Source0:        https://github.com/google/guava/archive/v%{version}/guava-%{version}.tar.gz
361b64
361b64
Patch1:         0001-Remove-multi-line-annotations.patch
361b64
361b64
%if %{with bootstrap}
361b64
BuildRequires:  javapackages-bootstrap-openjdk8
361b64
%else
361b64
BuildRequires:  maven-local-openjdk8
361b64
BuildRequires:  %{?module_prefix}mvn(com.google.code.findbugs:jsr305)
361b64
BuildRequires:  mvn(junit:junit)
361b64
BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
361b64
BuildRequires:  mvn(org.apache.maven.plugins:maven-enforcer-plugin)
361b64
%endif
361b64
361b64
%description
361b64
Guava is a suite of core and expanded libraries that include
361b64
utility classes, Google’s collections, io classes, and much
361b64
much more.
361b64
This project is a complete packaging of all the Guava libraries
361b64
into a single jar.  Individual portions of Guava can be used
361b64
by downloading the appropriate module and its dependencies.
361b64
361b64
%{?javadoc_package}
361b64
361b64
%package testlib
361b64
Summary:        The guava-testlib artifact
361b64
361b64
%description testlib
361b64
guava-testlib provides additional functionality for conveninent unit testing
361b64
361b64
%prep
361b64
%setup -q
361b64
361b64
find . -name '*.jar' -delete
361b64
361b64
%pom_remove_parent guava-bom
361b64
361b64
%pom_disable_module guava-gwt
361b64
%pom_disable_module guava-tests
361b64
361b64
%pom_xpath_inject pom:modules "<module>futures/failureaccess</module>"
361b64
%pom_xpath_inject pom:parent "<relativePath>../..</relativePath>" futures/failureaccess
361b64
%pom_xpath_set pom:parent/pom:version %{version}-jre futures/failureaccess
361b64
361b64
%pom_remove_plugin -r :animal-sniffer-maven-plugin
361b64
# Downloads JDK source for doc generation
361b64
%pom_remove_plugin :maven-dependency-plugin guava
361b64
361b64
%pom_remove_dep :caliper guava-tests
361b64
361b64
%mvn_package :guava-parent guava
361b64
361b64
# javadoc generation fails due to strict doclint in JDK 1.8.0_45
361b64
%pom_remove_plugin -r :maven-javadoc-plugin
361b64
361b64
%pom_xpath_inject /pom:project/pom:build/pom:plugins/pom:plugin/pom:configuration/pom:instructions "<_nouses>true</_nouses>" guava/pom.xml
361b64
361b64
%pom_remove_dep -r :error_prone_annotations
361b64
%pom_remove_dep -r :j2objc-annotations
361b64
%pom_remove_dep -r org.checkerframework:
361b64
%pom_remove_dep -r :listenablefuture
361b64
361b64
annotations=$(
361b64
    find -name '*.java' \
361b64
    | xargs fgrep -h \
361b64
        -e 'import com.google.j2objc.annotations' \
361b64
        -e 'import com.google.errorprone.annotation' \
361b64
        -e 'import com.google.errorprone.annotations' \
361b64
        -e 'import com.google.common.annotations' \
361b64
        -e 'import org.codehaus.mojo.animal_sniffer' \
361b64
        -e 'import org.checkerframework' \
361b64
    | sort -u \
361b64
    | sed 's/.*\.\([^.]*\);/\1/' \
361b64
    | paste -sd\|
361b64
)
361b64
361b64
# guava started using quite a few annotation libraries for code quality, which
361b64
# we don't have. This ugly regex is supposed to remove their usage from the code
361b64
find -name '*.java' | xargs sed -ri \
361b64
    "s/^import .*\.($annotations);//;s/@($annotations)"'\>\s*(\((("[^"]*")|([^)]*))\))?//g'
361b64
361b64
%patch1 -p1 -b .multiline
361b64
361b64
%mvn_package "com.google.guava:failureaccess" guava
361b64
361b64
%mvn_package "com.google.guava:guava-bom" __noinstall
361b64
361b64
%build
361b64
# Tests fail on Koji due to insufficient memory,
361b64
# see https://bugzilla.redhat.com/show_bug.cgi?id=1332971
361b64
%mvn_build -s -f
361b64
361b64
%install
361b64
%mvn_install
361b64
361b64
%files -f .mfiles-guava
361b64
%doc CONTRIBUTORS README*
361b64
%license COPYING
361b64
361b64
%files testlib -f .mfiles-guava-testlib
361b64
361b64
%changelog
361b64
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 31.0.1-4
361b64
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
361b64
361b64
* Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 31.0.1-3
361b64
- Rebuilt for java-17-openjdk as system jdk
361b64
361b64
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 31.0.1-2
361b64
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
361b64
361b64
* Thu Oct 14 2021 Orion Poplawski <orion@nwra.com> - 31.0.1-1
361b64
- Update to 31.0.1
361b64
361b64
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 30.1-3
361b64
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
361b64
361b64
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 30.1-2
361b64
- Bootstrap build
361b64
- Non-bootstrap build
361b64
361b64
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 25.0-10
361b64
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
361b64
361b64
* Tue Jan 26 2021 Marian Koncek <mkoncek@redhat.com> - 30.1-1
361b64
- Update to upstream version 30.1
361b64
361b64
* Fri Sep 18 2020 Marian Koncek <mkoncek@redhat.com> - 29.0-1
361b64
- Update to upstream version 29.0
361b64
361b64
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 25.0-9
361b64
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
361b64
361b64
* Fri Jul 10 2020 Jiri Vanek <jvanek@redhat.com> - 25.0-8
361b64
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
361b64
361b64
* Wed Feb 19 2020 Fabio Valentini <decathorpe@gmail.com> - 25.0-7
361b64
- Drop unnecessary dependency on parent POM.
361b64
361b64
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 25.0-6
361b64
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
361b64
361b64
* Sat Jan 25 2020 Mikolaj Izdebski <mizdebsk@redhat.com> - 28.2-2
361b64
- Build with OpenJDK 8
361b64
361b64
* Fri Jan 24 2020 Marian Koncek <mkoncek@redhat.com> - 28.2-1
361b64
- Update to upstream version 28.2
361b64
361b64
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 28.1-2
361b64
- Mass rebuild for javapackages-tools 201902
361b64
361b64
* Mon Sep 02 2019 Marian Koncek <mkoncek@redhat.com> - 28.1-1
361b64
- Update to upstream version 28.1
361b64
361b64
* Thu Aug 01 2019 Marian Koncek <mkoncek@redhat.com> - 28.0-1
361b64
- Update to upstream version 28.0
361b64
361b64
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 25.0-5
361b64
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
361b64
361b64
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 25.0-4
361b64
- Mass rebuild for javapackages-tools 201901
361b64
361b64
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 25.0-4
361b64
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
361b64
361b64
* Fri Aug 03 2018 Michael Simacek <msimacek@redhat.com> - 25.0-3
361b64
- Fix license tag to include CC0
361b64
361b64
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 25.0-2
361b64
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
361b64
361b64
* Wed May 02 2018 Michael Simacek <msimacek@redhat.com> - 25.0-1
361b64
- Update to upstream version 25.0
361b64
361b64
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 24.0-2
361b64
- Escape macros in %%changelog
361b64
361b64
* Mon Feb 05 2018 Michael Simacek <msimacek@redhat.com> - 24.0-1
361b64
- Update to upstream version 24.0
361b64
361b64
* Mon Nov 06 2017 Michael Simacek <msimacek@redhat.com> - 20.0-1
361b64
- Update to upstream version 20.0
361b64
361b64
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 18.0-11
361b64
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
361b64
361b64
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 18.0-10
361b64
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
361b64
361b64
* Mon Oct 10 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 18.0-9
361b64
- Allow conditional builds without testlib
361b64
361b64
* Thu Jun 16 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 18.0-8
361b64
- Cleanup package
361b64
361b64
* Tue May 10 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 18.0-7
361b64
- Disable tests due to insufficient memory on Koji
361b64
361b64
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 18.0-6
361b64
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
361b64
361b64
* Wed Jun 22 2015 Noa Resare <noa@resare.com> - 18.0-5
361b64
- enable module guava-testlib
361b64
- enable tests in guava-testlib
361b64
- backport fix to HashMap related test from 19.0-SNAPSHOT
361b64
361b64
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 18.0-4
361b64
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
361b64
361b64
* Thu May 14 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 18.0-3
361b64
- Remove maven-javadoc-plugin execution
361b64
361b64
* Fri Feb  6 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 18.0-2
361b64
- Update upstream website URL
361b64
361b64
* Wed Jan  7 2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 18.0-1
361b64
- Update to v. 18 (#1175401)
361b64
- Use %%license
361b64
361b64
* Wed Oct  8 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 17.0-2
361b64
- Add alias for com.google.guava:guava-jdk5
361b64
361b64
* Fri Jun 20 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 17.0-1
361b64
- Add patch for Java 8
361b64
361b64
* Tue Jun 17 2014 Roland Grunberg <rgrunber@redhat.com> - 15.0-4
361b64
- Do not generate uses directive for exports.
361b64
361b64
* Fri Jun 13 2014 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> 17.0-1
361b64
- Update to latest upstream version (#1109442).
361b64
361b64
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.0-3
361b64
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
361b64
361b64
* Tue Mar 04 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 15.0-2
361b64
- Use Requires: java-headless rebuild (#1067528)
361b64
361b64
* Wed Jan  8 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 15.0-1
361b64
- Update to upstream version 15.0
361b64
361b64
* Mon Aug 12 2013 gil cattaneo <puntogil@libero.it> 13.0-6
361b64
- fix rhbz#992456
361b64
- update to current packaging guidelines
361b64
361b64
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 13.0-5
361b64
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
361b64
361b64
* Fri Jun 28 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 13.0-4
361b64
- Replace BR on ant-nodeps with ant
361b64
361b64
* Fri Jun 28 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 13.0-4
361b64
- Rebuild to regenerate API documentation
361b64
- Resolves CVE-2013-1571
361b64
361b64
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 13.0-3
361b64
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
361b64
361b64
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 13.0-2
361b64
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
361b64
- Replace maven BuildRequires with maven-local
361b64
361b64
* Tue Aug  7 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 13.0-1
361b64
- Update to upstream version 13.0
361b64
- Remove RPM bug workaround
361b64
- Convert patches to pom macros
361b64
361b64
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 11.0.2-2
361b64
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
361b64
361b64
* Sat Apr 28 2012 gil cattaneo <puntogil@libero.it> 11.0.2-1
361b64
- Update to 11.0.2
361b64
361b64
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 09-2
361b64
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
361b64
361b64
* Mon Sep 12 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 09-1
361b64
- Update to 09
361b64
- Packaging fixes
361b64
- Build with maven
361b64
361b64
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 05-5
361b64
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
361b64
361b64
* Wed Jul 14 2010 Hui wang <huwang@redhat.com> - 05-4
361b64
- Patch pom
361b64
361b64
* Fri Jun 18 2010 Hui Wang <huwang@redhat.com> - 05-3
361b64
- Fixed jar name in install section
361b64
- Removed spaces in description
361b64
361b64
* Thu Jun 17 2010 Hui Wang <huwang@redhat.com> - 05-2
361b64
- Fixed summary
361b64
- Fixed description
361b64
- Fixed creating symlink insturctions
361b64
- add depmap
361b64
361b64
* Thu Jun 10 2010 Hui Wang <huwang@redhat.com> - 05-1
361b64
- Initial version of the package