Compare commits

...
Sign in to create a new pull request.

6 commits

Author SHA1 Message Date
Fedora Release Engineering
efe3715ae2 Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 09:44:03 +00:00
Fedora Release Engineering
7b6ede5c5b Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 21:11:27 +00:00
Pádraig Brady
64ce90edbb Change to more accurate license
s/BSD AND GPLv2/BSD OR GPLv2/

See:
https://bugzilla.redhat.com/show_bug.cgi?id=2416948
https://docs.fedoraproject.org/en-US/legal/license-field/#_special_rules_for_or_expressions
2025-11-25 14:24:31 +00:00
Terje Røsten
4170a25cb1 Move to C++17 for gtest 1.17.0 2025-10-08 10:25:49 +02:00
Orion Poplawski
e4309bcebc Build with cmake (bz#2088517) 2025-09-20 08:02:08 -06:00
Fedora Release Engineering
af1b0cb786 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 21:21:19 +00:00

View file

@ -18,15 +18,16 @@
Name: zstd
Version: 1.5.7
Release: 1%{?dist}
Release: 6%{?dist}
Summary: Zstd compression library
License: BSD-3-Clause AND GPL-2.0-only
License: BSD-3-Clause OR GPL-2.0-only
URL: https://github.com/facebook/zstd
Source0: https://github.com/facebook/zstd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch1: man-pages-1.5.7.patch
BuildRequires: cmake
BuildRequires: make
BuildRequires: gcc %{?with_gtest:gtest-devel}
%if %{with lz4}
@ -73,33 +74,38 @@ find -name .gitignore -delete
%patch 1 -p1
%build
export CFLAGS="$RPM_OPT_FLAGS"
export LDFLAGS="$RPM_LD_FLAGS"
export PREFIX="%{_prefix}"
export LIBDIR="%{_libdir}"
%make_build -C lib lib-mt %{!?with_asm:ZSTD_NO_ASM=1}
%make_build -C programs %{!?with_asm:ZSTD_NO_ASM=1}
%if !%{with asm}
export CPPFLAGS=-DZSTD_DISABLE_ASM
%endif
%global _vpath_srcdir build/cmake
%global _vpath_builddir build/shared
%cmake %{?with_pzstd:-DZSTD_BUILD_CONTRIB=ON} -DZSTD_BUILD_STATIC=NO -DZSTD_PROGRAMS_LINK_SHARED=YES
%cmake_build
%global _vpath_builddir build/static
%cmake %{?with_pzstd:-DZSTD_BUILD_CONTRIB=ON} -DZSTD_BUILD_SHARED=NO -DBUILD_TESTING=YES
%cmake_build
%install
%global _vpath_builddir build/static
%cmake_install
# Install shared second so that cmake config files reference the shared library
%global _vpath_builddir build/shared
%cmake_install
%if %{with pzstd}
export CXXFLAGS="$RPM_OPT_FLAGS"
%make_build -C contrib/pzstd %{!?with_asm:ZSTD_NO_ASM=1}
install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1
%endif
%check
execstack lib/libzstd.so.1
execstack %{_vpath_builddir}/lib/libzstd.so.1
%global _vpath_builddir build/static
%ctest --verbose
%if %{with pzstd} && %{with gtest}
# No pzstd tests with the cmake build at the moment
export CFLAGS="$RPM_OPT_FLAGS"
export LDFLAGS="$RPM_LD_FLAGS"
make -C tests test-zstd
%if %{with pzstd} && %{with gtest}
export CXXFLAGS="$RPM_OPT_FLAGS"
make -C contrib/pzstd test
%endif
%install
%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir}
%if %{with pzstd}
install -D -m755 contrib/pzstd/pzstd %{buildroot}%{_bindir}/pzstd
install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1
make PZSTD_CXX_STD=-std=c++17 -C contrib/pzstd tests check
%endif
%files
@ -119,6 +125,7 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1
%{_mandir}/man1/%{name}cat.1*
%{_mandir}/man1/%{name}grep.1*
%{_mandir}/man1/%{name}less.1*
%{_pkgdocdir}/zstd_manual.html
%license COPYING LICENSE
%files -n lib%{name}
@ -131,6 +138,7 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1
%{_includedir}/zstd_errors.h
%{_libdir}/pkgconfig/libzstd.pc
%{_libdir}/libzstd.so
%{_libdir}/cmake/zstd/
%files -n lib%{name}-static
%{_libdir}/libzstd.a
@ -138,6 +146,21 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1
%ldconfig_scriptlets -n lib%{name}
%changelog
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.7-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Wed Oct 08 2025 Terje Røsten <terjeros@gmail.com> - 1.5.7-4
- Move to C++17 for gtest 1.17.0
* Sat Sep 20 2025 Orion Poplawski <orion@nwra.com> - 1.5.7-3
- Build with cmake (bz#2088517)
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Thu Feb 20 2025 Pádraig Brady <P@draigBrady.com> - 1.5.7-1
- latest upstream