zstd/zstd.spec
Bernhard Wiedemann 32efb864b4 Accepting request 1079169 from home:dirkmueller:Factory
- update to 1.5.5:
  * fix: fix rare corruption bug affecting the high compression
    mode, reported by @danlark1
  * perf: improve mid-level compression speed
  * lib: deprecated bufferless block-level API (#3534) by
    @terrelln
  * cli: mmap large dictionaries to save memory, by
    @daniellerozenblit
  * cli: improve speed of --patch-from mode (~+50%) (#3545) by
    @daniellerozenblit
  * cli: improve i/o speed (~+10%) when processing lots of small
    files (#3479) by @felixhandte
  * cli: zstd no longer crashes when requested to write into
    write-protected directory (#3541) by @felixhandte
  * cli: fix decompression into block device using -o, reported
    by @georgmu
  * build: fix zstd CLI compiled with lzma support but not zlib
    support (#3494) by @Hello71
  * build: fix cmake does no longer require 3.18 as minimum
    version (#3510) by @kou
  * build: fix MSVC+ClangCL linking issue (#3569) by @tru
  * build: fix zstd-dll, version of zstd CLI that links to the
    dynamic library (#3496) by @yoniko
  * build: fix MSVC warnings (#3495) by @embg
  * doc: updated zstd specification to clarify corner cases, by
    @Cyan4973
  * doc: document how to create fat binaries for macos (#3568) by
    @rickmark
  * misc: improve seekable format ingestion speed (~+100%) for
    very small chunk sizes (#3544) by @Cyan4973

OBS-URL: https://build.opensuse.org/request/show/1079169
OBS-URL: https://build.opensuse.org/package/show/Archiving/zstd?expand=0&rev=84
2023-04-14 20:32:20 +00:00

164 lines
5.1 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) 2023 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
Version: 1.5.5
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
# for .gz support
BuildRequires: pkgconfig(zlib)
%{?suse_build_hwcaps_libs}
%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.
%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.
%package gzip
Summary: zstd and zlib based gzip drop-in
Group: Productivity/Archiving/Compression
Conflicts: busybox-gzip
Conflicts: gzip
Conflicts: alternative(gzip)
Provides: gzip
Provides: alternative(gzip)
Requires: %{name} >= %{version}
%description gzip
Zstd, short for Zstandard, is a lossless compression algorithm,
targeting faster compression than zlib at comparable ratios.
This subpackage provides a compatible alternative to gzip(1) using
an optimized deflate/zlib handling.
%prep
%autosetup -p1
%build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags} -std=c++11"
# lib-mt is alias for multi-threaded library support
%make_build HAVE_ZLIB=1 prefix=%{_prefix} libdir=%{_libdir} -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_build -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
ln -s zstd %{buildroot}/%{_bindir}/gzip
ln -s zstd %{buildroot}/%{_bindir}/gunzip
ln -s zstdcat %{buildroot}/%{_bindir}/zcat
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%files
%license COPYING LICENSE
%doc README.md CHANGELOG
%{_bindir}/pzstd
%{_bindir}/unzstd
%{_bindir}/zstd
%{_bindir}/zstdcat
%{_bindir}/zstdgrep
%{_bindir}/zstdless
%{_bindir}/zstdmt
%{_mandir}/man1/*.1%{?ext_man}
%files -n %{libname}
%license COPYING LICENSE
%{_libdir}/libzstd.so.1*
%files -n lib%{name}-devel
%license COPYING LICENSE
%{_includedir}/*.h
%{_libdir}/pkgconfig/libzstd.pc
%{_libdir}/libzstd.so
%files -n lib%{name}-devel-static
%{_libdir}/libzstd.a
%files gzip
%{_bindir}/gzip
%{_bindir}/gunzip
%{_bindir}/zcat
%changelog