guava/guava.spec

115 lines
3.4 KiB
RPMSpec
Raw Normal View History

2020-03-09 10:16:47 +08:00
Name: guava
2023-09-27 16:59:01 +08:00
Version: 31.1
Release: 1
2020-03-09 10:16:47 +08:00
Summary: Google Core Libraries for Java
License: ASL 2.0 and CC0
URL: https://github.com/google/guava
BuildArch: noarch
2023-09-27 16:59:01 +08:00
Source0: https://github.com/google/guava/archive/v%{version}/guava-%{version}.tar.gz
Source1: java_remove_symbols.lua
Source2: java_symbols_lib.lua
2023-07-04 20:07:28 +08:00
Patch0001: CVE-2023-2976-pre.patch
Patch0002: CVE-2023-2976.patch
2020-03-09 10:16:47 +08:00
BuildRequires: maven-local mvn(com.google.code.findbugs:jsr305) mvn(junit:junit)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) mvn(org.sonatype.oss:oss-parent:pom:)
2023-09-27 16:59:01 +08:00
BuildRequires: java-17-openjdk-devel
Requires: java-17-openjdk
2020-03-09 10:16:47 +08:00
%description
Guava is a set of core Java libraries from Google that includes new collection
types (such as multimap and multiset), immutable collections, a graph library,
and utilities for concurrency, I/O, hashing, caching, primitives, strings,
and more! It is widely used on most Java projects within Google, and widely
used by many other companies as well.
%package help
Summary: javadoc for guava
Provides: %{name}-javadoc = %{version}-%{release}
Obsoletes: %{name}-javadoc < %{version}-%{release}
%description help
API documentation for guava
%package testlib
Summary: The guava-testlib artifact
%description testlib
To facilitate unit testing, guava-testlib provides additional features
%prep
%autosetup -p1 -n %{name}-%{version}
find . -name '*.jar' -delete
2023-09-27 16:59:01 +08:00
%pom_remove_parent guava-bom
2020-03-09 10:16:47 +08:00
%pom_disable_module guava-gwt
%pom_disable_module guava-tests
2023-09-27 16:59:01 +08:00
%pom_xpath_inject pom:modules "<module>futures/failureaccess</module>"
%pom_xpath_inject pom:parent "<relativePath>../..</relativePath>" futures/failureaccess
%pom_xpath_set pom:parent/pom:version %{version}-jre futures/failureaccess
2020-03-09 10:16:47 +08:00
%pom_remove_plugin -r :animal-sniffer-maven-plugin
%pom_remove_plugin :maven-dependency-plugin guava
%pom_remove_dep :caliper guava-tests
%mvn_package :guava-parent guava
%pom_remove_plugin -r :maven-javadoc-plugin
%pom_xpath_inject /pom:project/pom:build/pom:plugins/pom:plugin/pom:configuration/pom:instructions "<_nouses>true</_nouses>" guava/pom.xml
2023-09-27 16:59:01 +08:00
2020-03-09 10:16:47 +08:00
%pom_remove_dep -r :error_prone_annotations
%pom_remove_dep -r :j2objc-annotations
%pom_remove_dep -r org.checkerframework:
2023-09-27 16:59:01 +08:00
%pom_remove_dep -r :listenablefuture
2020-03-09 10:16:47 +08:00
2023-09-27 16:59:01 +08:00
export LUA_PATH=%{SOURCE2}
/usr/bin/lua %{SOURCE1} -a guava guava-testlib -p org[.]checkerframework[.]
/usr/bin/lua %{SOURCE1} -a guava guava-testlib -p com[.]google[.]common[.]annotations[.]
/usr/bin/lua %{SOURCE1} -a guava guava-testlib -p com[.]google[.]errorprone[.]annotations[.]
/usr/bin/lua %{SOURCE1} -a guava guava-testlib -p com[.]google[.]j2objc[.]annotations[.]
%mvn_package "com.google.guava:failureaccess" guava
%mvn_package "com.google.guava:guava-bom" __noinstall
2020-03-09 10:16:47 +08:00
%build
2023-09-27 16:59:01 +08:00
export JAVA_HOME=%{_jvmdir}/java-17-openjdk
export CFLAGS="${RPM_OPT_FLAGS}"
export CXXFLAGS="${RPM_OPT_FLAGS}"
2020-03-09 10:16:47 +08:00
%mvn_build -s -f
%install
%mvn_install
%files -f .mfiles-guava
%doc CONTRIBUTORS README*
%license COPYING
%files help -f .mfiles-javadoc
%license COPYING
%files testlib -f .mfiles-guava-testlib
%changelog
2023-09-27 16:59:01 +08:00
* Wed Sep 27 2023 chenchen <chen_aka_jan@163.com> - 31.1-1
- Upgrade to version 31.1
2023-07-04 20:07:28 +08:00
* Tue Jul 04 2023 wangkai <13474090681@163.com> - 25.0-6
- Fix CVE-2023-2976
2021-02-19 18:16:18 +08:00
* Fri Feb 19 2021 wangxiao <wangxiao65@huawei.com> - 25.0-5
- Fix CVE-2020-8908
2020-03-09 10:16:47 +08:00
* Fri Mar 6 2020 dingyiming <dingyiming3@huawei.com> - 25.0-4
- Package init