Automatic import for version 1.3.4-1

This commit is contained in:
Rosa 2018-06-21 10:14:25 +03:00
commit 2f91eb2bdc
3 changed files with 133 additions and 0 deletions

2
.abf.yml Normal file
View file

@ -0,0 +1,2 @@
sources:
"zstd-1.3.4.tar.gz": f000e185e02b8ccccd0992e5cb7e88175318d83b

19
pzstd.1.patch Normal file
View file

@ -0,0 +1,19 @@
diff -Naur -Naru zstd-1.3.4/programs/zstd.1 zstd-1.3.4.new/programs/zstd.1
--- zstd-1.3.4/programs/zstd.1 2018-03-26 22:19:34.000000000 +0000
+++ zstd-1.3.4.new/programs/zstd.1 2018-03-28 04:28:27.532777239 +0000
@@ -177,7 +177,14 @@
.TP
\fB\-\-\fR
All arguments after \fB\-\-\fR are treated as files
-.
+
+.SH Parallel Zstd OPTIONS
+Additional options for the pzstd utility
+.TP
+.BR \-p ", " --processes
+ number of threads to use for (de)compression (default:4)
+
+
.SH "DICTIONARY BUILDER"
\fBzstd\fR offers \fIdictionary\fR compression, which greatly improves efficiency on small files and messages\. It\'s possible to train \fBzstd\fR with a set of samples, the result of which is saved into a file called a \fBdictionary\fR\. Then during compression and decompression, reference the same dictionary, using command \fB\-D dictionaryFileName\fR\. Compression of small files similar to the sample set will be greatly improved\.
.

112
zstd.spec Normal file
View file

@ -0,0 +1,112 @@
%define realname zstd
%define libmajor 1
%define libname %mklibname %{realname} %{libmajor}
%define libname_devel %mklibname %{realname} -d
# aarch64 and armv7hl at least currently segfault
# in ThreadPool test for the pzstd util
%ifarch %{ix86} x86_64
%bcond_without pzstd
%endif
Name: zstd
Version: 1.3.4
Release: 1
Summary: Zstd compression library
Group: Archiving/Compression
License: BSD and GPLv2
URL: http://www.zstd.net/
Source0: https://github.com/facebook/zstd/archive/v%{version}/%{name}-%{version}.tar.gz
Patch1: pzstd.1.patch
BuildRequires: gcc gtest-devel
%if %{with pzstd}
BuildRequires: gcc-c++
%endif
%description
Zstd, short for Zstandard, is a fast lossless compression algorithm,
targeting real-time compression scenarios at zlib-level compression ratio.
%files
%doc NEWS README.md
%{_bindir}/%{name}
%if %{with pzstd}
%{_bindir}/p%{name}
%{_mandir}/man1/p%{name}.1*
%endif
%{_bindir}/%{name}mt
%{_bindir}/un%{name}
%{_bindir}/%{name}cat
%{_mandir}/man1/%{name}.1*
%{_mandir}/man1/un%{name}.1*
%{_mandir}/man1/%{name}cat.1*
#----------------------------------------------------------------------------
%package -n %{libname}
Summary: Zstd shared library
Group: System/Libraries
%description -n %{libname}
Zstandard compression shared library.
%files -n %{libname}
%{_libdir}/libzstd.so.*
#----------------------------------------------------------------------------
%package -n %{libname_devel}
Summary: Header files for Zstd library
Group: Development/C
Requires: %{libname} = %{EVRD}
Provides: %{name}-devel = %{EVRD}
Provides: lib%{name}-devel = %{EVRD}
%description -n %{libname_devel}
Header files for Zstd library.
%files -n %{libname_devel}
%{_includedir}/zbuff.h
%{_includedir}/zdict.h
%{_includedir}/zstd.h
%{_includedir}/zstd_errors.h
%{_libdir}/pkgconfig/libzstd.pc
%{_libdir}/libzstd.so
#----------------------------------------------------------------------------
%prep
%setup -q
find -name .gitignore -delete
%if %{with pzstd}
%patch1 -p1
%endif
%build
%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;}
for dir in lib programs; do
CFLAGS="%{optflags}" %make -C "$dir"
done
%if %{with pzstd}
CFLAGS="%{optflags}" CXXFLAGS="%{optflags} -std=c++11" %make -C 'contrib/pzstd'
%endif
%check
%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;}
CFLAGS="%{optflags}" make -C tests test-zstd
%if %{with pzstd}
CFLAGS="%{optflags}" CXXFLAGS="%{optflags} -std=c++11" make -C contrib/pzstd test
%endif
%install
%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir}
# Remove undocumented wrappers of minimal use
rm %{buildroot}/%{_bindir}/%{name}less
rm %{buildroot}/%{_bindir}/%{name}grep
# Don't install the static lib
rm %{buildroot}/%{_libdir}/libzstd.a
%if %{with pzstd}
install -D -m755 contrib/pzstd/pzstd %{buildroot}/usr/bin/pzstd
install -D -m644 programs/%{name}.1 %{buildroot}/%{_mandir}/man1/p%{name}.1
%endif