File zstd-seekable_format.spec of Package zstd-seekable_format
#
# spec file for package zstd-seekable_format
#
# Copyright (c) 2024 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 libname libzstd1
Name: zstd-seekable_format
Version: 1.5.6
Release: 0
Summary: Zstandard compression tools, seekable-format 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}/zstd-%{version}.tar.gz
Source1: https://github.com/facebook/zstd/releases/download/v%{version}/zstd-%{version}.tar.gz.sig
Source2: zstd.keyring
Patch0: longopt.diff
BuildRequires: gcc
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 ~1–4%% size reduction for same time.
%prep
%setup -n zstd-%{version}
%patch -P 0
%build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
export CFLAGS="%{optflags}"
# lib-mt is alias for multi-threaded library support
%make_build prefix=%{_prefix} libdir=%{_libdir} -C lib lib
for dir in programs contrib/seekable_format/examples ; do
%make_build -C "$dir"
done
%check
%install
for bin in parallel_processing seekable_compression seekable_decompression seekable_decompression_mem ; do
install -D -m755 contrib/seekable_format/examples/$bin %{buildroot}%{_bindir}/$bin
done
%files
%license COPYING LICENSE
%doc README.md CHANGELOG
%{_bindir}/*
%changelog