192 lines
5.2 KiB
RPMSpec
192 lines
5.2 KiB
RPMSpec
# gcc-4.4 is currently too old to compile pzstd
|
|
%if 0%{?fedora} || 0%{?rhel} > 6
|
|
# aarch64 and armv7hl at least currently segfault
|
|
# in ThreadPool test for the pzstd util
|
|
%ifarch %{ix86} x86_64
|
|
%global with_pzstd 1
|
|
%endif
|
|
%endif
|
|
|
|
Name: zstd
|
|
Version: 1.4.5
|
|
Release: 3%{?dist}
|
|
Summary: Zstd compression library
|
|
|
|
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
|
|
|
|
Patch1: pzstd.1.patch
|
|
Patch2: lib-make.patch
|
|
|
|
BuildRequires: gcc gtest-devel
|
|
|
|
%description
|
|
Zstd, short for Zstandard, is a fast lossless compression algorithm,
|
|
targeting real-time compression scenarios at zlib-level compression ratio.
|
|
|
|
%package -n lib%{name}
|
|
Summary: Zstd shared library
|
|
|
|
%description -n lib%{name}
|
|
Zstandard compression shared library.
|
|
|
|
%package -n lib%{name}-devel
|
|
Summary: Header files for Zstd library
|
|
Requires: lib%{name}%{?_isa} = %{version}-%{release}
|
|
|
|
%package -n lib%{name}-static
|
|
Summary: Static variant of the Zstd library
|
|
Requires: lib%{name}-devel = %{version}-%{release}
|
|
|
|
%description -n lib%{name}-devel
|
|
Header files for Zstd library.
|
|
|
|
%description -n lib%{name}-static
|
|
Static variant of the Zstd library.
|
|
|
|
%prep
|
|
%setup -q
|
|
find -name .gitignore -delete
|
|
%if 0%{?with_pzstd}
|
|
%patch1 -p1
|
|
%endif
|
|
%patch2 -p1
|
|
|
|
%build
|
|
%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;}
|
|
export LDFLAGS="$LDFLAGS -lrt"
|
|
for dir in lib programs; do
|
|
CFLAGS="%{optflags}" %make_build -C "$dir"
|
|
done
|
|
%if 0%{?with_pzstd}
|
|
CFLAGS="%{optflags}" CXXFLAGS="%{optflags} -std=c++11" %make_build -C 'contrib/pzstd'
|
|
%endif
|
|
|
|
%check
|
|
%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;}
|
|
export LDFLAGS="$LDFLAGS -lrt"
|
|
CFLAGS="%{optflags}" make -C tests test-zstd
|
|
%if 0%{?with_pzstd}
|
|
CFLAGS="%{optflags}" CXXFLAGS="%{optflags} -std=c++11" make -C contrib/pzstd test
|
|
%endif
|
|
|
|
%install
|
|
%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir}
|
|
%if 0%{?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
|
|
|
|
%files
|
|
%doc CHANGELOG README.md
|
|
%{_bindir}/%{name}
|
|
%if 0%{?with_pzstd}
|
|
%{_bindir}/p%{name}
|
|
%{_mandir}/man1/p%{name}.1*
|
|
%endif
|
|
%{_bindir}/%{name}mt
|
|
%{_bindir}/un%{name}
|
|
%{_bindir}/%{name}cat
|
|
%{_bindir}/%{name}grep
|
|
%{_bindir}/%{name}less
|
|
%{_mandir}/man1/%{name}.1*
|
|
%{_mandir}/man1/un%{name}.1*
|
|
%{_mandir}/man1/%{name}cat.1*
|
|
%{_mandir}/man1/%{name}grep.1*
|
|
%{_mandir}/man1/%{name}less.1*
|
|
%license LICENSE
|
|
|
|
%files -n lib%{name}
|
|
%{_libdir}/libzstd.so.*
|
|
%license LICENSE
|
|
|
|
%files -n lib%{name}-devel
|
|
%{_includedir}/zbuff.h
|
|
%{_includedir}/zdict.h
|
|
%{_includedir}/zstd.h
|
|
%{_includedir}/zstd_errors.h
|
|
%{_libdir}/pkgconfig/libzstd.pc
|
|
%{_libdir}/libzstd.so
|
|
|
|
%post -n lib%{name} -p /sbin/ldconfig
|
|
%postun -n lib%{name} -p /sbin/ldconfig
|
|
|
|
%files -n lib%{name}-static
|
|
%{_libdir}/libzstd.a
|
|
|
|
%changelog
|
|
* Mon May 25 2020 Pádraig Brady <P@draigBrady.com> - 1.4.5-3
|
|
- Build shared library with correct compiler flags
|
|
|
|
* Fri May 22 2020 Pádraig Brady <P@draigBrady.com> - 1.4.5-1
|
|
- Latest upstream
|
|
|
|
* Fri May 22 2020 Avi Kivity <avi@scylladb.com> - 1.4.4-3
|
|
- Added static library subpackage
|
|
|
|
* Wed Jan 15 2020 Pádraig Brady <P@draigBrady.com> - 1.4.4-1
|
|
- Latest upstream
|
|
|
|
* Wed Jul 31 2019 Pádraig Brady <P@draigBrady.com> - 1.4.2-1
|
|
- Latest upstream
|
|
|
|
* Mon Apr 29 2019 Pádraig Brady <P@draigBrady.com> - 1.4.0-1
|
|
- Latest upstream
|
|
|
|
* Mon Dec 31 2018 Pádraig Brady <P@draigBrady.com> - 1.3.8-1
|
|
- Latest upstream
|
|
|
|
* Mon Oct 08 2018 Pádraig Brady <P@draigBrady.com> - 1.3.6-1
|
|
- Latest upstream
|
|
|
|
* Mon Jul 02 2018 Pádraig Brady <P@draigBrady.com> - 1.3.5.1
|
|
- Latest upstream
|
|
|
|
* Wed Mar 28 2018 Pádraig Brady <P@draigBrady.com> - 1.3.4-1
|
|
- Latest upstream
|
|
|
|
* Thu Dec 21 2017 Pádraig Brady <P@draigBrady.com> - 1.3.3-1
|
|
- Latest upstream
|
|
|
|
* Fri Nov 10 2017 Pádraig Brady <P@draigBrady.com> - 1.3.2-1
|
|
- Latest upstream
|
|
|
|
* Mon Aug 21 2017 Pádraig Brady <P@draigBrady.com> - 1.3.1-1
|
|
- Latest upstream
|
|
|
|
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
|
* Sun Jul 16 2017 Pádraig Brady <P@draigBrady.com> - 1.3.0-1
|
|
- Latest upstream
|
|
|
|
* Mon May 08 2017 Pádraig Brady <P@draigBrady.com> - 1.2.0-1
|
|
- Latest upstream
|
|
|
|
* Mon Mar 06 2017 Pádraig Brady <P@draigBrady.com> - 1.1.3-1
|
|
- Latest upstream
|
|
|
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
|
* Wed Nov 02 2016 Pádraig Brady <pbrady@redhat.com> - 1.1.1-1
|
|
- Latest upstream
|
|
|
|
* Thu Oct 6 2016 Pádraig Brady <pbrady@fb.com> 1.1.0-2
|
|
- Add pzstd(1)
|
|
|
|
* Thu Sep 29 2016 Pádraig Brady <pbrady@fb.com> 1.1.0-1
|
|
- New upstream release
|
|
- Remove examples and static lib
|
|
|
|
* Mon Sep 12 2016 Pádraig Brady <pbrady@fb.com> 1.0.0-2
|
|
- Adjust various upstream links
|
|
- Parameterize various items in spec file
|
|
|
|
* Mon Sep 5 2016 Pádraig Brady <pbrady@fb.com> 1.0.0-1
|
|
- Initial release
|