Accepting request 616852 from home:rudi_m
- enable pzstd (parallel zstd) - add pzstd.1.patch, taken from Fedora package (git 21908004) - fix pzstd tests - add pzstd-global-gtest.patch Note, in earlier submit request the pzstd tests were empty. OBS-URL: https://build.opensuse.org/request/show/616852 OBS-URL: https://build.opensuse.org/package/show/Archiving/zstd?expand=0&rev=20
This commit is contained in:
committed by
Git OBS Bridge
parent
2311cbef6f
commit
f68095d641
24
zstd.spec
24
zstd.spec
@@ -15,7 +15,6 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define major 1
|
||||
%define libname lib%{name}%{major}
|
||||
Name: zstd
|
||||
@@ -26,7 +25,12 @@ License: BSD-3-Clause AND GPL-2.0-only
|
||||
Group: Productivity/Archiving/Compression
|
||||
Url: https://github.com/facebook/zstd
|
||||
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
|
||||
# C++ is needed for pzstd only
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: googletest-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
@@ -76,18 +80,26 @@ Needed for compiling programs that link with the library.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
find -name .gitignore -delete
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
for dir in lib programs; do
|
||||
CFLAGS="%{optflags}" make %{?_smp_mflags} -C "$dir"
|
||||
export CFLAGS="%{optflags}"
|
||||
export CXXFLAGS="%{optflags} -std=c++11"
|
||||
for dir in lib programs contrib/pzstd; do
|
||||
make %{?_smp_mflags} -C "$dir"
|
||||
done
|
||||
|
||||
%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
|
||||
%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
|
||||
%defattr(-,root,root,-)
|
||||
@@ -98,9 +110,11 @@ CFLAGS="%{optflags}" make %{?_smp_mflags} -C tests test-zstd
|
||||
%{_bindir}/zstdless
|
||||
%{_bindir}/zstdmt
|
||||
%{_bindir}/unzstd
|
||||
%{_bindir}/pzstd
|
||||
%{_mandir}/man1/zstd.1*
|
||||
%{_mandir}/man1/unzstd.1*
|
||||
%{_mandir}/man1/zstdcat.1*
|
||||
%{_mandir}/man1/pzstd.1*
|
||||
%license COPYING LICENSE
|
||||
|
||||
%files -n %{libname}
|
||||
|
Reference in New Issue
Block a user