Blame SPECS/lz4-java.spec

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