Merge modular branch

This commit is contained in:
Mikolaj Izdebski 2021-05-13 16:53:47 +02:00
commit aa724b4b88

View File

@ -1,28 +1,31 @@
%global base_name compress
%global short_name commons-%{base_name}
%bcond_without bootstrap
Name: apache-%{short_name}
Name: apache-commons-compress
Version: 1.20
Release: 5%{?dist}
Summary: Java API for working with compressed files and archivers
License: ASL 2.0
URL: http://commons.apache.org/proper/commons-compress/
URL: https://commons.apache.org/proper/commons-compress/
BuildArch: noarch
Source0: http://archive.apache.org/dist/commons/compress/source/%{short_name}-%{version}-src.tar.gz
Source0: https://archive.apache.org/dist/commons/compress/source/commons-compress-%{version}-src.tar.gz
Patch0: 0001-Remove-Brotli-compressor.patch
Patch1: 0002-Remove-ZSTD-compressor.patch
Patch2: 0003-Avoid-use-of-internal-Mockito-API.patch
BuildRequires: maven-local
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
%else
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.commons:commons-parent:pom:)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
BuildRequires: mvn(org.mockito:mockito-core)
BuildRequires: mvn(org.osgi:osgi.core)
BuildRequires: mvn(org.osgi:org.osgi.core)
BuildRequires: mvn(org.tukaani:xz)
%endif
%description
The Apache Commons Compress library defines an API for working with
@ -37,7 +40,7 @@ Summary: API documentation for %{name}
This package provides %{summary}.
%prep
%setup -q -n %{short_name}-%{version}-src
%setup -q -n commons-compress-%{version}-src
# Unavailable Google Brotli library (org.brotli.dec)
%patch0 -p1
@ -60,19 +63,13 @@ rm src/test/java/org/apache/commons/compress/compressors/DetectCompressorTestCas
%pom_remove_dep :slf4j-api::test
rm src/test/java/org/apache/commons/compress/OsgiITest.java
# use osgi-core instead of felix-osgi-core
%pom_change_dep :org.osgi.core org.osgi:osgi.core
# Remove test that requires powermock
%pom_remove_dep org.powermock:
%pom_add_dep org.mockito:mockito-core::test
rm src/test/java/org/apache/commons/compress/compressors/z/ZCompressorInputStreamTest.java
# Generate Java 8 level bytecode when built on Java 11
%pom_xpath_replace "pom:maven.compiler.release" "<maven.compiler.release>8</maven.compiler.release>"
%build
%mvn_file : %{short_name} %{name}
%mvn_file : commons-compress %{name}
%mvn_alias : commons:
%mvn_build -- -Dcommons.osgi.symbolicName=org.apache.commons.compress
@ -98,24 +95,39 @@ rm src/test/java/org/apache/commons/compress/compressors/z/ZCompressorInputStrea
* Fri Jul 10 2020 Jiri Vanek <jvanek@redhat.com> - 1.20-2
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
* Wed Mar 04 2020 Marian Koncek <mkoncek@redhat.com> - 1.20-1
- Update to upstream version 1.20
* Mon Mar 02 2020 Fabio Valentini <decathorpe@gmail.com> - 1.20-1
- Update to version 1.20.
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.19-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.19-2
- Mass rebuild for javapackages-tools 201902
* Fri Oct 04 2019 Fabio Valentini <decathorpe@gmail.com> - 1.19-1
- Update to version 1.19.
* Wed Sep 18 2019 Fabio Valentini <decathorpe@gmail.com> - 1.18-7
- Migrate from the obsolete felix-osgi-core to osgi-core.
* Mon Sep 02 2019 Marian Koncek <mkoncek@redhat.com> - 1.19-1
- Update to upstream version 1.19
* Wed Aug 14 2019 Fabio Valentini <decathorpe@gmail.com> - 1.18-6
- Remove build-dependency on powermock
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.18-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.18-6
- Mass rebuild for javapackages-tools 201901
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.18-5
- Remove build-dependency on powermock
* Thu Feb 14 2019 Mat Booth <mat.booth@redhat.com> - 1.18-4
- Rebuild to regenerate OSGi metadata