File mingw32-libyaml.spec of Package mingw32-libyaml

#
# spec file for package mingw32-libyaml
#
# Copyright (c) 2025, 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 libyaml
%define lname mingw32-libyaml-0-2

Name:           mingw32-%{realname}
Version:        0.2.5
Release:        0
Summary:        A YAML parser and emitter written in C
License:        MIT
Group:          Development/Libraries/C and C++
URL:            https://pyyaml.org/wiki/LibYAML
Source:         http://pyyaml.org/download/libyaml/yaml-%{version}.tar.gz
BuildRequires:  mingw32-cross-gcc
BuildRequires:  mingw32-cross-pkg-config
%_mingw32_package_header_debug
BuildArch:      noarch

%description
A YAML parser and emitter written in C.

%package -n %{lname}
Summary:        A YAML parser and emitter written in C
Group:          System/Libraries

%description -n %{lname}
This package holds the shared library of libyaml.

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

%description -n mingw32-%{realname}-devel
This package holds the development files for libyaml,
a YAML parser and emitter written in C.

%_mingw32_debug_package

%prep
%autosetup -p1 -n yaml-%{version}

%build
%{_mingw32_configure} --disable-static
%{_mingw32_make} %{?_smp_mflags}

%install
%{_mingw32_make_install}

%files -n %lname
%license License
%{_mingw32_bindir}/libyaml-0-2.dll

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

%changelog
openSUSE Build Service is sponsored by