SHA256
3
0
forked from pool/zstd
zstd/zstd.spec
Martin Pluskal 6895090f7c Accepting request 942801 from home:dirkmueller:Factory
- update to 1.5.1:
  * perf: rebalanced compression levels, to better match the intended speed/level curve
  * perf: faster huffman decoder, using x64 assembly
  * perf: slightly faster high speed modes (strategies fast & dfast)
  * perf: improved binary size and faster compilation times
  * perf: new row64 mode, used notably in level 12
  * perf: faster mid-level compression speed in presence of highly repetitive patterns
  * perf: minor compression ratio improvements for small data at high levels
  * perf: reduced stack usage (mostly useful for Linux Kernel)
  * perf: faster compression speed on incompressible data
  * perf: on-demand reduced ZSTD_DCtx state size, using build macro ZSTD_DECODER_INTERNAL_BUFFER, at a small cost of performance
  * build: allows hiding static symbols in the dynamic library, using build macro
  * build: support for m68k (Motorola 68000's)
  * build: improved AIX support
  * build: improved meson unofficial build
  * cli : custom memory limit when training dictionary (#2925)
  * cli : report advanced parameters information when compressing in very verbose mode (``-vv`)

- force use of packed statements for arm platforms

OBS-URL: https://build.opensuse.org/request/show/942801
OBS-URL: https://build.opensuse.org/package/show/Archiving/zstd?expand=0&rev=69
2021-12-28 08:54:26 +00:00

140 lines
4.4 KiB
RPMSpec
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#
# spec file for package zstd
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define major 1
%define libname lib%{name}%{major}
Name: zstd
Version: %{major}.5.1
Release: 0
Summary: Zstandard compression tools
License: BSD-3-Clause AND GPL-2.0-only
Group: Productivity/Archiving/Compression
URL: https://github.com/facebook/zstd
Source0: https://github.com/facebook/zstd/releases/download/v%{version}/%{name}-%{version}.tar.gz
Source1: https://github.com/facebook/zstd/releases/download/v%{version}/%{name}-%{version}.tar.gz.sig
Source2: zstd.keyring
Source99: baselibs.conf
Patch1: pzstd.1.patch
BuildRequires: gcc
# C++ is needed for pzstd only
BuildRequires: gcc-c++
BuildRequires: pkgconfig
%description
Zstd, short for Zstandard, is a lossless compression algorithm. Speed
vs. compression trade-off is configurable in small increments.
Decompression speed is preserved and remains roughly the same at all
settings, a property shared by most LZ compression algorithms, such
as zlib or lzma.
At roughly the same ratio, zstd (v1.4.0) achieves ~870%% faster
compression than gzip. For roughly the same time, zstd achives a
~12%% better ratio than gzip. LZMA outperforms zstd by ~10%% faster
compression for same ratio, or ~14%% size reduction for same time.
# This compression summary is based on https://lists.opensuse.org/opensuse-factory/2019-05/msg00344.html
%package -n %{libname}
Summary: Zstd compression library
Group: System/Libraries
%description -n %{libname}
Zstd, short for Zstandard, is a lossless compression algorithm,
targeting faster compression than zlib at comparable ratios.
This subpackage contains the implementation as a shared library.
%package -n lib%{name}-devel
Summary: Development files for the Zstd compression library
Group: Development/Libraries/C and C++
Requires: %{libname} = %{version}
Requires: glibc-devel
%description -n lib%{name}-devel
Zstd, short for Zstandard, is a lossless compression algorithm,
targeting faster compression than zlib at comparable ratios.
Needed for compiling programs that link with the library.
%package -n lib%{name}-devel-static
Summary: Development files for the Zstd compression library
Group: Development/Libraries/C and C++
BuildRequires: glibc-devel-static
Requires: lib%{name}-devel = %{version}
%description -n lib%{name}-devel-static
Zstd, short for Zstandard, is a lossless compression algorithm,
targeting faster compression than zlib at comparable ratios.
Needed for compiling programs that link with the library.
%prep
%autosetup -p1
%build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
export CFLAGS="%{optflags}"
%ifarch armv6l armv6hl
export CFLAGS+="-DMEM_FORCE_MEMORY_ACCESS=1"
%endif
export CXXFLAGS="$CFLAGS -std=c++11"
# lib-mt is alias for multi-threaded library support
%make_build -C lib lib-mt
for dir in programs contrib/pzstd; do
%make_build -C "$dir"
done
%check
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags} -std=c++11"
%make_build -C tests test-zstd
#make %{?_smp_mflags} -C contrib/pzstd test-pzstd
%install
%make_install V=1 VERBOSE=1 PREFIX=%{_prefix} LIBDIR=%{_libdir}
install -D -m755 contrib/pzstd/pzstd %{buildroot}%{_bindir}/pzstd
install -D -m644 programs/zstd.1 %{buildroot}%{_mandir}/man1/pzstd.1
%files
%license COPYING LICENSE
%doc README.md CHANGELOG
%{_bindir}/*
%{_mandir}/man1/*.1%{?ext_man}
%files -n %{libname}
%license COPYING LICENSE
%{_libdir}/libzstd.so.*
%files -n lib%{name}-devel
%license COPYING LICENSE
%{_includedir}/*.h
%{_libdir}/pkgconfig/libzstd.pc
%{_libdir}/libzstd.so
%files -n lib%{name}-devel-static
%license COPYING LICENSE
%{_libdir}/libzstd.a
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%changelog