|
|
e63c38 |
%{?scl:%scl_package lz4-java}
|
|
|
e63c38 |
%{!?scl:%global pkg_name %{name}}
|
|
|
e63c38 |
|
|
|
e63c38 |
# empty debuginfo
|
|
|
e63c38 |
%global debug_package %nil
|
|
|
e63c38 |
%global lz4_version 1.9.2
|
|
|
e63c38 |
|
|
|
e63c38 |
Name: %{scl_prefix}lz4-java
|
|
|
e63c38 |
Version: 1.7.1
|
|
|
e63c38 |
Release: 18%{?dist}
|
|
|
e63c38 |
Summary: LZ4 compression for Java
|
|
|
e63c38 |
# GPL:
|
|
|
e63c38 |
# src/lz4/
|
|
|
e63c38 |
# BSD:
|
|
|
e63c38 |
# src/lz4/libs
|
|
|
e63c38 |
License: ASL 2.0 and (BSD and GPLv2+)
|
|
|
e63c38 |
# GPLv2+ and BSD for lz4 and xxhash libs that are shared in liblz4-java.so
|
|
|
e63c38 |
URL: https://github.com/lz4/lz4-java
|
|
|
e63c38 |
Source0: https://github.com/lz4/lz4-java/archive/%{version}.tar.gz
|
|
|
e63c38 |
Source1: https://github.com/lz4/lz4/archive/v%{lz4_version}.tar.gz
|
|
|
e63c38 |
|
|
|
e63c38 |
# lz4-java v1.3.0 introduced usage of sun.misc.Unsafe, which would later become
|
|
|
e63c38 |
# depricated in jdk 9 and kept as an unexposed API in later jdk releases.
|
|
|
e63c38 |
# lz4-java optionally uses Unsafe to achieve faster compression and decompression,
|
|
|
e63c38 |
# however it's implementation is not critical to functionality, and can be removed.
|
|
|
e63c38 |
Patch0: 0-remove-unsafe.patch
|
|
|
e63c38 |
# After updating mvel to version 2.4.10, MVEL generated classes have formatting issues where
|
|
|
e63c38 |
# code after comments are not being formatted with new lines. As a result, including comments
|
|
|
e63c38 |
# in the templates results in classes with invalid code following the first comment.
|
|
|
e63c38 |
# This patch simply removes comments from the templates so the classes can be generated as expected.
|
|
|
e63c38 |
# Related bug: https://github.com/mvel/mvel/issues/152
|
|
|
e63c38 |
Patch1: 1-remove-comments-from-templates.patch
|
|
|
e63c38 |
# Adds a simple makefile to be run in-place of the cpptasks in the build.xml
|
|
|
e63c38 |
Patch2: 2-remove-cpptasks.patch
|
|
|
e63c38 |
# some lz4-java tests require randomizedtesting, which is not currently
|
|
|
e63c38 |
# shipped or maintained in Fedora; remove those and use system ant-junit to run applicable tests
|
|
|
e63c38 |
Patch3: 3-remove-randomizedtesting-tests.patch
|
|
|
e63c38 |
# RHSCL: condition doesn't support the nested "javaversion" element
|
|
|
e63c38 |
Patch4: 4-remove-javaversion.patch
|
|
|
e63c38 |
# RHSCL: build missing lz4 and xxhash libs required for liblz4-java.so
|
|
|
e63c38 |
Patch5: 5-build-libs.patch
|
|
|
e63c38 |
|
|
|
e63c38 |
# Build tools
|
|
|
e63c38 |
BuildRequires: %{?scl_prefix_maven}apache-ivy
|
|
|
e63c38 |
BuildRequires: %{?scl_prefix_maven}apache-parent
|
|
|
e63c38 |
BuildRequires: %{?scl_prefix_maven}ant
|
|
|
e63c38 |
BuildRequires: %{?scl_prefix_maven}ant-junit
|
|
|
e63c38 |
BuildRequires: %{?scl_prefix_maven}junit
|
|
|
e63c38 |
BuildRequires: %{?scl_prefix_maven}aqute-bnd
|
|
|
e63c38 |
BuildRequires: %{?scl_prefix_maven}ivy-local
|
|
|
e63c38 |
BuildRequires: %{?scl_prefix_maven}objectweb-asm
|
|
|
e63c38 |
BuildRequires: %{?scl_prefix_maven}xerces-j2
|
|
|
e63c38 |
|
|
|
e63c38 |
BuildRequires: %{?scl_prefix_jmc}mvel
|
|
|
e63c38 |
|
|
|
e63c38 |
BuildRequires: gcc
|
|
|
e63c38 |
BuildRequires: java-devel
|
|
|
e63c38 |
BuildRequires: javapackages-tools
|
|
|
e63c38 |
BuildRequires: lz4
|
|
|
e63c38 |
|
|
|
e63c38 |
Provides: bundled(xxhash) = r37
|
|
|
e63c38 |
Provides: bundled(lz4) = 1.9.2
|
|
|
e63c38 |
|
|
|
e63c38 |
%description
|
|
|
e63c38 |
LZ4 compression for Java, based on Yann Collet's work.
|
|
|
e63c38 |
This library provides access to two compression methods
|
|
|
e63c38 |
that both generate a valid LZ4 stream:
|
|
|
e63c38 |
|
|
|
e63c38 |
* fast scan (LZ4):
|
|
|
e63c38 |
° low memory footprint (~ 16 KB),
|
|
|
e63c38 |
° very fast (fast scan with skipping heuristics in case the
|
|
|
e63c38 |
input looks incompressible),
|
|
|
e63c38 |
° reasonable compression ratio (depending on the
|
|
|
e63c38 |
redundancy of the input).
|
|
|
e63c38 |
* high compression (LZ4 HC):
|
|
|
e63c38 |
° medium memory footprint (~ 256 KB),
|
|
|
e63c38 |
° rather slow (~ 10 times slower than LZ4),
|
|
|
e63c38 |
° good compression ratio (depending on the size and
|
|
|
e63c38 |
the redundancy of the input).
|
|
|
e63c38 |
|
|
|
e63c38 |
The streams produced by those 2 compression algorithms use the
|
|
|
e63c38 |
same compression format, are very fast to decompress and can be
|
|
|
e63c38 |
decompressed by the same decompressor instance.
|
|
|
e63c38 |
|
|
|
e63c38 |
%package javadoc
|
|
|
e63c38 |
Summary: Javadoc for %{pkg_name}
|
|
|
e63c38 |
BuildArch: noarch
|
|
|
e63c38 |
|
|
|
e63c38 |
%description javadoc
|
|
|
e63c38 |
This package contains javadoc for %{pkg_name}.
|
|
|
e63c38 |
|
|
|
e63c38 |
%prep
|
|
|
e63c38 |
%setup -q -n %{pkg_name}-%{version}
|
|
|
e63c38 |
%setup -q -T -D -a 1 -n %{pkg_name}-%{version}
|
|
|
e63c38 |
|
|
|
e63c38 |
mv lz4-1.9.2/* src/lz4/
|
|
|
e63c38 |
|
|
|
e63c38 |
%patch0 -p1
|
|
|
e63c38 |
%patch1 -p1
|
|
|
e63c38 |
%patch2 -p1
|
|
|
e63c38 |
%patch3 -p1
|
|
|
e63c38 |
%patch4 -p1
|
|
|
e63c38 |
%patch5 -p1
|
|
|
e63c38 |
|
|
|
e63c38 |
# Cleanup
|
|
|
e63c38 |
find -name '*.dylib' -print -delete
|
|
|
e63c38 |
find -name '*.so' -print -delete
|
|
|
e63c38 |
|
|
|
e63c38 |
cp -p src/lz4/LICENSE lz4_LICENSE
|
|
|
e63c38 |
cp -p src/lz4/lib/LICENSE lz4_lib_LICENSE
|
|
|
e63c38 |
|
|
|
e63c38 |
%build
|
|
|
e63c38 |
%{?scl:scl enable %{scl_maven} %{scl} - << "EOFSCL"}
|
|
|
e63c38 |
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
|
|
|
e63c38 |
|
|
|
e63c38 |
ant -Divy.mode=local -Divy.revision=1.7.1 -Divy.pom.version=1.7.1 jar test docs makepom
|
|
|
e63c38 |
bnd wrap -p lz4-java.bnd -o dist/lz4-java-%{version}.jar --version %{version} dist/lz4-java.jar
|
|
|
e63c38 |
%{?scl:EOFSCL}
|
|
|
e63c38 |
|
|
|
e63c38 |
%install
|
|
|
e63c38 |
%{?scl:scl enable %{scl_maven} %{scl} - << "EOFSCL"}
|
|
|
e63c38 |
%mvn_artifact dist/lz4-java-%{version}.pom dist/lz4-java-%{version}.jar
|
|
|
e63c38 |
%mvn_install -J build/docs
|
|
|
e63c38 |
%{?scl:EOFSCL}
|
|
|
e63c38 |
|
|
|
e63c38 |
%files -f .mfiles
|
|
|
e63c38 |
%doc CHANGES.md README.md
|
|
|
e63c38 |
|
|
|
e63c38 |
%files javadoc -f .mfiles-javadoc
|
|
|
e63c38 |
%license LICENSE.txt
|
|
|
e63c38 |
|
|
|
e63c38 |
%changelog
|
|
|
e63c38 |
* Thu Jan 28 2021 Alex Macdonald <almacdon@redhat.com> 1.7.1-18
|
|
|
e63c38 |
- add missing dependency on ivy-local
|
|
|
e63c38 |
|
|
|
e63c38 |
* Thu Jan 28 2021 Alex Macdonald <almacdon@redhat.com> 1.7.1-17
|
|
|
e63c38 |
- fix setup macro for unpacking lz4 sources
|
|
|
e63c38 |
|
|
|
e63c38 |
* Wed Jan 27 2021 Alex Macdonald <almacdon@redhat.com> 1.7.1-16
|
|
|
e63c38 |
- remove name from setup macro in favour of source number
|
|
|
e63c38 |
- add br on junit
|
|
|
e63c38 |
|
|
|
e63c38 |
* Wed Jan 27 2021 Alex Macdonald <almacdon@redhat.com> 1.7.1-15
|
|
|
e63c38 |
- fix package name macro for setup
|
|
|
e63c38 |
|
|
|
e63c38 |
* Wed Jan 27 2021 Alex Macdonald <almacdon@redhat.com> 1.7.1-14
|
|
|
e63c38 |
- enable maven scl for build and install
|
|
|
e63c38 |
|
|
|
e63c38 |
* Wed Jan 27 2021 Alex Macdonald <almacdon@redhat.com> 1.7.1-13
|
|
|
e63c38 |
- SCL-ize package
|
|
|
e63c38 |
- Bundle missing xxhash and lz4 components & adjust local Makefile
|
|
|
e63c38 |
|
|
|
e63c38 |
* Wed Jan 13 2021 Alex Macdonald <almacdon@redhat.com> 1.7.1-12
|
|
|
e63c38 |
- remove hardcoded lib directory in the Makefile
|
|
|
e63c38 |
|
|
|
e63c38 |
* Fri Jan 08 2021 Alex Macdonald <almacdon@redhat.com> 1.7.1-11
|
|
|
e63c38 |
- remove hardcoded "amd64" directory path in the Makefile
|
|
|
e63c38 |
|
|
|
e63c38 |
* Wed Dec 09 2020 Alex Macdonald <almacdon@redhat.com> 1.7.1-10
|
|
|
e63c38 |
- remove BuildArch: noarch
|
|
|
e63c38 |
|
|
|
e63c38 |
* Tue Dec 01 2020 Alex Macdonald <almacdon@redhat.com> 1.7.1-9
|
|
|
e63c38 |
- run unit tests on classes that do not require randomizedtesting
|
|
|
e63c38 |
- add liblz4-java.so generation step to Makefile
|
|
|
e63c38 |
- remove mvn_file macro for lz4
|
|
|
e63c38 |
|
|
|
e63c38 |
* Thu Nov 19 2020 Alex Macdonald <almacdon@redhat.com> 1.7.1-8
|
|
|
e63c38 |
- remove dependency on cpptasks
|
|
|
e63c38 |
|
|
|
e63c38 |
* Mon Nov 16 2020 Alex Macdonald <almacdon@redhat.com> 1.7.1-7
|
|
|
e63c38 |
- cleanup whitespace in the local patch to remove comments from templates
|
|
|
e63c38 |
- use system lz4 and xxhash instead of bundling the dependencies
|
|
|
e63c38 |
|
|
|
e63c38 |
* Tue Oct 06 2020 Alex Macdonald <almacdon@redhat.com> 1.7.1-6
|
|
|
e63c38 |
- include patch to strip comments from mvel templates
|
|
|
e63c38 |
|
|
|
e63c38 |
* Tue Sep 15 2020 Alex Macdonald <almacdon@redhat.com> 1.7.1-5
|
|
|
e63c38 |
- add "BuildArch: noarch" to fix rpmlint error: no-binary
|
|
|
e63c38 |
|
|
|
e63c38 |
* Wed Sep 09 2020 Alex Macdonald <almacdon@redhat.com> 1.7.1-4
|
|
|
e63c38 |
- fixed sources to have both lz4-java and lz4
|
|
|
e63c38 |
|
|
|
e63c38 |
* Wed Aug 05 2020 Alex Macdonald <almacdon@redhat.com> 1.7.1-3
|
|
|
e63c38 |
- used commit from Jie Kang's fork of lz4-java to update to upstream 1.7.1
|
|
|
e63c38 |
- this prevents tests from running; eliminates the need for randomizedtesting for f33 onward
|
|
|
e63c38 |
- remove dependency on bea-stax
|
|
|
e63c38 |
- remove all usage of sun.misc.Unsafe
|
|
|
e63c38 |
|
|
|
e63c38 |
* Tue Aug 04 2020 Alex Macdonald <almacdon@redhat.com> 1.7.1-2
|
|
|
e63c38 |
- Included the lz4 submodule inside the lz4-java source tarball
|
|
|
e63c38 |
|
|
|
e63c38 |
* Thu Jul 30 2020 Alex Macdonald <almacdon@redhat.com> 1.7.1-1
|
|
|
e63c38 |
- Update to version 1.7.1
|
|
|
e63c38 |
|
|
|
e63c38 |
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-13
|
|
|
e63c38 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
e63c38 |
|
|
|
e63c38 |
* Wed Jul 24 2019 Fabio Valentini <decathorpe@gmail.com> - 1.3.0-12
|
|
|
e63c38 |
- Add BuildRequires: gcc to fix FTBFS issue.
|
|
|
e63c38 |
|
|
|
e63c38 |
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-11
|
|
|
e63c38 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
e63c38 |
|
|
|
e63c38 |
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-10
|
|
|
e63c38 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
e63c38 |
|
|
|
e63c38 |
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-9
|
|
|
e63c38 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
e63c38 |
|
|
|
e63c38 |
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-8
|
|
|
e63c38 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
e63c38 |
|
|
|
e63c38 |
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-7
|
|
|
e63c38 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
e63c38 |
|
|
|
e63c38 |
* Sun Feb 19 2017 gil cattaneo <puntogil@libero.it> 1.3.0-6
|
|
|
e63c38 |
- disable test suite on ppc64
|
|
|
e63c38 |
|
|
|
e63c38 |
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-5
|
|
|
e63c38 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
e63c38 |
|
|
|
e63c38 |
* Mon Sep 12 2016 gil cattaneo <puntogil@libero.it> 1.3.0-4
|
|
|
e63c38 |
- exclude aarch64
|
|
|
e63c38 |
|
|
|
e63c38 |
* Tue May 03 2016 gil cattaneo <puntogil@libero.it> 1.3.0-3
|
|
|
e63c38 |
- fix test suite
|
|
|
e63c38 |
|
|
|
e63c38 |
* Tue May 03 2016 gil cattaneo <puntogil@libero.it> 1.3.0-2
|
|
|
e63c38 |
- unbundle lz4 code (lz4-java issues#74)
|
|
|
e63c38 |
|
|
|
e63c38 |
* Mon Jul 20 2015 gil cattaneo <puntogil@libero.it> 1.3.0-1
|
|
|
e63c38 |
- initial rpm
|