%global debug_package %nil %global build_opts -Doffline=true -Divy.mode=local -Divysettings.xml=/etc/ivy/ivysettings.xml -Divy.revision=%{version} Name: lz4-java Version: 1.3.0 Release: 1 Summary: LZ4 compression for Java License: ASL 2.0 and (BSD and GPLv2+) URL: https://github.com/jpountz/lz4-java Source0: https://github.com/jpountz/lz4-java/archive/%{version}.tar.gz Patch0: lz4-java-1.3.0-build.patch Patch1: lz4-java-1.3.0-junit_Assert.patch BuildRequires: ant ant-junit aqute-bnd cpptasks ivy-local java-devel javapackages-local mvel BuildRequires: objectweb-asm randomizedtesting-junit4-ant bea-stax-api xerces-j2 apache-parent Provides: bundled(lz4) = r122 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} find -name '*.dylib' -print -delete find -name '*.so' -print -delete %patch0 -p1 %patch1 -p1 cp -p src/xxhash/LICENSE LICENSE.xxhash cp -p src/lz4/LICENSE lz4_LICENSE echo "Export-Package: net.jpountz.*,!linux.*" >> lz4.bnd sed -i '/packages.version/d' lz4.bnd %build ant %build_opts -Divy.pom.version=%{version} jar docs makepom bnd wrap -p lz4.bnd -o dist/lz4-%{version}.jar --version %{version} dist/lz4.jar %install %mvn_file net.jpountz.lz4:lz4 lz4 %mvn_artifact dist/lz4-%{version}.pom dist/lz4-%{version}.jar %mvn_install -J build/docs %ifnarch %{arm} aarch64 ppc64 %check ant %build_opts test %endif %files -f .mfiles %doc CHANGES.md README.md %license LICENSE.txt LICENSE.xxhash lz4_LICENSE %files javadoc -f .mfiles-javadoc %license LICENSE.txt %changelog * Tue Aug 25 2020 Jeffery.Gao - 1.3.0-1 - Package init