zstd/zstd.spec

166 lines
4.2 KiB
RPMSpec
Raw Normal View History

%if 0%{?rhel} && 0%{?rhel} <= 6
# gcc-4.4 is currently too old to compile pzstd
%bcond_with pzstd
%else
%ifarch %{ix86} x86_64
%bcond_without pzstd
%else
# aarch64 and armv7hl at least currently segfault
# in ThreadPool test for the pzstd util
%bcond_with pzstd
%endif
%endif
2016-10-03 14:17:14 +00:00
Name: zstd
2017-12-21 16:41:04 +00:00
Version: 1.3.3
Release: 3%{?dist}
2016-10-03 14:17:14 +00:00
Summary: Zstd compression library
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
Patch1: pzstd.1.patch
2016-10-03 14:17:14 +00:00
BuildRequires: gcc gtest-devel
%if %{with pzstd}
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}
%description -n lib%{name}-devel
Header files for Zstd library.
%prep
%setup -q
find -name .gitignore -delete
%if %{with pzstd}
%patch1 -p1
%endif
2016-10-03 14:17:14 +00:00
%build
export CFLAGS="$RPM_OPT_FLAGS"
export LDFLAGS="$RPM_LD_FLAGS"
2016-10-03 14:17:14 +00:00
for dir in lib programs; do
%make_build -C "$dir"
2016-10-03 14:17:14 +00:00
done
%if %{with pzstd}
export CXXFLAGS="$RPM_OPT_FLAGS -std=c++11"
%make_build -C contrib/pzstd
%endif
2016-10-03 14:17:14 +00:00
%check
export CFLAGS="$RPM_OPT_FLAGS"
export LDFLAGS="$RPM_LD_FLAGS"
make -C tests test-zstd
%if %{with pzstd}
export CXXFLAGS="$RPM_OPT_FLAGS -std=c++11"
make -C contrib/pzstd test
%endif
2016-10-03 14:17:14 +00:00
%install
%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir}
2017-03-06 03:52:50 +00:00
# Remove undocumented wrappers of minimal use
rm %{buildroot}%{_bindir}/%{name}less
rm %{buildroot}%{_bindir}/%{name}grep
2017-03-06 03:52:50 +00:00
# Don't install the static lib
rm %{buildroot}%{_libdir}/libzstd.a
%if %{with pzstd}
install -D -m755 contrib/pzstd/pzstd %{buildroot}%{_bindir}/pzstd
install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1
%endif
2016-10-03 14:17:14 +00:00
%files
%doc NEWS README.md
%{_bindir}/%{name}
%if %{with pzstd}
%{_bindir}/p%{name}
%{_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
%{_mandir}/man1/%{name}.1*
%{_mandir}/man1/un%{name}.1*
%{_mandir}/man1/%{name}cat.1*
2017-08-21 00:37:28 +00:00
%license LICENSE
2016-10-03 14:17:14 +00:00
%files -n lib%{name}
%{_libdir}/libzstd.so.*
2017-08-21 00:37:28 +00:00
%license LICENSE
2016-10-03 14:17:14 +00:00
%files -n lib%{name}-devel
%{_includedir}/zbuff.h
%{_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
%ldconfig_scriptlets -n lib%{name}
2016-10-03 14:17:14 +00:00
%changelog
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* 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
* 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
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
* 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
* 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