Blame SPECS/lz4-java.spec

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