2019-01-25 10:18:16 +01:00
|
|
|
#
|
2024-02-19 13:41:04 +01:00
|
|
|
# spec file for package apache-commons-compress
|
2019-01-25 10:18:16 +01:00
|
|
|
#
|
2024-02-19 13:41:04 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2019-01-25 10:18:16 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%global base_name compress
|
|
|
|
%global short_name commons-%{base_name}
|
|
|
|
Name: apache-%{short_name}
|
2024-05-14 12:50:02 +02:00
|
|
|
Version: 1.26.1
|
2019-01-25 10:18:16 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Java API for working with compressed files and archivers
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Libraries/Java
|
2021-07-19 16:56:41 +02:00
|
|
|
URL: https://commons.apache.org/proper/commons-compress/
|
2024-02-19 13:41:04 +01:00
|
|
|
Source0: https://archive.apache.org/dist/commons/compress/source/%{short_name}-%{version}-src.tar.gz
|
2024-02-19 13:41:52 +01:00
|
|
|
Source1: %{name}-build.xml
|
2019-01-25 10:18:16 +01:00
|
|
|
Patch0: 0001-Remove-Brotli-compressor.patch
|
|
|
|
Patch1: 0002-Remove-ZSTD-compressor.patch
|
2022-03-21 10:03:11 +01:00
|
|
|
Patch2: 0003-Remove-Pack200-compressor.patch
|
2019-01-25 10:18:16 +01:00
|
|
|
BuildRequires: ant
|
2024-02-19 13:41:04 +01:00
|
|
|
BuildRequires: commons-codec
|
2024-02-19 15:22:49 +01:00
|
|
|
BuildRequires: commons-io >= 2.14
|
2024-05-14 15:27:15 +02:00
|
|
|
BuildRequires: commons-lang3
|
2019-01-25 10:18:16 +01:00
|
|
|
BuildRequires: fdupes
|
2021-07-19 16:56:41 +02:00
|
|
|
BuildRequires: java-devel >= 1.8
|
2024-02-19 13:41:04 +01:00
|
|
|
BuildRequires: javapackages-local >= 6
|
2019-01-25 10:18:16 +01:00
|
|
|
BuildRequires: xz-java
|
|
|
|
Provides: %{short_name} = %{version}-%{release}
|
|
|
|
Obsoletes: %{short_name} < %{version}-%{release}
|
|
|
|
Provides: jakarta-%{short_name} = %{version}-%{release}
|
|
|
|
Obsoletes: jakarta-%{short_name} < %{version}-%{release}
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description
|
|
|
|
The Apache Commons Compress library defines an API for working with
|
|
|
|
ar, cpio, Unix dump, tar, zip, gzip, XZ, Pack200 and bzip2 files.
|
|
|
|
In version 1.14 read-only support for Brotli decompression has been added,
|
2021-07-19 17:02:32 +02:00
|
|
|
but it has been removed from this package.
|
2019-01-25 10:18:16 +01:00
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: API documentation for %{name}
|
2019-01-27 20:59:10 +01:00
|
|
|
Group: Documentation/HTML
|
2019-01-25 10:18:16 +01:00
|
|
|
|
|
|
|
%description javadoc
|
|
|
|
This package provides %{summary}.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{short_name}-%{version}-src
|
2024-02-19 13:41:52 +01:00
|
|
|
cp %{SOURCE1} build.xml
|
2019-01-25 10:18:16 +01:00
|
|
|
|
|
|
|
# Unavailable Google Brotli library (org.brotli.dec)
|
2024-02-20 12:52:10 +01:00
|
|
|
%patch -P 0 -p1
|
2019-01-25 10:18:16 +01:00
|
|
|
%pom_remove_dep org.brotli:dec
|
|
|
|
rm -r src/{main,test}/java/org/apache/commons/compress/compressors/brotli
|
|
|
|
|
|
|
|
# Unavailable ZSTD JNI library
|
2024-02-20 12:52:10 +01:00
|
|
|
%patch -P 1 -p1
|
2019-01-25 10:18:16 +01:00
|
|
|
%pom_remove_dep :zstd-jni
|
|
|
|
rm -r src/{main,test}/java/org/apache/commons/compress/compressors/zstandard
|
|
|
|
|
2022-03-21 10:03:11 +01:00
|
|
|
# Remove support for pack200 which depends on ancient asm:asm:3.2
|
2024-02-20 12:52:10 +01:00
|
|
|
%patch -P 2 -p1
|
2022-03-21 10:03:11 +01:00
|
|
|
rm -r src/{main,test}/java/org/apache/commons/compress/harmony
|
|
|
|
rm -r src/main/java/org/apache/commons/compress/compressors/pack200
|
|
|
|
rm src/main/java/org/apache/commons/compress/java/util/jar/Pack200.java
|
|
|
|
rm -r src/test/java/org/apache/commons/compress/compressors/pack200
|
|
|
|
rm src/test/java/org/apache/commons/compress/java/util/jar/Pack200Test.java
|
|
|
|
|
2019-01-25 10:18:16 +01:00
|
|
|
# NPE with jdk10
|
|
|
|
%pom_remove_plugin :maven-javadoc-plugin
|
|
|
|
|
|
|
|
%pom_xpath_remove "pom:profiles/pom:profile[pom:id[text()='java9+']]"
|
|
|
|
|
|
|
|
%build
|
|
|
|
mkdir -p lib
|
2024-05-14 15:27:15 +02:00
|
|
|
build-jar-repository -s lib xz-java commons-io commons-codec commons-lang3
|
2019-01-25 10:18:16 +01:00
|
|
|
%{ant} package javadoc
|
|
|
|
|
|
|
|
%install
|
|
|
|
# jar
|
|
|
|
install -dm 0755 %{buildroot}%{_javadir}
|
|
|
|
install -pm 0644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{short_name}.jar
|
|
|
|
ln -sf %{short_name}.jar %{buildroot}%{_javadir}/%{name}.jar
|
|
|
|
# pom
|
|
|
|
install -dm 0755 %{buildroot}%{_mavenpomdir}
|
2024-02-19 13:41:04 +01:00
|
|
|
%{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/%{short_name}.pom
|
2019-01-25 10:18:16 +01:00
|
|
|
%add_maven_depmap %{short_name}.pom %{short_name}.jar -a commons:commons-compress,commons-compress:commons-compress
|
|
|
|
# javadoc
|
|
|
|
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
%fdupes -s %{buildroot}%{_javadocdir}
|
|
|
|
|
|
|
|
%files -f .mfiles
|
|
|
|
%{_javadir}/%{name}.jar
|
|
|
|
%license LICENSE.txt
|
|
|
|
%doc NOTICE.txt
|
|
|
|
|
|
|
|
%files javadoc
|
|
|
|
%{_javadocdir}/%{name}
|
|
|
|
%license LICENSE.txt
|
|
|
|
%doc NOTICE.txt
|
|
|
|
|
|
|
|
%changelog
|