2018-02-11 09:45:46 +00:00
|
|
|
%if 0%{?rhel} && 0%{?rhel} <= 6
|
2016-10-06 15:44:41 +00:00
|
|
|
# gcc-4.4 is currently too old to compile pzstd
|
2018-02-11 09:45:46 +00:00
|
|
|
%bcond_with pzstd
|
|
|
|
%else
|
|
|
|
%ifarch %{ix86} x86_64
|
|
|
|
%bcond_without pzstd
|
|
|
|
%else
|
2016-10-06 16:56:56 +00:00
|
|
|
# aarch64 and armv7hl at least currently segfault
|
|
|
|
# in ThreadPool test for the pzstd util
|
2018-02-11 09:45:46 +00:00
|
|
|
%bcond_with pzstd
|
2016-10-06 15:44:41 +00:00
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
2016-10-03 14:17:14 +00:00
|
|
|
Name: zstd
|
2020-12-17 15:42:17 +00:00
|
|
|
Version: 1.4.7
|
|
|
|
Release: 1%{?dist}
|
2016-10-03 14:17:14 +00:00
|
|
|
Summary: Zstd compression library
|
|
|
|
|
2018-03-14 19:07:00 +00:00
|
|
|
License: BSD and GPLv2
|
2016-10-03 14:17:14 +00:00
|
|
|
URL: https://github.com/facebook/zstd
|
|
|
|
Source0: https://github.com/facebook/zstd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
|
|
|
2016-10-06 12:37:39 +00:00
|
|
|
Patch1: pzstd.1.patch
|
2020-12-18 14:19:43 +00:00
|
|
|
Patch2: alignment.patch
|
2016-10-03 14:17:14 +00:00
|
|
|
|
2021-01-12 01:55:56 +00:00
|
|
|
BuildRequires: make
|
2016-10-06 12:37:39 +00:00
|
|
|
BuildRequires: gcc gtest-devel
|
2018-02-11 09:45:46 +00:00
|
|
|
%if %{with pzstd}
|
2018-02-11 09:43:56 +00:00
|
|
|
BuildRequires: gcc-c++
|
|
|
|
%endif
|
2016-10-03 14:17:14 +00:00
|
|
|
|
|
|
|
%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}
|
|
|
|
|
2020-05-22 07:54:30 +00:00
|
|
|
%package -n lib%{name}-static
|
|
|
|
Summary: Static variant of the Zstd library
|
|
|
|
Requires: lib%{name}-devel = %{version}-%{release}
|
|
|
|
|
2016-10-03 14:17:14 +00:00
|
|
|
%description -n lib%{name}-devel
|
|
|
|
Header files for Zstd library.
|
|
|
|
|
2020-05-22 07:54:30 +00:00
|
|
|
%description -n lib%{name}-static
|
|
|
|
Static variant of the Zstd library.
|
2016-10-03 14:17:14 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
find -name .gitignore -delete
|
2018-02-11 09:45:46 +00:00
|
|
|
%if %{with pzstd}
|
2016-10-06 12:37:39 +00:00
|
|
|
%patch1 -p1
|
2016-10-06 15:44:41 +00:00
|
|
|
%endif
|
2020-12-18 14:19:43 +00:00
|
|
|
%patch2 -p1
|
2016-10-03 14:17:14 +00:00
|
|
|
|
|
|
|
%build
|
2018-02-11 09:44:15 +00:00
|
|
|
export CFLAGS="$RPM_OPT_FLAGS"
|
|
|
|
export LDFLAGS="$RPM_LD_FLAGS"
|
2020-07-11 17:28:32 +00:00
|
|
|
%make_build -C lib lib-mt
|
|
|
|
%make_build -C programs
|
2018-02-11 09:45:46 +00:00
|
|
|
%if %{with pzstd}
|
2020-08-26 20:24:56 +00:00
|
|
|
export CXXFLAGS="$RPM_OPT_FLAGS"
|
2018-02-11 09:44:15 +00:00
|
|
|
%make_build -C contrib/pzstd
|
2016-10-06 15:44:41 +00:00
|
|
|
%endif
|
2016-10-03 14:17:14 +00:00
|
|
|
|
|
|
|
%check
|
2018-02-11 09:44:15 +00:00
|
|
|
export CFLAGS="$RPM_OPT_FLAGS"
|
|
|
|
export LDFLAGS="$RPM_LD_FLAGS"
|
|
|
|
make -C tests test-zstd
|
2018-02-11 09:45:46 +00:00
|
|
|
%if %{with pzstd}
|
2020-08-26 20:24:56 +00:00
|
|
|
export CXXFLAGS="$RPM_OPT_FLAGS"
|
2018-02-11 09:44:15 +00:00
|
|
|
make -C contrib/pzstd test
|
2016-10-06 15:44:41 +00:00
|
|
|
%endif
|
2016-10-03 14:17:14 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir}
|
2018-02-11 09:45:46 +00:00
|
|
|
%if %{with pzstd}
|
2018-02-11 09:46:24 +00:00
|
|
|
install -D -m755 contrib/pzstd/pzstd %{buildroot}%{_bindir}/pzstd
|
|
|
|
install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1
|
2016-10-06 15:44:41 +00:00
|
|
|
%endif
|
2016-10-03 14:17:14 +00:00
|
|
|
|
|
|
|
%files
|
2018-12-31 19:54:15 +00:00
|
|
|
%doc CHANGELOG README.md
|
2016-10-03 14:17:14 +00:00
|
|
|
%{_bindir}/%{name}
|
2018-02-11 09:45:46 +00:00
|
|
|
%if %{with pzstd}
|
2016-10-06 12:37:39 +00:00
|
|
|
%{_bindir}/p%{name}
|
2016-10-06 15:44:41 +00:00
|
|
|
%{_mandir}/man1/p%{name}.1*
|
|
|
|
%endif
|
2017-05-08 13:48:12 +00:00
|
|
|
%{_bindir}/%{name}mt
|
2016-10-03 14:17:14 +00:00
|
|
|
%{_bindir}/un%{name}
|
|
|
|
%{_bindir}/%{name}cat
|
2018-12-31 19:54:15 +00:00
|
|
|
%{_bindir}/%{name}grep
|
|
|
|
%{_bindir}/%{name}less
|
2016-10-03 14:17:14 +00:00
|
|
|
%{_mandir}/man1/%{name}.1*
|
|
|
|
%{_mandir}/man1/un%{name}.1*
|
|
|
|
%{_mandir}/man1/%{name}cat.1*
|
2018-12-31 19:54:15 +00:00
|
|
|
%{_mandir}/man1/%{name}grep.1*
|
|
|
|
%{_mandir}/man1/%{name}less.1*
|
2018-02-11 09:48:25 +00:00
|
|
|
%license COPYING LICENSE
|
2016-10-03 14:17:14 +00:00
|
|
|
|
|
|
|
%files -n lib%{name}
|
|
|
|
%{_libdir}/libzstd.so.*
|
2018-02-11 09:48:25 +00:00
|
|
|
%license COPYING LICENSE
|
2016-10-03 14:17:14 +00:00
|
|
|
|
|
|
|
%files -n lib%{name}-devel
|
|
|
|
%{_includedir}/zdict.h
|
|
|
|
%{_includedir}/zstd.h
|
2016-11-02 12:52:36 +00:00
|
|
|
%{_includedir}/zstd_errors.h
|
2016-10-03 14:17:14 +00:00
|
|
|
%{_libdir}/pkgconfig/libzstd.pc
|
|
|
|
%{_libdir}/libzstd.so
|
|
|
|
|
2020-05-22 07:54:30 +00:00
|
|
|
%files -n lib%{name}-static
|
|
|
|
%{_libdir}/libzstd.a
|
|
|
|
|
2018-02-02 10:17:30 +00:00
|
|
|
%ldconfig_scriptlets -n lib%{name}
|
2016-10-03 14:17:14 +00:00
|
|
|
|
|
|
|
%changelog
|
2020-12-17 15:42:17 +00:00
|
|
|
* Thu Dec 17 2020 Pádraig Brady <P@draigBrady.com> - 1.4.7-1
|
|
|
|
- Latest upstream
|
|
|
|
|
2020-08-26 20:24:56 +00:00
|
|
|
* Wed Aug 26 2020 Jeff Law <law@redhat.com> - 1.4.5-6
|
|
|
|
- Do not force C++11 mode
|
|
|
|
|
2020-07-29 15:28:00 +00:00
|
|
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5-5
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
2020-07-11 17:28:32 +00:00
|
|
|
* Sat Jul 11 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.4.5-4
|
|
|
|
- Build libzstd with multi-threading support
|
|
|
|
|
2020-05-25 14:12:51 +00:00
|
|
|
* Mon May 25 2020 Pádraig Brady <P@draigBrady.com> - 1.4.5-3
|
2020-05-25 12:22:39 +00:00
|
|
|
- Build shared library with correct compiler flags
|
|
|
|
|
2020-05-22 12:36:07 +00:00
|
|
|
* Fri May 22 2020 Pádraig Brady <P@draigBrady.com> - 1.4.5-1
|
|
|
|
- Latest upstream
|
|
|
|
|
2020-05-22 07:54:30 +00:00
|
|
|
* Fri May 22 2020 Avi Kivity <avi@scylladb.com> - 1.4.4-3
|
|
|
|
- Added static library subpackage
|
|
|
|
|
2020-01-31 05:24:24 +00:00
|
|
|
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.4-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
2020-01-15 14:22:44 +00:00
|
|
|
* Wed Jan 15 2020 Pádraig Brady <P@draigBrady.com> - 1.4.4-1
|
|
|
|
- Latest upstream
|
|
|
|
|
2019-07-31 14:31:17 +00:00
|
|
|
* Wed Jul 31 2019 Pádraig Brady <P@draigBrady.com> - 1.4.2-1
|
|
|
|
- Latest upstream
|
|
|
|
|
2019-07-27 05:05:35 +00:00
|
|
|
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
2019-04-29 16:15:45 +00:00
|
|
|
* Mon Apr 29 2019 Pádraig Brady <P@draigBrady.com> - 1.4.0-1
|
|
|
|
- Latest upstream
|
|
|
|
|
2019-02-03 13:15:36 +00:00
|
|
|
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.8-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
2018-12-31 19:54:15 +00:00
|
|
|
* Mon Dec 31 2018 Pádraig Brady <P@draigBrady.com> - 1.3.8-1
|
|
|
|
- Latest upstream
|
|
|
|
|
2018-10-08 02:04:25 +00:00
|
|
|
* Mon Oct 08 2018 Pádraig Brady <P@draigBrady.com> - 1.3.6-1
|
|
|
|
- Latest upstream
|
|
|
|
|
2018-07-14 09:53:39 +00:00
|
|
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.5-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
2018-07-02 03:13:26 +00:00
|
|
|
* Mon Jul 02 2018 Pádraig Brady <P@draigBrady.com> - 1.3.5.1
|
|
|
|
- Latest upstream
|
|
|
|
|
2018-03-28 05:05:46 +00:00
|
|
|
* Wed Mar 28 2018 Pádraig Brady <P@draigBrady.com> - 1.3.4-1
|
|
|
|
- Latest upstream
|
|
|
|
|
2018-02-09 22:32:44 +00:00
|
|
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.3-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
|
2018-02-02 10:17:30 +00:00
|
|
|
* Fri Feb 02 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3.3-2
|
|
|
|
- Switch to %%ldconfig_scriptlets
|
|
|
|
|
2017-12-21 16:41:04 +00:00
|
|
|
* Thu Dec 21 2017 Pádraig Brady <P@draigBrady.com> - 1.3.3-1
|
|
|
|
- Latest upstream
|
|
|
|
|
2017-11-10 06:41:59 +00:00
|
|
|
* Fri Nov 10 2017 Pádraig Brady <P@draigBrady.com> - 1.3.2-1
|
|
|
|
- Latest upstream
|
|
|
|
|
2017-08-21 00:37:28 +00:00
|
|
|
* Mon Aug 21 2017 Pádraig Brady <P@draigBrady.com> - 1.3.1-1
|
|
|
|
- Latest upstream
|
|
|
|
|
2017-08-03 11:13:53 +00:00
|
|
|
* 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
|
|
|
|
|
2017-07-27 22:46:32 +00:00
|
|
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
|
|
2017-07-16 03:39:39 +00:00
|
|
|
* Sun Jul 16 2017 Pádraig Brady <P@draigBrady.com> - 1.3.0-1
|
|
|
|
- Latest upstream
|
|
|
|
|
2017-05-08 13:48:12 +00:00
|
|
|
* Mon May 08 2017 Pádraig Brady <P@draigBrady.com> - 1.2.0-1
|
|
|
|
- Latest upstream
|
|
|
|
|
2017-03-06 03:52:50 +00:00
|
|
|
* Mon Mar 06 2017 Pádraig Brady <P@draigBrady.com> - 1.1.3-1
|
|
|
|
- Latest upstream
|
|
|
|
|
2017-02-11 18:27:23 +00:00
|
|
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
|
|
2016-11-02 12:52:36 +00:00
|
|
|
* Wed Nov 02 2016 Pádraig Brady <pbrady@redhat.com> - 1.1.1-1
|
|
|
|
- Latest upstream
|
|
|
|
|
2016-10-06 12:37:39 +00:00
|
|
|
* Thu Oct 6 2016 Pádraig Brady <pbrady@fb.com> 1.1.0-2
|
|
|
|
- Add pzstd(1)
|
|
|
|
|
2016-10-03 14:17:14 +00:00
|
|
|
* 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
|