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