File mingw32-yaml-cpp.spec of Package mingw32-yaml-cpp

#
# spec file for package mingw32-yaml-cpp
#
# 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 realname yaml-cpp
%define libname mingw32-lib%{realname}

Name:           mingw32-%{realname}
Version:        0.8.0
Release:        0
Summary:        YAML parser and emitter in C++
License:        MIT
Group:          Development/Libraries/C and C++
URL:            https://github.com/jbeder/yaml-cpp/
Source:         https://github.com/jbeder/yaml-cpp/archive/%{version}.tar.gz#/%{realname}-%{version}.tar.gz
BuildRequires:  mingw32-cross-cmake
BuildRequires:  mingw32-cross-gcc
BuildRequires:  mingw32-cross-gcc-c++
BuildRequires:  mingw32-filesystem
%_mingw32_package_header_debug
BuildArch:      noarch

%description
A YAML parser and emitter in C++ matching the YAML 1.2 spec.

%package -n %{libname}
Summary:        YAML parser and emitter in C++

%description -n %{libname}
A YAML parser and emitter in C++ matching the YAML 1.2 spec.

This subpackage contains the implementation as a shared library.

%package -n mingw32-%{realname}-devel
Summary:        Development files for yaml-cpp
Group:          Development/Libraries/C and C++
Requires:       %{libname} = %{version}

%description -n mingw32-%{realname}-devel
A YAML parser and emitter in C++ matching the YAML 1.2 spec.

Needed for compiling programs that link with the library.

%_mingw32_debug_package

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

%build
%{_mingw32_cmake}
%{_mingw32_cmake_build}

%check

%install
%{_mingw32_cmake_install}

%files -n %{libname}
%license LICENSE
%{_mingw32_bindir}/libyaml-cpp.dll

%files -n mingw32-%{realname}-devel
%{_mingw32_includedir}/yaml-cpp
%{_mingw32_libdir}/libyaml-cpp.dll.a
%{_mingw32_libdir}/cmake/yaml-cpp/
%{_mingw32_libdir}/pkgconfig/yaml-cpp.pc

%changelog
openSUSE Build Service is sponsored by