20628e
Name:		xxhash
20628e
Version:	0.8.1
20628e
Release:	3%{?dist}
20628e
Summary:	Extremely fast hash algorithm
20628e
20628e
#		The source for the library (xxhash.c and xxhash.h) is BSD
20628e
#		The source for the command line tool (xxhsum.c) is GPLv2+
20628e
License:	BSD and GPLv2+
20628e
URL:		http://www.xxhash.com/
20628e
Source0:	https://github.com/Cyan4973/xxHash/archive/v%{version}/%{name}-%{version}.tar.gz
20628e
20628e
BuildRequires:	make
20628e
BuildRequires:	gcc
20628e
BuildRequires:	doxygen
20628e
20628e
Patch0:		1-fix-man-page-installation.patch
20628e
20628e
%description
20628e
xxHash is an Extremely fast Hash algorithm, running at RAM speed
20628e
limits. It successfully completes the SMHasher test suite which
20628e
evaluates collision, dispersion and randomness qualities of hash
20628e
functions. Code is highly portable, and hashes are identical on all
20628e
platforms (little / big endian).
20628e
20628e
%package libs
20628e
Summary:	Extremely fast hash algorithm - library
20628e
License:	BSD
20628e
20628e
%description libs
20628e
xxHash is an Extremely fast Hash algorithm, running at RAM speed
20628e
limits. It successfully completes the SMHasher test suite which
20628e
evaluates collision, dispersion and randomness qualities of hash
20628e
functions. Code is highly portable, and hashes are identical on all
20628e
platforms (little / big endian).
20628e
20628e
%package devel
20628e
Summary:	Extremely fast hash algorithm - development files
20628e
License:	BSD
20628e
Requires:	%{name}-libs%{?_isa} = %{version}-%{release}
20628e
# By setting XXH_INLINE_ALL, xxhash may be used as a header-only library.
20628e
# Dependent packages that use xxhash this way must BR this virtual Provide:
20628e
Provides:	%{name}-static = %{version}-%{release}
20628e
20628e
%description devel
20628e
Development files for the xxhash library
20628e
20628e
%package doc
20628e
Summary:	Extremely fast hash algorithm - documentation files
20628e
License:	BSD
20628e
BuildArch:	noarch
20628e
20628e
%description doc
20628e
Documentation files for the xxhash library
20628e
20628e
%prep
20628e
%setup -q -n xxHash-%{version}
20628e
%patch0 -p1
20628e
20628e
%build
20628e
# Enable runtime detection of sse2/avx2/avx512 on intel architectures
20628e
%ifarch %{ix86} x86_64
20628e
%global dispatch 1
20628e
%else
20628e
%global dispatch 0
20628e
%endif
20628e
20628e
%make_build MOREFLAGS="%{__global_cflags} %{?__global_ldflags}" \
20628e
	    DISPATCH=%{dispatch}
20628e
doxygen
20628e
20628e
%install
20628e
%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir}
20628e
rm %{buildroot}/%{_libdir}/libxxhash.a
20628e
20628e
%check
20628e
make check
20628e
make test-xxhsum-c
20628e
20628e
%ldconfig_scriptlets libs
20628e
20628e
%files
20628e
%{_bindir}/xxh*sum
20628e
%{_mandir}/man1/xxh*sum.1*
20628e
%license cli/COPYING
20628e
%doc cli/README.md
20628e
20628e
%files libs
20628e
%{_libdir}/libxxhash.so.*
20628e
%license LICENSE
20628e
%doc README.md
20628e
20628e
%files devel
20628e
%{_includedir}/xxhash.h
20628e
%{_includedir}/xxh3.h
20628e
%{_libdir}/libxxhash.so
20628e
%{_libdir}/pkgconfig/libxxhash.pc
20628e
20628e
%files doc
20628e
%doc doxygen/html
20628e
20628e
%changelog
20628e
* Mon Jul 18 2022 Vladis Dronov <vdronov@redhat.com> - 0.8.1-3
20628e
- Fix broken manpages (upstream commit 836f4e735cf3)
20628e
- Add OSCI testing harness
20628e
20628e
* Fri Jun 17 2022 Vladis Dronov <vdronov@redhat.com> - 0.8.1-1
20628e
- Packaging of xxhash v0.8.1 for CS and RHEL copied from Fedora 36