2016-10-06 09:21:35 +02:00
|
|
|
|
#
|
|
|
|
|
# spec file for package zstd
|
|
|
|
|
#
|
2023-01-04 09:01:28 +01:00
|
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2016-10-06 09:21:35 +02:00
|
|
|
|
#
|
|
|
|
|
# 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.
|
|
|
|
|
|
2019-04-26 11:54:41 +02:00
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-10-06 09:21:35 +02:00
|
|
|
|
#
|
|
|
|
|
|
2018-07-03 11:10:41 +02:00
|
|
|
|
|
2022-01-31 10:43:08 +01:00
|
|
|
|
%define libname libzstd1
|
2017-03-27 16:15:17 +02:00
|
|
|
|
Name: zstd
|
2023-04-14 22:32:20 +02:00
|
|
|
|
Version: 1.5.5
|
2016-10-06 09:21:35 +02:00
|
|
|
|
Release: 0
|
|
|
|
|
Summary: Zstandard compression tools
|
2018-03-28 17:12:17 +02:00
|
|
|
|
License: BSD-3-Clause AND GPL-2.0-only
|
2016-10-06 09:21:35 +02:00
|
|
|
|
Group: Productivity/Archiving/Compression
|
2018-07-03 11:10:41 +02:00
|
|
|
|
URL: https://github.com/facebook/zstd
|
2021-05-14 23:12:38 +02:00
|
|
|
|
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
|
2021-05-14 22:44:49 +02:00
|
|
|
|
Source2: zstd.keyring
|
2019-07-11 10:48:47 +02:00
|
|
|
|
Source99: baselibs.conf
|
2018-06-15 09:00:19 +02:00
|
|
|
|
Patch1: pzstd.1.patch
|
2016-10-06 09:21:35 +02:00
|
|
|
|
BuildRequires: gcc
|
2018-06-15 09:00:19 +02:00
|
|
|
|
# C++ is needed for pzstd only
|
|
|
|
|
BuildRequires: gcc-c++
|
2016-10-06 09:21:35 +02:00
|
|
|
|
BuildRequires: pkgconfig
|
2022-01-31 10:43:08 +01:00
|
|
|
|
# for .gz support
|
|
|
|
|
BuildRequires: pkgconfig(zlib)
|
2023-03-09 10:31:26 +01:00
|
|
|
|
%{?suse_build_hwcaps_libs}
|
2016-10-06 09:21:35 +02:00
|
|
|
|
|
|
|
|
|
%description
|
2019-04-26 11:54:41 +02:00
|
|
|
|
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.
|
|
|
|
|
|
2019-06-03 09:05:25 +02:00
|
|
|
|
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.
|
2016-10-06 09:21:35 +02:00
|
|
|
|
|
|
|
|
|
%package -n %{libname}
|
2016-10-17 14:20:13 +02:00
|
|
|
|
Summary: Zstd compression library
|
2016-12-07 10:25:46 +01:00
|
|
|
|
Group: System/Libraries
|
2016-10-06 09:21:35 +02:00
|
|
|
|
|
|
|
|
|
%description -n %{libname}
|
2016-10-17 14:20:13 +02:00
|
|
|
|
Zstd, short for Zstandard, is a lossless compression algorithm,
|
2019-04-26 11:54:41 +02:00
|
|
|
|
targeting faster compression than zlib at comparable ratios.
|
2016-10-17 14:20:13 +02:00
|
|
|
|
|
|
|
|
|
This subpackage contains the implementation as a shared library.
|
2016-10-06 09:21:35 +02:00
|
|
|
|
|
|
|
|
|
%package -n lib%{name}-devel
|
2016-10-17 14:20:13 +02:00
|
|
|
|
Summary: Development files for the Zstd compression library
|
2016-10-06 09:21:35 +02:00
|
|
|
|
Group: Development/Libraries/C and C++
|
2016-10-06 14:29:44 +02:00
|
|
|
|
Requires: %{libname} = %{version}
|
|
|
|
|
Requires: glibc-devel
|
2016-10-06 09:21:35 +02:00
|
|
|
|
|
|
|
|
|
%description -n lib%{name}-devel
|
2016-10-17 14:20:13 +02:00
|
|
|
|
Zstd, short for Zstandard, is a lossless compression algorithm,
|
2019-04-26 11:54:41 +02:00
|
|
|
|
targeting faster compression than zlib at comparable ratios.
|
2016-10-17 14:20:13 +02:00
|
|
|
|
|
2016-10-06 09:21:35 +02:00
|
|
|
|
Needed for compiling programs that link with the library.
|
|
|
|
|
|
2018-02-06 09:14:29 +01:00
|
|
|
|
%package -n lib%{name}-devel-static
|
|
|
|
|
Summary: Development files for the Zstd compression library
|
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
|
BuildRequires: glibc-devel-static
|
2018-02-08 11:23:17 +01:00
|
|
|
|
Requires: lib%{name}-devel = %{version}
|
2018-02-06 09:14:29 +01:00
|
|
|
|
|
|
|
|
|
%description -n lib%{name}-devel-static
|
|
|
|
|
Zstd, short for Zstandard, is a lossless compression algorithm,
|
2019-04-26 11:54:41 +02:00
|
|
|
|
targeting faster compression than zlib at comparable ratios.
|
2018-02-06 09:14:29 +01:00
|
|
|
|
|
|
|
|
|
Needed for compiling programs that link with the library.
|
|
|
|
|
|
2022-01-31 10:43:08 +01:00
|
|
|
|
%package gzip
|
|
|
|
|
Summary: zstd and zlib based gzip drop-in
|
|
|
|
|
Group: Productivity/Archiving/Compression
|
2022-02-07 11:52:10 +01:00
|
|
|
|
Conflicts: busybox-gzip
|
2023-01-04 09:01:28 +01:00
|
|
|
|
Conflicts: gzip
|
|
|
|
|
Conflicts: alternative(gzip)
|
2022-01-31 10:43:08 +01:00
|
|
|
|
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.
|
|
|
|
|
|
2016-10-06 09:21:35 +02:00
|
|
|
|
%prep
|
2021-05-11 20:29:41 +02:00
|
|
|
|
%autosetup -p1
|
2016-10-06 09:21:35 +02:00
|
|
|
|
|
|
|
|
|
%build
|
2019-04-26 15:20:47 +02:00
|
|
|
|
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
2018-06-15 09:00:19 +02:00
|
|
|
|
export CFLAGS="%{optflags}"
|
2022-01-31 10:43:08 +01:00
|
|
|
|
export CXXFLAGS="%{optflags} -std=c++11"
|
2020-07-08 20:22:50 +02:00
|
|
|
|
# lib-mt is alias for multi-threaded library support
|
2022-01-31 10:43:08 +01:00
|
|
|
|
%make_build HAVE_ZLIB=1 prefix=%{_prefix} libdir=%{_libdir} -C lib lib-mt
|
2020-07-08 20:22:50 +02:00
|
|
|
|
for dir in programs contrib/pzstd; do
|
|
|
|
|
%make_build -C "$dir"
|
2016-10-06 09:21:35 +02:00
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
%check
|
2018-06-15 09:00:19 +02:00
|
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
|
export CXXFLAGS="%{optflags} -std=c++11"
|
2020-07-08 20:22:50 +02:00
|
|
|
|
%make_build -C tests test-zstd
|
2022-01-31 10:43:08 +01:00
|
|
|
|
#make_build -C contrib/pzstd test-pzstd
|
2016-10-06 09:21:35 +02:00
|
|
|
|
|
|
|
|
|
%install
|
2022-01-03 11:22:01 +01:00
|
|
|
|
%make_install V=1 VERBOSE=1 prefix=%{_prefix} libdir=%{_libdir}
|
2018-06-15 09:00:19 +02:00
|
|
|
|
install -D -m755 contrib/pzstd/pzstd %{buildroot}%{_bindir}/pzstd
|
|
|
|
|
install -D -m644 programs/zstd.1 %{buildroot}%{_mandir}/man1/pzstd.1
|
2022-01-31 10:43:08 +01:00
|
|
|
|
ln -s zstd %{buildroot}/%{_bindir}/gzip
|
|
|
|
|
ln -s zstd %{buildroot}/%{_bindir}/gunzip
|
2023-01-04 09:01:28 +01:00
|
|
|
|
ln -s zstdcat %{buildroot}/%{_bindir}/zcat
|
2022-01-31 10:43:08 +01:00
|
|
|
|
|
|
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
|
|
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
2016-10-06 09:21:35 +02:00
|
|
|
|
|
|
|
|
|
%files
|
2018-05-24 16:07:33 +02:00
|
|
|
|
%license COPYING LICENSE
|
2019-01-05 15:15:29 +01:00
|
|
|
|
%doc README.md CHANGELOG
|
2022-01-31 10:43:08 +01:00
|
|
|
|
%{_bindir}/pzstd
|
|
|
|
|
%{_bindir}/unzstd
|
|
|
|
|
%{_bindir}/zstd
|
|
|
|
|
%{_bindir}/zstdcat
|
|
|
|
|
%{_bindir}/zstdgrep
|
|
|
|
|
%{_bindir}/zstdless
|
|
|
|
|
%{_bindir}/zstdmt
|
2018-10-24 11:34:08 +02:00
|
|
|
|
%{_mandir}/man1/*.1%{?ext_man}
|
2016-10-06 09:21:35 +02:00
|
|
|
|
|
|
|
|
|
%files -n %{libname}
|
2018-05-24 16:07:33 +02:00
|
|
|
|
%license COPYING LICENSE
|
2022-01-31 10:43:08 +01:00
|
|
|
|
%{_libdir}/libzstd.so.1*
|
2016-10-06 09:21:35 +02:00
|
|
|
|
|
|
|
|
|
%files -n lib%{name}-devel
|
2018-05-24 16:07:33 +02:00
|
|
|
|
%license COPYING LICENSE
|
2018-10-24 11:34:08 +02:00
|
|
|
|
%{_includedir}/*.h
|
2016-10-06 09:21:35 +02:00
|
|
|
|
%{_libdir}/pkgconfig/libzstd.pc
|
|
|
|
|
%{_libdir}/libzstd.so
|
|
|
|
|
|
2018-02-06 09:14:29 +01:00
|
|
|
|
%files -n lib%{name}-devel-static
|
|
|
|
|
%{_libdir}/libzstd.a
|
|
|
|
|
|
2022-01-31 10:43:08 +01:00
|
|
|
|
%files gzip
|
|
|
|
|
%{_bindir}/gzip
|
|
|
|
|
%{_bindir}/gunzip
|
2023-01-04 09:01:28 +01:00
|
|
|
|
%{_bindir}/zcat
|
2016-10-06 09:21:35 +02:00
|
|
|
|
|
|
|
|
|
%changelog
|