2016-10-06 09:21:35 +02:00
|
|
|
#
|
|
|
|
# spec file for package zstd
|
|
|
|
#
|
2018-02-06 09:14:29 +01:00
|
|
|
# Copyright (c) 2018 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.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
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
|
2018-07-03 11:10:41 +02:00
|
|
|
Version: %{major}.3.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
|
2016-10-06 09:21:35 +02:00
|
|
|
Source0: https://github.com/facebook/zstd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
2018-06-15 09:00:19 +02:00
|
|
|
Patch1: pzstd.1.patch
|
|
|
|
Patch2: pzstd-global-gtest.patch
|
2018-07-03 11:10:41 +02:00
|
|
|
Patch3: zstd-1.3.5-fix-list-stdin.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++
|
|
|
|
BuildRequires: googletest-devel
|
2016-10-06 09:21:35 +02:00
|
|
|
BuildRequires: pkgconfig
|
|
|
|
|
|
|
|
%description
|
2016-10-17 14:20:13 +02:00
|
|
|
Zstd, short for Zstandard, is a lossless compression algorithm,
|
2016-10-06 09:21:35 +02:00
|
|
|
targeting real-time compression scenarios at zlib-level compression ratio.
|
|
|
|
|
2016-10-17 14:20:13 +02:00
|
|
|
Zstd can also offer stronger compression ratios at the cost of
|
|
|
|
compression speed. Speed vs. compression trade-off is configurable by
|
|
|
|
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.
|
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,
|
|
|
|
targeting real-time compression scenarios at zlib-level compression ratio.
|
|
|
|
|
|
|
|
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,
|
|
|
|
targeting real-time compression scenarios at zlib-level compression ratio.
|
|
|
|
|
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,
|
|
|
|
targeting real-time compression scenarios at zlib-level compression ratio.
|
|
|
|
|
|
|
|
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
|
|
|
|
%patch2 -p1
|
2018-07-03 11:10:41 +02:00
|
|
|
%patch3 -p1
|
2016-10-06 09:21:35 +02:00
|
|
|
|
|
|
|
%build
|
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
|
|
|
|
%doc NEWS README.md
|
2017-03-27 16:15:17 +02:00
|
|
|
%{_bindir}/zstd
|
|
|
|
%{_bindir}/zstdcat
|
|
|
|
%{_bindir}/zstdgrep
|
|
|
|
%{_bindir}/zstdless
|
2017-08-21 15:48:32 +02:00
|
|
|
%{_bindir}/zstdmt
|
2017-03-27 16:15:17 +02:00
|
|
|
%{_bindir}/unzstd
|
2018-06-15 09:00:19 +02:00
|
|
|
%{_bindir}/pzstd
|
2018-07-03 11:10:41 +02:00
|
|
|
%{_mandir}/man1/zstd.1%{?ext_man}
|
|
|
|
%{_mandir}/man1/unzstd.1%{?ext_man}
|
|
|
|
%{_mandir}/man1/zstdcat.1%{?ext_man}
|
|
|
|
%{_mandir}/man1/pzstd.1%{?ext_man}
|
2018-05-24 16:07:33 +02:00
|
|
|
%license COPYING LICENSE
|
2016-10-06 09:21:35 +02:00
|
|
|
|
|
|
|
%files -n %{libname}
|
|
|
|
%{_libdir}/libzstd.so.*
|
2018-05-24 16:07:33 +02:00
|
|
|
%license COPYING LICENSE
|
2016-10-06 09:21:35 +02:00
|
|
|
|
|
|
|
%files -n lib%{name}-devel
|
2018-05-24 16:07:33 +02:00
|
|
|
%license COPYING LICENSE
|
2016-10-06 09:21:35 +02:00
|
|
|
%{_includedir}/zbuff.h
|
|
|
|
%{_includedir}/zdict.h
|
|
|
|
%{_includedir}/zstd.h
|
2016-12-04 13:33:31 +01:00
|
|
|
%{_includedir}/zstd_errors.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
|
|
|
|
|
2016-10-06 09:21:35 +02:00
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%changelog
|