Blame SPECS/zstd.spec

7d28bd
%if 0%{?rhel} && 0%{?rhel} <= 6
7d28bd
# gcc-4.4 is currently too old to compile pzstd
7d28bd
%bcond_with pzstd
7d28bd
%else
7d28bd
%ifarch %{ix86} x86_64
7d28bd
%bcond_without pzstd
7d28bd
%else
7d28bd
# aarch64 and armv7hl at least currently segfault
7d28bd
# in ThreadPool test for the pzstd util
7d28bd
%bcond_with pzstd
7d28bd
%endif
7d28bd
%endif
7d28bd
7d28bd
Name:           zstd
5553a5
Version:        1.4.4
5553a5
Release:        1%{?dist}
7d28bd
Summary:        Zstd compression library
7d28bd
7d28bd
License:        BSD and GPLv2
7d28bd
URL:            https://github.com/facebook/zstd
7d28bd
Source0:        https://github.com/facebook/zstd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
7d28bd
7d28bd
Patch1:         pzstd.1.patch
7d28bd
7d28bd
BuildRequires:  gcc gtest-devel
7d28bd
%if %{with pzstd}
7d28bd
BuildRequires:  gcc-c++
7d28bd
%endif
7d28bd
7d28bd
%description
7d28bd
Zstd, short for Zstandard, is a fast lossless compression algorithm,
7d28bd
targeting real-time compression scenarios at zlib-level compression ratio.
7d28bd
7d28bd
%package -n lib%{name}
7d28bd
Summary:        Zstd shared library
7d28bd
7d28bd
%description -n lib%{name}
7d28bd
Zstandard compression shared library.
7d28bd
7d28bd
%package -n lib%{name}-devel
7d28bd
Summary:        Header files for Zstd library
7d28bd
Requires:       lib%{name}%{?_isa} = %{version}-%{release}
7d28bd
7d28bd
%description -n lib%{name}-devel
7d28bd
Header files for Zstd library.
7d28bd
7d28bd
7d28bd
%prep
7d28bd
%setup -q
7d28bd
find -name .gitignore -delete
7d28bd
%if %{with pzstd}
7d28bd
%patch1 -p1
7d28bd
%endif
7d28bd
7d28bd
%build
7d28bd
export CFLAGS="$RPM_OPT_FLAGS"
7d28bd
export LDFLAGS="$RPM_LD_FLAGS"
7d28bd
for dir in lib programs; do
7d28bd
  %make_build -C "$dir"
