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

#
# spec file for package mingw64-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 mingw64-lib%{realname}

Name:           mingw64-%{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:  mingw64-cross-cmake
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-filesystem
%_mingw64_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 mingw64-%{realname}-devel
Summary:        Development files for yaml-cpp
Group:          Development/Libraries/C and C++
Requires:       %{libname} = %{version}

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

Needed for compiling programs that link with the library.

%_mingw64_debug_package

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

%build
%{_mingw64_cmake}
%{_mingw64_cmake_build}

%check

%install
%{_mingw64_cmake_install}

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

%files -n mingw64-%{realname}-devel
%{_mingw64_includedir}/yaml-cpp
%{_mingw64_libdir}/libyaml-cpp.dll.a
%{_mingw64_libdir}/cmake/yaml-cpp/
%{_mingw64_libdir}/pkgconfig/yaml-cpp.pc

%changelog
openSUSE Build Service is sponsored by