2016-10-06 09:21:35 +02:00
|
|
|
|
#
|
|
|
|
|
# spec file for package zstd
|
|
|
|
|
#
|
2019-01-05 15:15:29 +01:00
|
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
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
|
|
|
|
|
2016-10-06 09:21:35 +02:00
|
|
|
|
%define major 1
|
|
|
|
|
%define libname lib%{name}%{major}
|
2017-03-27 16:15:17 +02:00
|
|
|
|
Name: zstd
|
2019-07-27 03:28:31 +02:00
|
|
|
|
Version: %{major}.4.2
|
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
|
2018-10-24 11:34:08 +02:00
|
|
|
|
Source0: https://github.com/facebook/zstd/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
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
|
|
|
|
|
|
|
|
|
|
%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
|
|
|
|
|
2019-06-03 09:05:25 +02:00
|
|
|
|
# This compression summary is based on https://lists.opensuse.org/opensuse-factory/2019-05/msg00344.html
|
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.
|
|
|
|
|
|
2016-10-06 09:21:35 +02:00
|
|
|
|
%prep
|
|
|
|
|
%setup -q
|
2018-06-15 09:00:19 +02:00
|
|
|
|
%patch1 -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}"
|
|
|
|
|
export CXXFLAGS="%{optflags} -std=c++11"
|
|
|
|
|
for dir in lib programs contrib/pzstd; do
|
|
|
|
|
make %{?_smp_mflags} -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"
|
|
|
|
|
make %{?_smp_mflags} -C tests test-zstd
|
2018-07-03 11:10:41 +02:00
|
|
|
|
#make %{?_smp_mflags} -C contrib/pzstd test-pzstd
|
2016-10-06 09:21:35 +02:00
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%make_install 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
|
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
|
2018-10-24 11:34:08 +02:00
|
|
|
|
%{_bindir}/*
|
|
|
|
|
%{_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
|
2018-10-24 11:34:08 +02:00
|
|
|
|
%{_libdir}/libzstd.so.*
|
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
|
2018-10-24 11:34:08 +02:00
|
|
|
|
%license COPYING LICENSE
|
2018-02-06 09:14:29 +01:00
|
|
|
|
%{_libdir}/libzstd.a
|
|
|
|
|
|
2016-10-06 09:21:35 +02:00
|
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
|
|
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
%changelog
|