Package init
This commit is contained in:
commit
c47ff1b035
19
pzstd.1.patch
Normal file
19
pzstd.1.patch
Normal 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\.
|
||||||
|
.
|
||||||
BIN
zstd-1.3.6.tar.gz
Normal file
BIN
zstd-1.3.6.tar.gz
Normal file
Binary file not shown.
93
zstd.spec
Normal file
93
zstd.spec
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
%bcond_without pzstd
|
||||||
|
|
||||||
|
Name: zstd
|
||||||
|
Version: 1.3.6
|
||||||
|
Release: 2
|
||||||
|
Summary: A fast lossless compression algorithm
|
||||||
|
License: BSD and GPLv2
|
||||||
|
URL: https://github.com/facebook/zstd
|
||||||
|
Source0: https://github.com/facebook/zstd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
%if %{with pzstd}
|
||||||
|
Patch0: pzstd.1.patch
|
||||||
|
%endif
|
||||||
|
|
||||||
|
BuildRequires: gtest-devel gcc-c++ pkg-config
|
||||||
|
|
||||||
|
Provides: libzstd
|
||||||
|
Obsoletes: libzstd
|
||||||
|
|
||||||
|
%description
|
||||||
|
Zstd is a fast lossless compression algorithm. It's backed by a very fast entropy stage,
|
||||||
|
provided by Huff0 and FSE library. It's a real-time compression scenario for zlib levels
|
||||||
|
and has a better compression ratio.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Header files for zstd library
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
Provides: libzstd-devel
|
||||||
|
Obsoletes: libzstd-devel
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
This package contains the header files for zstd library.
|
||||||
|
|
||||||
|
%package help
|
||||||
|
Summary: Help documentation related to zstd
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description help
|
||||||
|
This package includes help documentation and manuals related to zstd.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
export CFLAGS="$RPM_OPT_FLAGS"
|
||||||
|
export LDFLAGS="$RPM_LD_FLAGS"
|
||||||
|
for dir in lib programs; do
|
||||||
|
%make_build -C "$dir"
|
||||||
|
done
|
||||||
|
%if %{with pzstd}
|
||||||
|
%make_build -C contrib/pzstd CXXFLAGS="$RPM_OPT_FLAGS -std=c++11"
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%check
|
||||||
|
make -C tests test-zstd
|
||||||
|
%if %{with pzstd}
|
||||||
|
make -C contrib/pzstd test CXXFLAGS="$RPM_OPT_FLAGS -std=c++11"
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%post -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir}
|
||||||
|
%if %{with pzstd}
|
||||||
|
install -D -m755 contrib/pzstd/pzstd %{buildroot}%{_bindir}/pzstd
|
||||||
|
install -D -m644 programs/zstd.1 %{buildroot}%{_mandir}/man1/pzstd.1
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc NEWS README.md
|
||||||
|
%license LICENSE COPYING
|
||||||
|
%{_bindir}/*
|
||||||
|
|
||||||
|
%{_libdir}/libzstd.so.*
|
||||||
|
|
||||||
|
%exclude %{_bindir}/%{name}less
|
||||||
|
%exclude %{_bindir}/%{name}grep
|
||||||
|
%exclude %{_libdir}/libzstd.a
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%{_includedir}/*.h
|
||||||
|
|
||||||
|
%{_libdir}/pkgconfig/libzstd.pc
|
||||||
|
%{_libdir}/libzstd.so
|
||||||
|
|
||||||
|
%files help
|
||||||
|
%{_mandir}/man1/*.1*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Sun Sep 15 2019 dongjian <dongjian13@huawei.com> - 1.3.6-2
|
||||||
|
- Modification summary
|
||||||
Loading…
x
Reference in New Issue
Block a user