7d28bd
done
7d28bd
%if %{with pzstd}
7d28bd
export CXXFLAGS="$RPM_OPT_FLAGS -std=c++11"
7d28bd
%make_build -C contrib/pzstd
7d28bd
%endif
7d28bd
7d28bd
%check
7d28bd
export CFLAGS="$RPM_OPT_FLAGS"
7d28bd
export LDFLAGS="$RPM_LD_FLAGS"
7d28bd
make -C tests test-zstd
7d28bd
%if %{with pzstd}
7d28bd
export CXXFLAGS="$RPM_OPT_FLAGS -std=c++11"
7d28bd
make -C contrib/pzstd test
7d28bd
%endif
7d28bd
7d28bd
%install
7d28bd
%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir}
7d28bd
# Don't install the static lib
7d28bd
rm %{buildroot}%{_libdir}/libzstd.a
7d28bd
%if %{with pzstd}
7d28bd
install -D -m755 contrib/pzstd/pzstd %{buildroot}%{_bindir}/pzstd
7d28bd
install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1
7d28bd
%endif
7d28bd
7d28bd
%files
7d28bd
%doc CHANGELOG README.md
7d28bd
%{_bindir}/%{name}
7d28bd
%if %{with pzstd}
7d28bd
%{_bindir}/p%{name}
7d28bd
%{_mandir}/man1/p%{name}.1*
7d28bd
%endif
7d28bd
%{_bindir}/%{name}mt
7d28bd
%{_bindir}/un%{name}
7d28bd
%{_bindir}/%{name}cat
7d28bd
%{_bindir}/%{name}grep
7d28bd
%{_bindir}/%{name}less
7d28bd
%{_mandir}/man1/%{name}.1*
7d28bd
%{_mandir}/man1/un%{name}.1*
7d28bd
%{_mandir}/man1/%{name}cat.1*
7d28bd
%{_mandir}/man1/%{name}grep.1*
7d28bd
%{_mandir}/man1/%{name}less.1*
7d28bd
%license COPYING LICENSE
7d28bd
7d28bd
%files -n lib%{name}
7d28bd
%{_libdir}/libzstd.so.*
7d28bd
%license COPYING LICENSE
7d28bd
7d28bd
%files -n lib%{name}-devel
7d28bd
%{_includedir}/zbuff.h
7d28bd
%{_includedir}/zdict.h
7d28bd
%{_includedir}/zstd.h
7d28bd
%{_includedir}/zstd_errors.h
7d28bd
%{_libdir}/pkgconfig/libzstd.pc
7d28bd
%{_libdir}/libzstd.so
7d28bd
7d28bd
%ldconfig_scriptlets -n lib%{name}
7d28bd
7d28bd
%changelog
5553a5
* Thu Jun 4 2020 Jakub Martisko <jamartis@redhat.com> - 1.4.4-1
5553a5
- Rebase to 1.4.4
5553a5
Resolvese: 1807452
5553a5
7d28bd
* Tue Oct 15 2019 Jakub Martisko <jamartis@redhat.com> - 1.4.2-2
7d28bd
- Add some basic gating tests
7d28bd
7d28bd
* Tue Oct 15 2019 Jakub Martisko <jamartis@redhat.com> - 1.4.2-1
7d28bd
- Initial rhel commit
7d28bd
7d28bd
* Wed Jul 31 2019 Pádraig Brady <P@draigBrady.com> - 1.4.2-1
7d28bd
- Latest upstream
7d28bd
7d28bd
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-2
7d28bd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
7d28bd
7d28bd
* Mon Apr 29 2019 Pádraig Brady <P@draigBrady.com> - 1.4.0-1
7d28bd
- Latest upstream
7d28bd
7d28bd
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.8-2
7d28bd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
7d28bd
7d28bd
* Mon Dec 31 2018 Pádraig Brady <P@draigBrady.com> - 1.3.8-1
7d28bd
- Latest upstream
7d28bd
7d28bd
* Mon Oct 08 2018 Pádraig Brady <P@draigBrady.com> - 1.3.6-1
7d28bd
- Latest upstream
7d28bd
7d28bd
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.5-2
7d28bd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
7d28bd
7d28bd
* Mon Jul 02 2018 Pádraig Brady <P@draigBrady.com> - 1.3.5.1
7d28bd
- Latest upstream
7d28bd
7d28bd
* Wed Mar 28 2018 Pádraig Brady <P@draigBrady.com> - 1.3.4-1
7d28bd
- Latest upstream
7d28bd
7d28bd
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.3-3
7d28bd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
7d28bd
7d28bd
* Fri Feb 02 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3.3-2
7d28bd
- Switch to %%ldconfig_scriptlets
7d28bd
7d28bd
* Thu Dec 21 2017 Pádraig Brady <P@draigBrady.com> - 1.3.3-1
7d28bd
- Latest upstream
7d28bd
7d28bd
* Fri Nov 10 2017 Pádraig Brady <P@draigBrady.com> - 1.3.2-1
7d28bd
- Latest upstream
7d28bd
7d28bd
* Mon Aug 21 2017 Pádraig Brady <P@draigBrady.com> - 1.3.1-1
7d28bd
- Latest upstream
7d28bd
7d28bd
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-3
7d28bd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
7d28bd
7d28bd
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-2
7d28bd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
7d28bd
7d28bd
* Sun Jul 16 2017 Pádraig Brady <P@draigBrady.com> - 1.3.0-1
7d28bd
- Latest upstream
7d28bd
7d28bd
* Mon May 08 2017 Pádraig Brady <P@draigBrady.com> - 1.2.0-1
7d28bd
- Latest upstream
7d28bd
7d28bd
* Mon Mar 06 2017 Pádraig Brady <P@draigBrady.com> - 1.1.3-1
7d28bd
- Latest upstream
7d28bd
7d28bd
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-2
7d28bd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
7d28bd
7d28bd
* Wed Nov 02 2016 Pádraig Brady <pbrady@redhat.com> - 1.1.1-1
7d28bd
- Latest upstream
7d28bd
7d28bd
* Thu Oct 6  2016 Pádraig Brady <pbrady@fb.com> 1.1.0-2
7d28bd
- Add pzstd(1)
7d28bd
7d28bd
* Thu Sep 29 2016 Pádraig Brady <pbrady@fb.com> 1.1.0-1
7d28bd
- New upstream release
7d28bd
- Remove examples and static lib
7d28bd
7d28bd
* Mon Sep 12 2016 Pádraig Brady <pbrady@fb.com> 1.0.0-2
7d28bd
- Adjust various upstream links
7d28bd
- Parameterize various items in spec file
7d28bd
7d28bd
* Mon Sep 5 2016 Pádraig Brady <pbrady@fb.com> 1.0.0-1
7d28bd
- Initial release