File mingw64-xxhash.spec of Package mingw64-xxhash
#
# spec file for package mingw64-xxhash
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define _name xxhash
Name: mingw64-%_name
Version: 0.8.0
Release: 0
Summary: Non-cryptographic hash algorithm
License: BSD-2-Clause AND GPL-2.0-only
Group: Productivity/Security
URL: https://github.com/Cyan4973/xxHash
Source0: https://github.com/Cyan4973/xxHash/archive/v%{version}.tar.gz#/xxHash-%{version}.tar.gz
Patch0: xxhash-avoid-armv6-unaligned-access.patch
BuildRequires: mingw64-cross-cmake
BuildRequires: mingw64-cross-gcc-c++
BuildRequires: mingw64-cross-pkgconf
%_mingw64_package_header_debug
BuildArch: noarch
%description
xxHash is a hash algorithm. It completes the SMHasher test suite which
evaluates collision, dispersion and randomness qualities of hash functions.
Hashes are identical on all platforms.
%package -n mingw64-libxxhash0
Summary: Shared library for xxHash - a non-cryptographic hash algorithm
License: BSD-2-Clause
Group: System/Libraries
%description -n mingw64-libxxhash0
Shared library for xxHash - a hash algorithm. It completes the SMHasher test
suite which evaluates collision, dispersion and randomness qualities of hash
functions. Hashes are identical on all platforms.
%package devel
Summary: Development files for xxHash - a non-cryptographic hash algorithm
License: BSD-2-Clause
Group: Development/Libraries/C and C++
Requires: %name = %version
Requires: mingw64-libxxhash0 = %version
%description devel
Development files for xxHash - a hash algorithm. It completes the SMHasher test
suite which evaluates collision, dispersion and randomness qualities of hash
functions. Hashes are identical on all platforms.
%_mingw64_debug_package
%prep
%autosetup -p1 -n xxHash-%version
%build
cd cmake_unofficial
%_mingw64_cmake
%_mingw64_cmake_build
%install
cd cmake_unofficial
%_mingw64_cmake_install
rm -rf %buildroot%_mingw64_libdir/libxxhash.a
%files
%license LICENSE
%doc README.md
%_mingw64_bindir/xxhsum.exe
%_mingw64_mandir/man1/xxhsum.*
%files -n mingw64-libxxhash0
%_mingw64_bindir/libxxhash.dll
%files devel
%_mingw64_includedir/xxhash.h
%_mingw64_includedir/xxh3.h
%_mingw64_libdir/cmake
%_mingw64_libdir/libxxhash.dll.a
%changelog