Группа :: Разработка/Java
Пакет: guava
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Group: Development/Java
# BEGIN SourceDeps(oneline):
BuildRequires: maven-local
# END SourceDeps(oneline)
AutoReq: yes,noosgi
BuildRequires: rpm-build-java-osgi
BuildRequires: /proc rpm-build-java
BuildRequires: jpackage-11
# fedora bcond_with macro
%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
# redefine altlinux specific with and without
%define with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
%define without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
# see https://bugzilla.altlinux.org/show_bug.cgi?id=10382
%define _localstatedir %{_var}
%bcond_with bootstrap
Name: guava
Version: 31.0.1
Release: alt1_3jpp11
Summary: Google Core Libraries for Java
# Most of the code is under ASL 2.0
# Few classes are under CC0, grep for creativecommons
License: ASL 2.0 and CC0
URL: https://github.com/google/guava
BuildArch: noarch
Source0: https://github.com/google/guava/archive/v%{version}/guava-%{version}.tar.gz
Patch1: 0001-Remove-multi-line-annotations.patch
BuildRequires: maven-local
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
%else
BuildRequires: %{?module_prefix}mvn(com.google.code.findbugs:jsr305)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin)
%endif
Source44: import.info
%description
Guava is a suite of core and expanded libraries that include
utility classes, Googlea.'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.
%{?javadoc_package}
%package testlib
Group: Development/Java
Summary: The guava-testlib artifact
%description testlib
guava-testlib provides additional functionality for conveninent unit testing
%prep
%setup -q
find . -name '*.jar' -delete
%pom_remove_parent guava-bom
%pom_disable_module guava-gwt
%pom_disable_module guava-tests
%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
%pom_remove_plugin -r :animal-sniffer-maven-plugin
# Downloads JDK source for doc generation
%pom_remove_plugin :maven-dependency-plugin guava
%pom_remove_dep :caliper guava-tests
%mvn_package :guava-parent guava
# javadoc generation fails due to strict doclint in JDK 1.8.0_45
%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
%pom_remove_dep -r :error_prone_annotations
%pom_remove_dep -r :j2objc-annotations
%pom_remove_dep -r org.checkerframework:
%pom_remove_dep -r :listenablefuture
annotations=$(
find -name '*.java' \
| xargs fgrep -h \
-e 'import com.google.j2objc.annotations' \
-e 'import com.google.errorprone.annotation' \
-e 'import com.google.errorprone.annotations' \
-e 'import com.google.common.annotations' \
-e 'import org.codehaus.mojo.animal_sniffer' \
-e 'import org.checkerframework' \
| sort -u \
| sed 's/.*\.\([^.]*\);/\1/' \
| paste -sd\|
)
# guava started using quite a few annotation libraries for code quality, which
# we don't have. This ugly regex is supposed to remove their usage from the code
find -name '*.java' | xargs sed -ri \
"s/^import .*\.($annotations);//;s/ at ($annotations)"'\>\s*(\((("[^"]*")|([^)]*))\))?//g'
%patch1 -p1 -b .multiline
%mvn_package "com.google.guava:failureaccess" guava
%mvn_package "com.google.guava:guava-bom" __noinstall
%build
# Tests fail on Koji due to insufficient memory,
# see https://bugzilla.redhat.com/show_bug.cgi?id=1332971
%mvn_build -s -f
#-- -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8 -Dmaven.javadoc.source=1.8 -Dmaven.compiler.release=8
%install
%mvn_install
%files -f .mfiles-guava
%doc CONTRIBUTORS README*
%doc --no-dereference COPYING
%files testlib -f .mfiles-guava-testlib
%changelog
…
Полный changelog можно просмотреть здесь
# BEGIN SourceDeps(oneline):
BuildRequires: maven-local
# END SourceDeps(oneline)
AutoReq: yes,noosgi
BuildRequires: rpm-build-java-osgi
BuildRequires: /proc rpm-build-java
BuildRequires: jpackage-11
# fedora bcond_with macro
%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
# redefine altlinux specific with and without
%define with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
%define without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
# see https://bugzilla.altlinux.org/show_bug.cgi?id=10382
%define _localstatedir %{_var}
%bcond_with bootstrap
Name: guava
Version: 31.0.1
Release: alt1_3jpp11
Summary: Google Core Libraries for Java
# Most of the code is under ASL 2.0
# Few classes are under CC0, grep for creativecommons
License: ASL 2.0 and CC0
URL: https://github.com/google/guava
BuildArch: noarch
Source0: https://github.com/google/guava/archive/v%{version}/guava-%{version}.tar.gz
Patch1: 0001-Remove-multi-line-annotations.patch
BuildRequires: maven-local
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
%else
BuildRequires: %{?module_prefix}mvn(com.google.code.findbugs:jsr305)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin)
%endif
Source44: import.info
%description
Guava is a suite of core and expanded libraries that include
utility classes, Googlea.'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.
%{?javadoc_package}
%package testlib
Group: Development/Java
Summary: The guava-testlib artifact
%description testlib
guava-testlib provides additional functionality for conveninent unit testing
%prep
%setup -q
find . -name '*.jar' -delete
%pom_remove_parent guava-bom
%pom_disable_module guava-gwt
%pom_disable_module guava-tests
%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
%pom_remove_plugin -r :animal-sniffer-maven-plugin
# Downloads JDK source for doc generation
%pom_remove_plugin :maven-dependency-plugin guava
%pom_remove_dep :caliper guava-tests
%mvn_package :guava-parent guava
# javadoc generation fails due to strict doclint in JDK 1.8.0_45
%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
%pom_remove_dep -r :error_prone_annotations
%pom_remove_dep -r :j2objc-annotations
%pom_remove_dep -r org.checkerframework:
%pom_remove_dep -r :listenablefuture
annotations=$(
find -name '*.java' \
| xargs fgrep -h \
-e 'import com.google.j2objc.annotations' \
-e 'import com.google.errorprone.annotation' \
-e 'import com.google.errorprone.annotations' \
-e 'import com.google.common.annotations' \
-e 'import org.codehaus.mojo.animal_sniffer' \
-e 'import org.checkerframework' \
| sort -u \
| sed 's/.*\.\([^.]*\);/\1/' \
| paste -sd\|
)
# guava started using quite a few annotation libraries for code quality, which
# we don't have. This ugly regex is supposed to remove their usage from the code
find -name '*.java' | xargs sed -ri \
"s/^import .*\.($annotations);//;s/ at ($annotations)"'\>\s*(\((("[^"]*")|([^)]*))\))?//g'
%patch1 -p1 -b .multiline
%mvn_package "com.google.guava:failureaccess" guava
%mvn_package "com.google.guava:guava-bom" __noinstall
%build
# Tests fail on Koji due to insufficient memory,
# see https://bugzilla.redhat.com/show_bug.cgi?id=1332971
%mvn_build -s -f
#-- -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8 -Dmaven.javadoc.source=1.8 -Dmaven.compiler.release=8
%install
%mvn_install
%files -f .mfiles-guava
%doc CONTRIBUTORS README*
%doc --no-dereference COPYING
%files testlib -f .mfiles-guava-testlib
%changelog
…
Полный changelog можно просмотреть здесь