04db9b
%global base_name       compress
04db9b
%global short_name      commons-%{base_name}
04db9b
04db9b
Name:           apache-%{short_name}
04db9b
Version:        1.20
04db9b
Release:        3%{?dist}
04db9b
Summary:        Java API for working with compressed files and archivers
04db9b
License:        ASL 2.0
04db9b
URL:            http://commons.apache.org/proper/commons-compress/
04db9b
BuildArch:      noarch
04db9b
04db9b
Source0:        http://archive.apache.org/dist/commons/compress/source/%{short_name}-%{version}-src.tar.gz
04db9b
04db9b
Patch0:         0001-Remove-Brotli-compressor.patch
04db9b
Patch1:         0002-Remove-ZSTD-compressor.patch
04db9b
Patch2:         0003-Avoid-use-of-internal-Mockito-API.patch
04db9b
04db9b
BuildRequires:  maven-local
04db9b
BuildRequires:  mvn(junit:junit)
04db9b
BuildRequires:  mvn(org.apache.commons:commons-parent:pom:)
04db9b
BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
04db9b
BuildRequires:  mvn(org.apache.maven.plugins:maven-antrun-plugin)
04db9b
BuildRequires:  mvn(org.mockito:mockito-core)
04db9b
BuildRequires:  mvn(org.osgi:osgi.core)
04db9b
BuildRequires:  mvn(org.tukaani:xz)
04db9b
04db9b
%description
04db9b
The Apache Commons Compress library defines an API for working with
04db9b
ar, cpio, Unix dump, tar, zip, gzip, XZ, Pack200 and bzip2 files.
04db9b
In version 1.14 read-only support for Brotli decompression has been added,
04db9b
but it has been removed form this package.
04db9b
04db9b
%package javadoc
04db9b
Summary:        API documentation for %{name}
04db9b
04db9b
%description javadoc
04db9b
This package provides %{summary}.
04db9b
04db9b
%prep
04db9b
%setup -q -n %{short_name}-%{version}-src
04db9b
04db9b
# Unavailable Google Brotli library (org.brotli.dec)
04db9b
%patch0 -p1
04db9b
%pom_remove_dep org.brotli:dec
04db9b
rm -r src/{main,test}/java/org/apache/commons/compress/compressors/brotli
04db9b
04db9b
# Unavailable ZSTD JNI library
04db9b
%patch1 -p1
04db9b
%pom_remove_dep :zstd-jni
04db9b
rm -r src/{main,test}/java/org/apache/commons/compress/compressors/zstandard
04db9b
rm src/test/java/org/apache/commons/compress/compressors/DetectCompressorTestCase.java
04db9b
04db9b
# Avoid using internal Mockito APIs
04db9b
%patch2 -p1
04db9b
04db9b
# remove osgi tests, we don't have deps for them
04db9b
%pom_remove_dep org.ops4j.pax.exam:::test
04db9b
%pom_remove_dep :org.apache.felix.framework::test
04db9b
%pom_remove_dep :javax.inject::test
04db9b
%pom_remove_dep :slf4j-api::test
04db9b
rm src/test/java/org/apache/commons/compress/OsgiITest.java
04db9b
04db9b
# use osgi-core instead of felix-osgi-core
04db9b
%pom_change_dep :org.osgi.core org.osgi:osgi.core
04db9b
04db9b
# Remove test that requires powermock
04db9b
%pom_remove_dep org.powermock:
04db9b
%pom_add_dep org.mockito:mockito-core::test
04db9b
rm src/test/java/org/apache/commons/compress/compressors/z/ZCompressorInputStreamTest.java
04db9b
04db9b
# Generate Java 8 level bytecode when built on Java 11
04db9b
%pom_xpath_replace "pom:maven.compiler.release" "<maven.compiler.release>8</maven.compiler.release>"
04db9b
04db9b
%build
04db9b
%mvn_file  : %{short_name} %{name}
04db9b
%mvn_alias : commons:
04db9b
%mvn_build -- -Dcommons.osgi.symbolicName=org.apache.commons.compress
04db9b
04db9b
%install
04db9b
%mvn_install
04db9b
04db9b
%files -f .mfiles
04db9b
%doc LICENSE.txt NOTICE.txt
04db9b
04db9b
%files javadoc -f .mfiles-javadoc
04db9b
%doc LICENSE.txt NOTICE.txt
04db9b
04db9b
%changelog
04db9b
* Thu Jul 16 2020 Mat Booth <mat.booth@redhat.com> - 1.20-3
04db9b
- Ensure Java 8 level bytecode when built on Java 11
04db9b
04db9b
* Fri Jul 10 2020 Jiri Vanek <jvanek@redhat.com> - 1.20-2
04db9b
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
04db9b
04db9b
* Mon Mar 02 2020 Fabio Valentini <decathorpe@gmail.com> - 1.20-1
04db9b
- Update to version 1.20.
04db9b
04db9b
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.19-2
04db9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
04db9b
04db9b
* Fri Oct 04 2019 Fabio Valentini <decathorpe@gmail.com> - 1.19-1
04db9b
- Update to version 1.19.
04db9b
04db9b
* Wed Sep 18 2019 Fabio Valentini <decathorpe@gmail.com> - 1.18-7
04db9b
- Migrate from the obsolete felix-osgi-core to osgi-core.
04db9b
04db9b
* Wed Aug 14 2019 Fabio Valentini <decathorpe@gmail.com> - 1.18-6
04db9b
- Remove build-dependency on powermock
04db9b
04db9b
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.18-5
04db9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
04db9b
04db9b
* Thu Feb 14 2019 Mat Booth <mat.booth@redhat.com> - 1.18-4
04db9b
- Rebuild to regenerate OSGi metadata
04db9b
04db9b
* Thu Feb 07 2019 Mat Booth <mat.booth@redhat.com> - 1.18-3
04db9b
- Fix test suite build against Mockito 2.x
04db9b
04db9b
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.18-2
04db9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
04db9b
04db9b
* Fri Oct 05 2018 Marian Koncek <mkoncek@redhat.com> - 1.18-1
04db9b
- Update to upstream version 1.18
04db9b
- CVE-2018-11771
04db9b
04db9b
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.17-2
04db9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
04db9b
04db9b
* Tue Jun 05 2018 Michael Simacek <msimacek@redhat.com> - 1.17-1
04db9b
- Update to upstream version 1.17
04db9b
04db9b
* Mon Feb 12 2018 Michael Simacek <msimacek@redhat.com> - 1.16.1-1
04db9b
- Update to upstream version 1.16.1
04db9b
04db9b
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.15-2
04db9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
04db9b
04db9b
* Sun Oct 22 2017 Michael Simacek <msimacek@redhat.com> - 1.15-1
04db9b
- Update to upstream version 1.15
04db9b
04db9b
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.14-2
04db9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
04db9b
04db9b
* Wed Jun 14 2017 Roman Vais <rvais@redhat.com> - 1.14-1
04db9b
- Update to upstream version 1.14
04db9b
- Remove Brotli support, it is not packaged for fedora 
04db9b
04db9b
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.13-2
04db9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
04db9b
04db9b
* Mon Jan 02 2017 Michael Simacek <msimacek@redhat.com> - 1.13-1
04db9b
- Update to upstream version 1.13
04db9b
04db9b
* Wed Jun 22 2016 Michael Simacek <msimacek@redhat.com> - 1.12-1
04db9b
- Update to upstream version 1.12
04db9b
04db9b
* Mon May 02 2016 Michael Simacek <msimacek@redhat.com> - 1.11-1
04db9b
- Update to upstream version 1.11
04db9b
04db9b
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.10-0.3.svn1684406
04db9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
04db9b
04db9b
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10-0.2.svn1684406
04db9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
04db9b
04db9b
* Tue Jun  9 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.10-0.1.svn1684406
04db9b
- Update to latest upstream snapshot
04db9b
04db9b
* Tue Oct 14 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.9-2
04db9b
- Remove legacy Obsoletes/Provides for jakarta-commons
04db9b
04db9b
* Mon Oct 13 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.9-1
04db9b
- Update to upstream version 1.9
04db9b
04db9b
* Wed Jul 30 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.8.1-3
04db9b
- Fix build-requires on apache-commons-parent
04db9b
04db9b
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.1-2
04db9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
04db9b
04db9b
* Fri May 23 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.8.1-1
04db9b
- Update to upstream version 1.8.1
04db9b
04db9b
* Mon Mar 17 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.8-2
04db9b
- Remove dependency on maven-scm-publish-plugin
04db9b
04db9b
* Fri Mar 14 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.8-1
04db9b
- Update to upstream version 1.8
04db9b
04db9b
* Tue Mar 04 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.7-2
04db9b
- Use Requires: java-headless rebuild (#1067528)
04db9b
04db9b
* Mon Jan 20 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.7-1
04db9b
- Update to upstream version 1.7
04db9b
04db9b
* Tue Oct 29 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.6-1
04db9b
- Update to upstream version 1.6
04db9b
04db9b
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5-2
04db9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
04db9b
04db9b
* Thu Mar 14 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5-1
04db9b
- Update to upstream version 1.5
04db9b
04db9b
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.1-6
04db9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
04db9b
04db9b
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 1.4.1-5
04db9b
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
04db9b
- Replace maven BuildRequires with maven-local
04db9b
04db9b
* Wed Jan  9 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.4.1-4
04db9b
- Bump release tag
04db9b
04db9b
* Tue Jan  8 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.4.1-3
04db9b
- Build with xmvn
04db9b
- Update to current packaging guidelines
04db9b
04db9b
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.1-2
04db9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
04db9b
04db9b
* Thu May 24 2012 Sandro Mathys <red at fedoraproject.org> - 1.4.1-1
04db9b
- Updated to 1.4.1
04db9b
- Fixes CVE-2012-2098 Low: Denial of Service
04db9b
04db9b
* Fri Apr 27 2012 Sandro Mathys <red at fedoraproject.org> - 1.4-1
04db9b
- Updated to 1.4
04db9b
04db9b
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-2
04db9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
04db9b
04db9b
* Tue Nov 01 2011 Sandro Mathys <red at fedoraproject.org> - 1.3-1
04db9b
- Updated to 1.3
04db9b
04db9b
* Thu Aug 04 2011 Sandro Mathys <red at fedoraproject.org> - 1.2-2
04db9b
- Fixing mistake where different versions of the spec file got mixed up
04db9b
04db9b
* Thu Aug 04 2011 Sandro Mathys <red at fedoraproject.org> - 1.2-1
04db9b
- Updated to 1.2
04db9b
04db9b
* Sat Apr 16 2011 Chris Spike <spike@fedoraproject.org> 1.1-1
04db9b
- Updated to 1.1
04db9b
- Adapted to current java packaging guidelines
04db9b
04db9b
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-9
04db9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
04db9b
04db9b
* Sun Jul 11 2010 Sandro Mathys <red at fedoraproject.org> - 1.0-8
04db9b
- Fixed the Maven depmap line by replacing org.apache.maven by org.apache.commons
04db9b
04db9b
* Mon May 31 2010 Sandro Mathys <red at fedoraproject.org> - 1.0-7
04db9b
- Fixed regression with missing Provides/Obsoletes for javadocs
04db9b
- Fixed changelog format
04db9b
04db9b
* Sun May 23 2010 Sandro Mathys <red at fedoraproject.org> - 1.0-6
04db9b
- Fixed Maven depmap to use commons-compress
04db9b
04db9b
* Thu May 13 2010 Sandro Mathys <red at fedoraproject.org> - 1.0-5
04db9b
- Added missing Provides/Obsoletes for javadocs 
04db9b
04db9b
* Mon May 10 2010 Sandro Mathys <red at fedoraproject.org> - 1.0-4
04db9b
- Cleared some problems after the review
04db9b
04db9b
* Thu May 06 2010 Sandro Mathys <red at fedoraproject.org> - 1.0-3
04db9b
- Now using maven2 (mvn-jpp) instead of directly calling javac & co
04db9b
04db9b
* Tue May 04 2010 Sandro Mathys <red at fedoraproject.org> - 1.0-2
04db9b
- Renamed from jakarta-commons-compress