exclude pzstd on rhel6 and aarch64
gcc-4.4 is tool old to compile pzstd (c++11) aarch64 is currently giving a segfault in ThreadPool tests
This commit is contained in:
parent
dd6c13081e
commit
4171324dcf
22
zstd.spec
22
zstd.spec
@ -1,3 +1,11 @@
|
|||||||
|
# gcc-4.4 is currently too old to compile pzstd
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} > 6
|
||||||
|
# aarch64 currently gives a segfault in ThreadPool test
|
||||||
|
%ifnarch aarch64
|
||||||
|
%global with_pzstd 1
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: zstd
|
Name: zstd
|
||||||
Version: 1.1.0
|
Version: 1.1.0
|
||||||
Release: 2%{?dist}
|
Release: 2%{?dist}
|
||||||
@ -38,7 +46,9 @@ Header files for Zstd library.
|
|||||||
%setup -q
|
%setup -q
|
||||||
find -name .gitignore -delete
|
find -name .gitignore -delete
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%if 0%{?with_pzstd}
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%endif
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -46,27 +56,35 @@ find -name .gitignore -delete
|
|||||||
for dir in lib programs; do
|
for dir in lib programs; do
|
||||||
CFLAGS="%{optflags}" %make_build -C "$dir"
|
CFLAGS="%{optflags}" %make_build -C "$dir"
|
||||||
done
|
done
|
||||||
|
%if 0%{?with_pzstd}
|
||||||
CXXFLAGS="%{optflags}" %make_build -C 'contrib/pzstd'
|
CXXFLAGS="%{optflags}" %make_build -C 'contrib/pzstd'
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;}
|
%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;}
|
||||||
CFLAGS="%{optflags}" make -C tests test-zstd
|
CFLAGS="%{optflags}" make -C tests test-zstd
|
||||||
|
%if 0%{?with_pzstd}
|
||||||
CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" make -C contrib/pzstd test
|
CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" make -C contrib/pzstd test
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir}
|
%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir}
|
||||||
|
rm %{buildroot}/%{_libdir}/libzstd.a
|
||||||
|
%if 0%{?with_pzstd}
|
||||||
install -D -m755 contrib/pzstd/pzstd %{buildroot}/usr/bin/pzstd
|
install -D -m755 contrib/pzstd/pzstd %{buildroot}/usr/bin/pzstd
|
||||||
install -D -m644 programs/%{name}.1 %{buildroot}/%{_mandir}/man1/p%{name}.1
|
install -D -m644 programs/%{name}.1 %{buildroot}/%{_mandir}/man1/p%{name}.1
|
||||||
rm %{buildroot}/%{_libdir}/libzstd.a
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc NEWS README.md
|
%doc NEWS README.md
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
|
%if 0%{?with_pzstd}
|
||||||
%{_bindir}/p%{name}
|
%{_bindir}/p%{name}
|
||||||
|
%{_mandir}/man1/p%{name}.1*
|
||||||
|
%endif
|
||||||
%{_bindir}/un%{name}
|
%{_bindir}/un%{name}
|
||||||
%{_bindir}/%{name}cat
|
%{_bindir}/%{name}cat
|
||||||
%{_mandir}/man1/%{name}.1*
|
%{_mandir}/man1/%{name}.1*
|
||||||
%{_mandir}/man1/p%{name}.1*
|
|
||||||
%{_mandir}/man1/un%{name}.1*
|
%{_mandir}/man1/un%{name}.1*
|
||||||
%{_mandir}/man1/%{name}cat.1*
|
%{_mandir}/man1/%{name}cat.1*
|
||||||
%license LICENSE PATENTS
|
%license LICENSE PATENTS
|
||||||
|
Loading…
Reference in New Issue
Block a user