Accepting request 617021 from Archiving
OBS-URL: https://build.opensuse.org/request/show/617021 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/zstd?expand=0&rev=7
This commit is contained in:
commit
4c445992a1
33
pzstd-global-gtest.patch
Normal file
33
pzstd-global-gtest.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
diff -rupN zstd-1.3.4.orig/contrib/pzstd/Makefile zstd-1.3.4/contrib/pzstd/Makefile
|
||||||
|
--- zstd-1.3.4.orig/contrib/pzstd/Makefile 2018-03-27 00:19:34.000000000 +0200
|
||||||
|
+++ zstd-1.3.4/contrib/pzstd/Makefile 2018-06-14 13:46:16.485820353 +0200
|
||||||
|
@@ -32,7 +32,7 @@ LDFLAGS ?=
|
||||||
|
|
||||||
|
# Include flags
|
||||||
|
PZSTD_INC = -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(PROGDIR) -I.
|
||||||
|
-GTEST_INC = -isystem googletest/googletest/include
|
||||||
|
+GTEST_INC =
|
||||||
|
|
||||||
|
PZSTD_CPPFLAGS = $(PZSTD_INC)
|
||||||
|
PZSTD_CCXXFLAGS =
|
||||||
|
@@ -46,7 +46,7 @@ ALL_LDFLAGS = $(EXTRA_FLAGS) $(LDFLA
|
||||||
|
|
||||||
|
|
||||||
|
# gtest libraries need to go before "-lpthread" because they depend on it.
|
||||||
|
-GTEST_LIB = -L googletest/build/googlemock/gtest
|
||||||
|
+GTEST_LIB =
|
||||||
|
LIBS =
|
||||||
|
|
||||||
|
# Compilation commands
|
||||||
|
@@ -212,10 +212,7 @@ GTEST_CMAKEFLAGS =
|
||||||
|
.PHONY: googletest
|
||||||
|
googletest: PZSTD_CCXXFLAGS += -fPIC
|
||||||
|
googletest:
|
||||||
|
- @$(RM) -rf googletest
|
||||||
|
- @git clone https://github.com/google/googletest
|
||||||
|
- @mkdir -p googletest/build
|
||||||
|
- @cd googletest/build && cmake $(GTEST_CMAKEFLAGS) -DCMAKE_CXX_FLAGS="$(ALL_CXXFLAGS)" .. && $(MAKE)
|
||||||
|
+ true
|
||||||
|
|
||||||
|
.PHONY: googletest32
|
||||||
|
googletest32: PZSTD_CCXXFLAGS += -m32
|
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\.
|
||||||
|
.
|
12
zstd.changes
12
zstd.changes
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jun 14 11:56:45 UTC 2018 - sweet_f_a@gmx.de
|
||||||
|
|
||||||
|
- fix pzstd tests
|
||||||
|
- add pzstd-global-gtest.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jun 14 08:11:32 UTC 2018 - sweet_f_a@gmx.de
|
||||||
|
|
||||||
|
- enable pzstd (parallel zstd)
|
||||||
|
- add pzstd.1.patch, taken from Fedora package (git 21908004)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu May 24 14:36:12 CEST 2018 - kukuk@suse.de
|
Thu May 24 14:36:12 CEST 2018 - kukuk@suse.de
|
||||||
|
|
||||||
|
24
zstd.spec
24
zstd.spec
@ -15,7 +15,6 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define major 1
|
%define major 1
|
||||||
%define libname lib%{name}%{major}
|
%define libname lib%{name}%{major}
|
||||||
Name: zstd
|
Name: zstd
|
||||||
@ -26,7 +25,12 @@ License: BSD-3-Clause AND GPL-2.0-only
|
|||||||
Group: Productivity/Archiving/Compression
|
Group: Productivity/Archiving/Compression
|
||||||
Url: https://github.com/facebook/zstd
|
Url: https://github.com/facebook/zstd
|
||||||
Source0: https://github.com/facebook/zstd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source0: https://github.com/facebook/zstd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
|
Patch1: pzstd.1.patch
|
||||||
|
Patch2: pzstd-global-gtest.patch
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
|
# C++ is needed for pzstd only
|
||||||
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: googletest-devel
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
@ -76,18 +80,26 @@ Needed for compiling programs that link with the library.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
find -name .gitignore -delete
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
for dir in lib programs; do
|
export CFLAGS="%{optflags}"
|
||||||
CFLAGS="%{optflags}" make %{?_smp_mflags} -C "$dir"
|
export CXXFLAGS="%{optflags} -std=c++11"
|
||||||
|
for dir in lib programs contrib/pzstd; do
|
||||||
|
make %{?_smp_mflags} -C "$dir"
|
||||||
done
|
done
|
||||||
|
|
||||||
%check
|
%check
|
||||||
CFLAGS="%{optflags}" make %{?_smp_mflags} -C tests test-zstd
|
export CFLAGS="%{optflags}"
|
||||||
|
export CXXFLAGS="%{optflags} -std=c++11"
|
||||||
|
make %{?_smp_mflags} -C tests test-zstd
|
||||||
|
make -C contrib/pzstd test-pzstd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir}
|
%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir}
|
||||||
|
install -D -m755 contrib/pzstd/pzstd %{buildroot}%{_bindir}/pzstd
|
||||||
|
install -D -m644 programs/zstd.1 %{buildroot}%{_mandir}/man1/pzstd.1
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
@ -98,9 +110,11 @@ CFLAGS="%{optflags}" make %{?_smp_mflags} -C tests test-zstd
|
|||||||
%{_bindir}/zstdless
|
%{_bindir}/zstdless
|
||||||
%{_bindir}/zstdmt
|
%{_bindir}/zstdmt
|
||||||
%{_bindir}/unzstd
|
%{_bindir}/unzstd
|
||||||
|
%{_bindir}/pzstd
|
||||||
%{_mandir}/man1/zstd.1*
|
%{_mandir}/man1/zstd.1*
|
||||||
%{_mandir}/man1/unzstd.1*
|
%{_mandir}/man1/unzstd.1*
|
||||||
%{_mandir}/man1/zstdcat.1*
|
%{_mandir}/man1/zstdcat.1*
|
||||||
|
%{_mandir}/man1/pzstd.1*
|
||||||
%license COPYING LICENSE
|
%license COPYING LICENSE
|
||||||
|
|
||||||
%files -n %{libname}
|
%files -n %{libname}
|
||||||
|
Loading…
Reference in New Issue
Block a user