d10b41
Name:		xxhash
d10b41
Version:	0.8.3
d10b41
Release:	1%{?dist}
d10b41
Summary:	Extremely fast hash algorithm
d10b41
d10b41
#		The source for the library (xxhash.c and xxhash.h) is BSD-2-Clause
d10b41
#		The source for the command line tool (xxhsum.c) is GPL-2.0-or-later
d10b41
License:	BSD-2-Clause AND GPL-2.0-or-later
d10b41
URL:		https://www.xxhash.com/
d10b41
Source0:	https://github.com/Cyan4973/xxHash/archive/v%{version}/%{name}-%{version}.tar.gz
d10b41
d10b41
BuildRequires:	make
d10b41
BuildRequires:	gcc
d10b41
BuildRequires:	doxygen
d10b41
d10b41
%description
d10b41
xxHash is an Extremely fast Hash algorithm, running at RAM speed
d10b41
limits. It successfully completes the SMHasher test suite which
d10b41
evaluates collision, dispersion and randomness qualities of hash
d10b41
functions. Code is highly portable, and hashes are identical on all
d10b41
platforms (little / big endian).
d10b41
d10b41
%package libs
d10b41
Summary:	Extremely fast hash algorithm - library
d10b41
License:	BSD-2-Clause
d10b41
d10b41
%description libs
d10b41
xxHash is an Extremely fast Hash algorithm, running at RAM speed
d10b41
limits. It successfully completes the SMHasher test suite which
d10b41
evaluates collision, dispersion and randomness qualities of hash
d10b41
functions. Code is highly portable, and hashes are identical on all
d10b41
platforms (little / big endian).
d10b41
d10b41
%package devel
d10b41
Summary:	Extremely fast hash algorithm - development files
d10b41
License:	BSD-2-Clause
d10b41
Requires:	%{name}-libs%{?_isa} = %{version}-%{release}
d10b41
# By setting XXH_INLINE_ALL, xxhash may be used as a header-only library.
d10b41
# Dependent packages that use xxhash this way must BR this virtual Provide:
d10b41
Provides:	%{name}-static = %{version}-%{release}
d10b41
d10b41
%description devel
d10b41
Development files for the xxhash library
d10b41
d10b41
%package doc
d10b41
Summary:	Extremely fast hash algorithm - documentation files
d10b41
License:	BSD-2-Clause
d10b41
BuildArch:	noarch
d10b41
d10b41
%description doc
d10b41
Documentation files for the xxhash library
d10b41
d10b41
%prep
d10b41
%setup -q -n xxHash-%{version}
d10b41
d10b41
%build
d10b41
# Enable runtime detection of sse2/avx2/avx512 on intel architectures
d10b41
%ifarch %{ix86} x86_64
d10b41
%global dispatch 1
d10b41
# Some distribution variants build with -march=x86-64-v3.
d10b41
# See xxh_x86dispatch.c.
d10b41
%global moreflags_dispatch -DXXH_X86DISPATCH_ALLOW_AVX
d10b41
%else
d10b41
%global dispatch 0
d10b41
%global moreflags_dispatch %{nil}
d10b41
%endif
d10b41
d10b41
%make_build \
d10b41
    MOREFLAGS="%{__global_cflags} %{?__global_ldflags} %{moreflags_dispatch}" \
d10b41
    DISPATCH=%{dispatch} \
d10b41
    LIBXXH_DISPATCH=%{dispatch}
d10b41
doxygen
d10b41
d10b41
%install
d10b41
%make_install \
d10b41
    PREFIX=%{_prefix} \
d10b41
    LIBDIR=%{_libdir} \
d10b41
    DISPATCH=%{dispatch} \
d10b41
    LIBXXH_DISPATCH=%{dispatch}
