diff --git a/xxhash.spec b/xxhash.spec index 48d3cf6..4e313f2 100644 --- a/xxhash.spec +++ b/xxhash.spec @@ -1,6 +1,13 @@ +# Disable xxhash-libs in RHEL10 or later. +%if 0%{?fedora} > 0 || 0%{?rhel} < 10 +%global build_xxhash_libs 1 +%else +%global build_xxhash_libs 0 +%endif + Name: xxhash Version: 0.8.2 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Extremely fast hash algorithm # The source for the library (xxhash.c and xxhash.h) is BSD-2-Clause @@ -20,6 +27,8 @@ evaluates collision, dispersion and randomness qualities of hash functions. Code is highly portable, and hashes are identical on all platforms (little / big endian). +%if %{build_xxhash_libs} + %package libs Summary: Extremely fast hash algorithm - library License: BSD-2-Clause @@ -31,10 +40,14 @@ evaluates collision, dispersion and randomness qualities of hash functions. Code is highly portable, and hashes are identical on all platforms (little / big endian). +%endif + %package devel Summary: Extremely fast hash algorithm - development files License: BSD-2-Clause +%if %{build_xxhash_libs} Requires: %{name}-libs%{?_isa} = %{version}-%{release} +%endif # By setting XXH_INLINE_ALL, xxhash may be used as a header-only library. # Dependent packages that use xxhash this way must BR this virtual Provide: Provides: %{name}-static = %{version}-%{release} @@ -73,12 +86,17 @@ doxygen %install %make_install PREFIX=%{_prefix} LIBDIR=%{_libdir} rm %{buildroot}/%{_libdir}/libxxhash.a +%if %{build_xxhash_libs} == 0 +rm %{buildroot}/%{_libdir}/libxxhash.so* +%endif %check make check make test-xxhsum-c +%if %{build_xxhash_libs} %ldconfig_scriptlets libs +%endif %files %{_bindir}/xxh*sum @@ -86,21 +104,28 @@ make test-xxhsum-c %license cli/COPYING %doc cli/README.md +%if %{build_xxhash_libs} %files libs %{_libdir}/libxxhash.so.* %license LICENSE %doc README.md +%endif %files devel %{_includedir}/xxhash.h %{_includedir}/xxh3.h +%if %{build_xxhash_libs} %{_libdir}/libxxhash.so +%endif %{_libdir}/pkgconfig/libxxhash.pc %files doc %doc doxygen/html %changelog +* Wed Jan 8 2025 Siddhesh Poyarekar - 0.8.2-9 +- Drop xxhash-libs (RHEL-71299). + * Thu Dec 5 2024 Siddhesh Poyarekar - 0.8.2-8 - Bump to sync c10s and rhel10 (RHEL-61409).