2023-03-06 07:02:18 +00:00
|
|
|
|
#
|
|
|
|
|
# spec file for package lz4-java
|
|
|
|
|
#
|
2024-02-21 14:44:15 +00:00
|
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2023-03-06 07:02:18 +00: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 lz4_version 1.9.4
|
|
|
|
|
Name: lz4-java
|
|
|
|
|
Version: 1.8.0
|
|
|
|
|
Release: 0
|
|
|
|
|
Summary: LZ4 compression for Java
|
|
|
|
|
License: Apache-2.0
|
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
|
URL: https://github.com/lz4/%{name}
|
|
|
|
|
Source0: %{url}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
|
|
|
Source1: %{url}/../lz4/archive/refs/tags/v%{lz4_version}.tar.gz#/lz4-%{lz4_version}.tar.gz
|
2023-09-19 11:19:55 +00:00
|
|
|
|
Patch1: 0001-remove-unsafe.patch
|
|
|
|
|
Patch2: 0002-remove-comments-from-templates.patch
|
|
|
|
|
Patch3: 0003-remove-cpptasks.patch
|
|
|
|
|
Patch4: 0004-remove-randomizedtesting-tests.patch
|
2023-10-26 11:01:04 +00:00
|
|
|
|
Patch5: lz4-sourcetarget.patch
|
2023-09-19 11:19:55 +00:00
|
|
|
|
BuildRequires: ant
|
2023-09-13 12:50:51 +00:00
|
|
|
|
BuildRequires: aqute-bnd
|
|
|
|
|
BuildRequires: bsh2
|
2023-03-06 07:02:18 +00:00
|
|
|
|
BuildRequires: ivy-local
|
2023-10-26 11:01:04 +00:00
|
|
|
|
BuildRequires: java-devel >= 1.8
|
2023-09-13 12:50:51 +00:00
|
|
|
|
BuildRequires: mvel2
|
2023-03-06 07:02:18 +00:00
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
LZ4 compression for Java, based on Yann Collet’s work available at
|
|
|
|
|
http://code.google.com/p/lz4/.
|
|
|
|
|
|
|
|
|
|
This library provides access to two compression methods that both generate a
|
|
|
|
|
valid LZ4 stream:
|
|
|
|
|
• fast scan (LZ4):
|
|
|
|
|
- low memory footprint (~ 16 KB),
|
|
|
|
|
- very fast (fast scan with skipping heuristics in case the input looks
|
|
|
|
|
incompressible),
|
|
|
|
|
- reasonable compression ratio (depending on the redundancy of the input).
|
|
|
|
|
• high compression (LZ4 HC):
|
|
|
|
|
- medium memory footprint (~ 256 KB),
|
|
|
|
|
- rather slow (~ 10 times slower than LZ4),
|
|
|
|
|
- good compression ratio (depending on the size and the redundancy of the
|
|
|
|
|
input).
|
|
|
|
|
|
|
|
|
|
The streams produced by those 2 compression algorithms use the same compression
|
|
|
|
|
format, are very fast to decompress and can be decompressed by the same
|
|
|
|
|
decompressor instance.
|
|
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
|
Summary: API documentation for %{name}
|
|
|
|
|
Group: Documentation/HTML
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%description javadoc
|
|
|
|
|
API documentation for %{name}.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q
|
2024-02-21 14:44:15 +00:00
|
|
|
|
%patch -P 1 -p1
|
|
|
|
|
%patch -P 2 -p1
|
|
|
|
|
%patch -P 3 -p1
|
|
|
|
|
%patch -P 4 -p1
|
|
|
|
|
%patch -P 5 -p1
|
2023-03-06 07:02:18 +00:00
|
|
|
|
tar -Csrc/lz4 -xf %{SOURCE1} --strip=1
|
|
|
|
|
rm src/resources/net/jpountz/util/{{linux,win32}/*/*.so,darwin/*/*.dylib}
|
|
|
|
|
|
|
|
|
|
%pom_remove_dep com.carrotsearch.randomizedtesting:junit4-ant
|
|
|
|
|
|
|
|
|
|
%pom_xpath_replace 'info' \
|
2023-09-13 12:50:51 +00:00
|
|
|
|
'<info organisation="org.lz4" module="lz4-java" revision="%{version}"/>'
|
2023-03-06 07:02:18 +00:00
|
|
|
|
|
|
|
|
|
%pom_xpath_replace 'ivy:cachepath[@module="mvel2"]' \
|
2023-09-13 12:50:51 +00:00
|
|
|
|
"<path id='mvel.classpath' path='$(build-classpath mvel2)'/>" build.xml
|
2023-03-06 07:02:18 +00:00
|
|
|
|
%pom_xpath_replace 'ivy:cachepath[@pathid="bnd.classpath"]' \
|
2023-09-13 12:50:51 +00:00
|
|
|
|
"<path id='bnd.classpath' path='$(build-classpath aqute-bnd)'/>" build.xml
|
2023-03-06 07:02:18 +00:00
|
|
|
|
%pom_xpath_replace 'ivy:cachepath[@pathid="bsh.classpath"]' \
|
2023-09-13 12:50:51 +00:00
|
|
|
|
"<path id='bsh.classpath' path='$(build-classpath bsh2)'/>" build.xml
|
|
|
|
|
|
|
|
|
|
for i in lz4-java.bnd lz4-pure-java.bnd; do
|
|
|
|
|
echo "-reproducible: true" >> ${i}
|
|
|
|
|
echo "-noextraheaders: true" >> ${i}
|
|
|
|
|
echo "-snapshot: SNAPSHOT" >> ${i}
|
|
|
|
|
done
|
2023-03-06 07:02:18 +00:00
|
|
|
|
|
|
|
|
|
%{mvn_alias} : net.jpountz.lz4:lz4
|
|
|
|
|
|
|
|
|
|
%{mvn_file} : %{name}
|
|
|
|
|
|
|
|
|
|
%build
|
2024-09-29 06:55:12 +00:00
|
|
|
|
ant
|
2023-03-06 07:02:18 +00:00
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%{mvn_artifact} dist/%{name}-%{version}.pom dist/%{name}-%{version}.jar
|
|
|
|
|
%mvn_install -J build/docs
|
|
|
|
|
|
|
|
|
|
%files -f .mfiles
|
|
|
|
|
%license LICENSE.txt
|
|
|
|
|
%doc {README,CHANGES}.md
|
|
|
|
|
|
|
|
|
|
%files javadoc -f .mfiles-javadoc
|
|
|
|
|
%license LICENSE.txt
|
|
|
|
|
|
|
|
|
|
%changelog
|