d10b41
rm %{buildroot}/%{_libdir}/libxxhash.a
d10b41
d10b41
%check
d10b41
make check
d10b41
make test-xxhsum-c
d10b41
d10b41
%files
d10b41
%{_bindir}/xxh*sum
d10b41
%{_mandir}/man1/xxh*sum.1*
d10b41
%license cli/COPYING
d10b41
%doc cli/README.md
d10b41
d10b41
%files libs
d10b41
%{_libdir}/libxxhash.so.*
d10b41
%license LICENSE
d10b41
%doc README.md
d10b41
d10b41
%files devel
d10b41
%{_includedir}/xxhash.h
d10b41
%{_includedir}/xxh3.h
d10b41
%if %{?dispatch}
d10b41
%{_includedir}/xxh_x86dispatch.h
d10b41
%endif
d10b41
%{_libdir}/libxxhash.so
d10b41
%{_libdir}/pkgconfig/libxxhash.pc
d10b41
d10b41
%files doc
d10b41
%doc doxygen/html
d10b41
d10b41
%changelog
d10b41
* Thu Jan 02 2025 Mattias Ellert <mattias.ellert@physics.uu.se> - 0.8.3-1
d10b41
- Update to version 0.8.3
d10b41
d10b41
* Wed Sep 25 2024 Andreas Rogge <andreas.rogge@bareos.com> - 0.8.2-4
d10b41
- add xxh_x86dispatch.h to devel package when dispatching is enabled (rhbz#2314193)
d10b41
d10b41
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.2-3
d10b41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
d10b41
d10b41
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.2-2
d10b41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
d10b41
d10b41
* Sat Jul 22 2023 Mattias Ellert <mattias.ellert@physics.uu.se> - 0.8.2-1
d10b41
- Update to version 0.8.2
d10b41
- Drop patch xxhash-epel7-ppc64le.patch
d10b41
- Use SPDX license identifiers
d10b41
d10b41
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-6
d10b41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
d10b41
d10b41
* Mon Jun 19 2023 Florian Weimer <fweimer@redhat.com> - 0.8.1-5
d10b41
- Enable building with -march=x86-64-v3 (#2215831)
d10b41
d10b41
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-4
d10b41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
d10b41
d10b41
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-3
d10b41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
d10b41
d10b41
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-2
d10b41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
d10b41
d10b41
* Mon Nov 29 2021 Mattias Ellert <mattias.ellert@physics.uu.se> - 0.8.1-1
d10b41
- Update to version 0.8.1
d10b41
- Drop patch xxhash-pkgconfig-version.patch (accepted upstream)
d10b41
- Fix compilation on RHEL 7 ppc64le (gcc 4.8)
d10b41
- The x86 dispatch code now enables sse2 and avx2 separately, it can now use
d10b41
  sse2 on EPEL 7 without trying to use avx2 which is not supported by gcc 4.8
d10b41
- Add documentation package - doxygen mark-up was added
d10b41
d10b41
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-4
d10b41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
d10b41
d10b41
* Thu Jun 10 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 0.8.0-3
d10b41
- Add virtual Provide for xxhash-static in xxhash-devel
d10b41
d10b41
* Thu Jan 28 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-2
d10b41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
d10b41
d10b41
* Tue Jul 28 2020 Mattias Ellert <mattias.ellert@physics.uu.se> - 0.8.0-1
d10b41
- Update to version 0.8.0
d10b41
- Drop patches xxhash-compiler-warning-32-bit.patch (accepted upstream)
d10b41
  and xxhash-pkgconfig.patch (issue fixed upstream)
d10b41
- Fix empty version in .pc file
d10b41
d10b41
* Fri Jul 24 2020 Mattias Ellert <mattias.ellert@physics.uu.se> - 0.7.4-2
d10b41
- Fix libdir in pkg-config file
d10b41
d10b41
* Sat Jun 27 2020 Mattias Ellert <mattias.ellert@physics.uu.se> - 0.7.4-1
d10b41
- Update to version 0.7.4
d10b41
- Enable runtime detection of sse2/avx2/avx512 on intel architectures
d10b41
- Fix compiler warning for 32 bit architectures
d10b41
d10b41
* Fri Mar 06 2020 Mattias Ellert <mattias.ellert@physics.uu.se> - 0.7.3-1
d10b41
- Update to version 0.7.3
d10b41
- Drop patch xxhash-gcc10-altivec.patch (accepted upstream)
d10b41
d10b41
* Fri Feb 07 2020 Mattias Ellert <mattias.ellert@physics.uu.se> - 0.7.2-3
d10b41
- Fix ppc64le build with gcc 10
d10b41
d10b41
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.2-2
d10b41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
d10b41
d10b41
* Wed Oct 09 2019 Mattias Ellert <mattias.ellert@physics.uu.se> - 0.7.2-1
d10b41
- Update to version 0.7.2
d10b41
d10b41
* Sat Aug 17 2019 Mattias Ellert <mattias.ellert@physics.uu.se> - 0.7.1-1
d10b41
- Update to version 0.7.1
d10b41
d10b41
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-2
d10b41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
d10b41
d10b41
* Mon Mar 18 2019 Mattias Ellert <mattias.ellert@physics.uu.se> - 0.7.0-1
d10b41
- Update to version 0.7.0
d10b41
d10b41
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.5-3
d10b41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
d10b41
d10b41
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.5-2
d10b41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
d10b41
d10b41
* Thu Apr 19 2018 Mattias Ellert <mattias.ellert@physics.uu.se> - 0.6.5-1
d10b41
- Update to version 0.6.5
d10b41
d10b41
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.4-2
d10b41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
d10b41
d10b41
* Wed Jan 03 2018 Mattias Ellert <mattias.ellert@physics.uu.se> - 0.6.4-1
d10b41
- Update to version 0.6.4
d10b41
- Drop previously backported patches
d10b41
d10b41
* Thu Oct 19 2017 Mattias Ellert <mattias.ellert@physics.uu.se> - 0.6.3-2
d10b41
- Correct License tag (command line tool is GPLv2+)
d10b41
- Adjust Source tag to get a more descriptive tarfile name
d10b41
d10b41
* Wed Oct 18 2017 Mattias Ellert <mattias.ellert@physics.uu.se> - 0.6.3-1
d10b41
- Initial packaging