almac / rpms / lz4-java

Forked from rpms/lz4-java 3 years ago
Clone
Blob Blame History Raw
# empty debuginfo
%global debug_package %nil
%global lz4_version 1.9.2

Name:          lz4-java
Version:       1.7.1
Release:       3%{?dist}
Summary:       LZ4 compression for Java
# GPL:
# src/lz4/
# BSD:
# src/lz4/libs
License:       ASL 2.0 and (BSD and GPLv2+)
URL:           https://github.com/lz4/lz4-java
Source0:       https://github.com/lz4/lz4-java/archive/%{version}.tar.gz
Source1:       https://github.com/lz4/lz4/archive/v%{lz4_version}.tar.gz

Patch0:        remove-tests.patch

# Build tools
BuildRequires: ant
BuildRequires: ant-junit
BuildRequires: aqute-bnd
BuildRequires: cpptasks
BuildRequires: gcc
BuildRequires: ivy-local
BuildRequires: java-devel
BuildRequires: javapackages-local
BuildRequires: mvel
BuildRequires: objectweb-asm
BuildRequires: bea-stax-api
BuildRequires: xerces-j2
BuildRequires: apache-parent
# FPC ticket Bundled Library Exception
# https://fedorahosted.org/fpc/ticket/603
Provides:      bundled(libxxhash) = r37

%description
LZ4 compression for Java, based on Yann Collet's work.
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:       Javadoc for %{name}
BuildArch:     noarch

%description javadoc
This package contains javadoc for %{name}.

%prep
%setup -q -n %{name}-%{version}
%setup -T -D -a 1

%patch0 -p1

mv lz4-1.9.2/* src/lz4/

# Cleanup
find -name '*.dylib' -print -delete
find -name '*.so' -print -delete

cp -p src/lz4/LICENSE lz4_LICENSE
cp -p src/lz4/lib/LICENSE lz4_lib_LICENSE

%build
ant -Divy.mode=local -Divy.revision=1.7.1 -Divy.pom.version=1.7.1 jar docs makepom
bnd wrap -p lz4-java.bnd -o dist/lz4-java-%{version}.jar --version %{version} dist/lz4-java.jar

%install
%mvn_file net.jpountz.lz4:lz4 lz4
%mvn_artifact dist/lz4-java-%{version}.pom dist/lz4-java-%{version}.jar
%mvn_install -J build/docs

%files -f .mfiles
%doc CHANGES.md README.md
%license LICENSE.txt lz4_LICENSE lz4_lib_LICENSE

%files javadoc -f .mfiles-javadoc
%license LICENSE.txt

%changelog
* Wed Aug 05 2020 Alex Macdonald <almacdon@redhat.com> 1.7.1-3
- used commit from Jie Kang's fork of lz4-java to update to upstream 1.7.1
- this prevents tests from running; eliminates the need for randomizedtesting for f33 onward

* Tue Aug 04 2020 Alex Macdonald <almacdon@redhat.com> 1.7.1-2
- Included the lz4 submodule inside the lz4-java source tarball

* Thu Jul 30 2020 Alex Macdonald <almacdon@redhat.com> 1.7.1-1
- Update to version 1.7.1

* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Wed Jul 24 2019 Fabio Valentini <decathorpe@gmail.com> - 1.3.0-12
- Add BuildRequires: gcc to fix FTBFS issue.

* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sun Feb 19 2017 gil cattaneo <puntogil@libero.it> 1.3.0-6
- disable test suite on ppc64

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Sep 12 2016 gil cattaneo <puntogil@libero.it> 1.3.0-4
- exclude aarch64

* Tue May 03 2016 gil cattaneo <puntogil@libero.it> 1.3.0-3
- fix test suite

* Tue May 03 2016 gil cattaneo <puntogil@libero.it> 1.3.0-2
- unbundle lz4 code (lz4-java issues#74)

* Mon Jul 20 2015 gil cattaneo <puntogil@libero.it> 1.3.0-1
- initial rpm