File mingw64-libb2.spec of Package mingw64-libb2

#
# spec file for package mingw64-libb2
#
# Copyright (c) 2024, Martin Hauke <mardnh@gmx.de>
#
# 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 http://bugs.opensuse.org/
#

%define sover 1
%define realname libb2
%define libname mingw64-%{realname}-%{sover}

Name:           mingw64-%{realname}
Version:        0.98.1
Release:        0
Summary:        C library providing BLAKE2b, BLAKE2s, BLAKE2bp, BLAKE2sp
License:        CC0-1.0
Group:          Development/Libraries/C and C++
URL:            https://github.com/BLAKE2/libb2
Source:         https://github.com/BLAKE2/libb2/releases/download/v%{version}/%{realname}-%{version}.tar.gz
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-filesystem
%_mingw64_package_header_debug
BuildArch:      noarch

%description
C library providing BLAKE2b, BLAKE2s, BLAKE2bp, BLAKE2sp.

BLAKE2 is a cryptographic hash function faster than MD5, SHA-1, SHA-2,
and SHA-3, yet is at least as secure as the latest standard SHA-3.

%package -n %{libname}
Summary:        C library providing BLAKE2b, BLAKE2s, BLAKE2bp, BLAKE2sp
Group:          System/Libraries

%description -n %{libname}
C library providing BLAKE2b, BLAKE2s, BLAKE2bp, BLAKE2sp.

BLAKE2 is a cryptographic hash function faster than MD5, SHA-1, SHA-2,
and SHA-3, yet is at least as secure as the latest standard SHA-3.

%package -n mingw64-%{realname}-devel
Summary:        Development files for the Blake2 library
Group:          Development/Libraries/C and C++
Requires:       %{libname} = %{version}

%description -n mingw64-%{realname}-devel
C library providing BLAKE2b, BLAKE2s, BLAKE2bp, BLAKE2sp.

BLAKE2 is a cryptographic hash function faster than MD5, SHA-1, SHA-2,
and SHA-3, yet is at least as secure as the latest standard SHA-3.

This package provides libraries and header files for developing applications
that use libb2.

%_mingw64_debug_package

%prep
%setup -q -n %{realname}-%{version}

%build
%{_mingw64_configure} \
  --disable-silent-rules \
  --enable-static=no \
  --enable-native=no
%{_mingw64_make}

%install
%{_mingw64_make_install}

%files -n %{libname}
%license COPYING
%{_mingw64_bindir}/libb2-%{sover}.dll

%files -n mingw64-%{realname}-devel
%{_mingw64_includedir}/blake2.h
%{_mingw64_libdir}/libb2.dll.a
%{_mingw64_libdir}/pkgconfig/libb2.pc

%changelog
openSUSE Build Service is sponsored by