Blame SPECS/lz4-java.spec

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