Blame SPECS/zstd.spec

Michel Alexandre Salim 1043b8
# enable .lz4 support by default
Michel Alexandre Salim 1043b8
%bcond_without lz4
Michel Alexandre Salim 1043b8
Michel Alexandre Salim 1043b8
# enable .xz/.lzma support by default
Michel Alexandre Salim 1043b8
%bcond_without lzma
Michel Alexandre Salim 1043b8
Michel Alexandre Salim 1043b8
# enable .gz support by default
Michel Alexandre Salim 1043b8
%bcond_without zlib
Michel Alexandre Salim 1043b8
465b0c
%if 0%{?rhel} && 0%{?rhel} <= 6
465b0c
# gcc-4.4 is currently too old to compile pzstd
465b0c
%bcond_with pzstd
465b0c
%else
465b0c
%ifarch %{ix86} x86_64
465b0c
%bcond_without pzstd
465b0c
%else
465b0c
# aarch64 and armv7hl at least currently segfault
465b0c
# in ThreadPool test for the pzstd util
465b0c
%bcond_with pzstd
465b0c
%endif
465b0c
%endif
465b0c
Michel Alexandre Salim 1043b8
%ifarch x86_64
Michel Alexandre Salim 1043b8
%bcond_without asm
Michel Alexandre Salim 1043b8
%else
Michel Alexandre Salim 1043b8
# Disable asm to ensure non excutable stack
Michel Alexandre Salim 1043b8
# used on archs where asm not actually used
Michel Alexandre Salim 1043b8
# https://github.com/facebook/zstd/issues/2963
Michel Alexandre Salim 1043b8
%bcond_with asm
Michel Alexandre Salim 1043b8
%endif
Michel Alexandre Salim 1043b8
465b0c
Name:           zstd
Michel Alexandre Salim 1043b8
Version:        1.5.1
Michel Alexandre Salim 1043b8
Release:        5%{?dist}
465b0c
Summary:        Zstd compression library
465b0c
465b0c
License:        BSD and GPLv2
465b0c
URL:            https://github.com/facebook/zstd
465b0c
Source0:        https://github.com/facebook/zstd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
465b0c
465b0c
Patch1:         pzstd.1.patch
465b0c
Michel Alexandre Salim 1043b8
BuildRequires:  make
465b0c
BuildRequires:  gcc gtest-devel
Michel Alexandre Salim 1043b8
%if %{with lz4}
Michel Alexandre Salim 1043b8
BuildRequires:  lz4-devel
Michel Alexandre Salim 1043b8
%endif
Michel Alexandre Salim 1043b8
%if %{with lzma}
Michel Alexandre Salim 1043b8
BuildRequires:  xz-devel
Michel Alexandre Salim 1043b8
%endif
465b0c
%if %{with pzstd}
465b0c
BuildRequires:  gcc-c++
465b0c
%endif
Michel Alexandre Salim 1043b8
%if %{with zlib}
Michel Alexandre Salim 1043b8
BuildRequires:  zlib-devel
Michel Alexandre Salim 1043b8
%endif
Michel Alexandre Salim 1043b8
BuildRequires:  execstack
465b0c
465b0c
%description
465b0c
Zstd, short for Zstandard, is a fast lossless compression algorithm,
465b0c
targeting real-time compression scenarios at zlib-level compression ratio.
465b0c
465b0c
%package -n lib%{name}
465b0c
Summary:        Zstd shared library
465b0c
465b0c
%description -n lib%{name}
465b0c
Zstandard compression shared library.
465b0c
465b0c
%package -n lib%{name}-devel
465b0c
Summary:        Header files for Zstd library
465b0c
Requires:       lib%{name}%{?_isa} = %{version}-%{release}
465b0c
465b0c
%package -n lib%{name}-static
465b0c
Summary:        Static variant of the Zstd library
465b0c
Requires:       lib%{name}-devel = %{version}-%{release}
465b0c
465b0c
%description -n lib%{name}-devel
465b0c
Header files for Zstd library.
465b0c
465b0c
%description -n lib%{name}-static
465b0c
Static variant of the Zstd library.
465b0c
465b0c
%prep
465b0c
%setup -q
465b0c
find -name .gitignore -delete
465b0c
%if %{with pzstd}
465b0c
%patch1 -p1
465b0c
%endif
465b0c
465b0c
%build
465b0c
export CFLAGS="$RPM_OPT_FLAGS"
465b0c
export LDFLAGS="$RPM_LD_FLAGS"
Michel Alexandre Salim 1043b8
export PREFIX="%{_prefix}"
Michel Alexandre Salim 1043b8
export LIBDIR="%{_libdir}"
Michel Alexandre Salim 1043b8
%make_build -C lib lib-mt %{!?with_asm:ZSTD_NO_ASM=1}
Michel Alexandre Salim 1043b8
%make_build -C programs %{!?with_asm:ZSTD_NO_ASM=1}
465b0c
%if %{with pzstd}
465b0c
export CXXFLAGS="$RPM_OPT_FLAGS"
Michel Alexandre Salim 1043b8
%make_build -C contrib/pzstd %{!?with_asm:ZSTD_NO_ASM=1}
465b0c
%endif
465b0c
465b0c
%check
Michel Alexandre Salim 1043b8
execstack lib/libzstd.so.1
Michel Alexandre Salim 1043b8
465b0c
export CFLAGS="$RPM_OPT_FLAGS"
465b0c
export LDFLAGS="$RPM_LD_FLAGS"
465b0c
make -C tests test-zstd
465b0c
%if %{with pzstd}
465b0c
export CXXFLAGS="$RPM_OPT_FLAGS"
465b0c
make -C contrib/pzstd test
465b0c
%endif
465b0c
465b0c
%install
465b0c
%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir}
465b0c
%if %{with pzstd}
465b0c
install -D -m755 contrib/pzstd/pzstd %{buildroot}%{_bindir}/pzstd
465b0c
install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1
465b0c
%endif
465b0c
465b0c
%files
465b0c
%doc CHANGELOG README.md
465b0c
%{_bindir}/%{name}
465b0c
%if %{with pzstd}
465b0c
%{_bindir}/p%{name}
465b0c
%{_mandir}/man1/p%{name}.1*
465b0c
%endif
465b0c
%{_bindir}/%{name}mt
465b0c
%{_bindir}/un%{name}
465b0c
%{_bindir}/%{name}cat
465b0c
%{_bindir}/%{name}grep
465b0c
%{_bindir}/%{name}less
465b0c
%{_mandir}/man1/%{name}.1*
465b0c
%{_mandir}/man1/un%{name}.1*
465b0c
%{_mandir}/man1/%{name}cat.1*
465b0c
%{_mandir}/man1/%{name}grep.1*
465b0c
%{_mandir}/man1/%{name}less.1*
465b0c
%license COPYING LICENSE
465b0c
465b0c
%files -n lib%{name}
465b0c
%{_libdir}/libzstd.so.*
465b0c
%license COPYING LICENSE
465b0c
465b0c
%files -n lib%{name}-devel
465b0c
%{_includedir}/zdict.h
465b0c
%{_includedir}/zstd.h
465b0c
%{_includedir}/zstd_errors.h
465b0c
%{_libdir}/pkgconfig/libzstd.pc
465b0c
%{_libdir}/libzstd.so
465b0c
465b0c
%files -n lib%{name}-static
465b0c
%{_libdir}/libzstd.a
465b0c
465b0c
%ldconfig_scriptlets -n lib%{name}
465b0c
465b0c
%changelog
Michel Alexandre Salim 1043b8
* Fri Jan 07 2022 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.5.1-5
Michel Alexandre Salim 1043b8
- Enable gz, .xz/.lzma and .lz4 support
Michel Alexandre Salim 1043b8
Michel Alexandre Salim 1043b8
* Mon Jan 03 2022 Pádraig Brady <P@draigBrady.com> - 1.5.1-4
Michel Alexandre Salim 1043b8
- Use correct prefix for pkgconfig.
Michel Alexandre Salim 1043b8
Michel Alexandre Salim 1043b8
* Wed Dec 29 2021 Pádraig Brady <P@draigBrady.com> - 1.5.1-3
Michel Alexandre Salim 1043b8
- Avoid executable stack on i686 also.
Michel Alexandre Salim 1043b8
Michel Alexandre Salim 1043b8
* Tue Dec 28 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.5.1-2
Michel Alexandre Salim 1043b8
- Disable amd64 assembly on non-intel architectures (#2035802):
Michel Alexandre Salim 1043b8
  this should avoid the issue where an executable stack is created.
Michel Alexandre Salim 1043b8
Michel Alexandre Salim 1043b8
* Wed Dec 22 2021 Pádraig Brady <P@draigBrady.com> - 1.5.1-1
Michel Alexandre Salim 1043b8
- Latest upstream
Michel Alexandre Salim 1043b8
465b0c
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-2
465b0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
465b0c
465b0c
* Sun May 16 2021 Pádraig Brady <P@draigBrady.com> - 1.5.0-2
465b0c
- Latest upstream
465b0c
465b0c
* Fri Mar 05 2021 Pádraig Brady <P@draigBrady.com> - 1.4.9-1
465b0c
- Latest upstream
465b0c
465b0c
* Thu Jan 28 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.7-2
465b0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
465b0c
465b0c
* Thu Dec 17 2020 Pádraig Brady <P@draigBrady.com> - 1.4.7-1
465b0c
- Latest upstream
465b0c
465b0c
* Wed Aug 26 2020 Jeff Law <law@redhat.com> - 1.4.5-6
465b0c
- Do not force C++11 mode
465b0c
465b0c
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5-5
465b0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
465b0c
465b0c
* Sat Jul 11 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.4.5-4
465b0c
- Build libzstd with multi-threading support
465b0c
465b0c
* Mon May 25 2020 Pádraig Brady <P@draigBrady.com> - 1.4.5-3
465b0c
- Build shared library with correct compiler flags
465b0c
465b0c
* Fri May 22 2020 Pádraig Brady <P@draigBrady.com> - 1.4.5-1
465b0c
- Latest upstream
465b0c
465b0c
* Fri May 22 2020 Avi Kivity <avi@scylladb.com> - 1.4.4-3
465b0c
- Added static library subpackage
465b0c
465b0c
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.4-2
465b0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
465b0c
465b0c
* Wed Jan 15 2020 Pádraig Brady <P@draigBrady.com> - 1.4.4-1
465b0c
- Latest upstream
465b0c
465b0c
* Wed Jul 31 2019 Pádraig Brady <P@draigBrady.com> - 1.4.2-1
465b0c
- Latest upstream
465b0c
465b0c
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-2
465b0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
465b0c
465b0c
* Mon Apr 29 2019 Pádraig Brady <P@draigBrady.com> - 1.4.0-1
465b0c
- Latest upstream
465b0c
465b0c
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.8-2
465b0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
465b0c
465b0c
* Mon Dec 31 2018 Pádraig Brady <P@draigBrady.com> - 1.3.8-1
465b0c
- Latest upstream
465b0c
465b0c
* Mon Oct 08 2018 Pádraig Brady <P@draigBrady.com> - 1.3.6-1
465b0c
- Latest upstream
465b0c
465b0c
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.5-2
465b0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
465b0c
465b0c
* Mon Jul 02 2018 Pádraig Brady <P@draigBrady.com> - 1.3.5.1
465b0c
- Latest upstream
465b0c
465b0c
* Wed Mar 28 2018 Pádraig Brady <P@draigBrady.com> - 1.3.4-1
465b0c
- Latest upstream
465b0c
465b0c
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.3-3
465b0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
465b0c
465b0c
* Fri Feb 02 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3.3-2
465b0c
- Switch to %%ldconfig_scriptlets
465b0c
465b0c
* Thu Dec 21 2017 Pádraig Brady <P@draigBrady.com> - 1.3.3-1
465b0c
- Latest upstream
465b0c
465b0c
* Fri Nov 10 2017 Pádraig Brady <P@draigBrady.com> - 1.3.2-1
465b0c
- Latest upstream
465b0c
465b0c
* Mon Aug 21 2017 Pádraig Brady <P@draigBrady.com> - 1.3.1-1
465b0c
- Latest upstream
465b0c
465b0c
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-3
465b0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
465b0c
465b0c
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-2
465b0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
465b0c
465b0c
* Sun Jul 16 2017 Pádraig Brady <P@draigBrady.com> - 1.3.0-1
465b0c
- Latest upstream
465b0c
465b0c
* Mon May 08 2017 Pádraig Brady <P@draigBrady.com> - 1.2.0-1
465b0c
- Latest upstream
465b0c
465b0c
* Mon Mar 06 2017 Pádraig Brady <P@draigBrady.com> - 1.1.3-1
465b0c
- Latest upstream
465b0c
465b0c
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-2
465b0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
465b0c
465b0c
* Wed Nov 02 2016 Pádraig Brady <pbrady@redhat.com> - 1.1.1-1
465b0c
- Latest upstream
465b0c
465b0c
* Thu Oct 6  2016 Pádraig Brady <pbrady@fb.com> 1.1.0-2
465b0c
- Add pzstd(1)
465b0c
465b0c
* Thu Sep 29 2016 Pádraig Brady <pbrady@fb.com> 1.1.0-1
465b0c
- New upstream release
465b0c
- Remove examples and static lib
465b0c
465b0c
* Mon Sep 12 2016 Pádraig Brady <pbrady@fb.com> 1.0.0-2
465b0c
- Adjust various upstream links
465b0c
- Parameterize various items in spec file
465b0c
465b0c
* Mon Sep 5 2016 Pádraig Brady <pbrady@fb.com> 1.0.0-1
465b0c
- Initial release