File mingw32-dtc.spec of Package mingw32-dtc

#
# spec file for package mingw32-dtc
#
# 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 dtc
%define lname mingw32-libfdt1
Name:           mingw32-%{realname}
Version:        1.7.1
Release:        0
Summary:        Device-tree compiler
License:        GPL-2.0-or-later
URL:            https://github.com/dgibson/dtc
Source0:        https://mirrors.edge.kernel.org/pub/software/utils/dtc/dtc-%{version}.tar.gz
Source1:        https://mirrors.edge.kernel.org/pub/software/utils/dtc/dtc-%{version}.tar.sign
# From http://gibson.dropbear.id.au/
Source21:       dtc.keyring
BuildRequires:  mingw32-libyaml-devel
BuildRequires:  mingw32-cross-gcc
BuildRequires:  mingw32-cross-meson
BuildRequires:  bison
BuildRequires:  flex
%_mingw32_package_header_debug
BuildArch:      noarch

%description
PowerPC kernels are moving towards requiring a small Open
Firmware-style device tree as the only means of passing information
from bootloaders/firmware to the kernel. This does not require a full
Open Firmware implementation. DTC (Device Tree Compiler) is a tool to
create a static device tree, which is adequate for most embedded
systems (since their topology will not vary across reboots). DTC is
available via a git tree: git://ozlabs.org/srv/projects/dtc/dtc.git

%package -n %{lname}
Summary:        Device tree library

%description -n %{lname}
libfdt is a library to process Open Firmware style device trees on various
architectures.

%package -n mingw32-libfdt-devel
Summary:        Development headers for device tree library
Group:          Development/Libraries/C and C++
Requires:       %{lname} = %{version}

%description -n mingw32-libfdt-devel
This package provides development files for libfdt.

%_mingw32_debug_package

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

%build
%{_mingw32_meson} \
  -Dtests=false \
  -Dtools=true \
  -Dvalgrind=disabled \
  -Dpython=disabled
%{_mingw32_meson_build}

%install
%{_mingw32_meson_install}
rm -v %{buildroot}%{_mingw32_libdir}/libfdt.a

%files
%license README.license
%doc Documentation/manual.txt
%{_mingw32_bindir}/dtc.exe
%{_mingw32_bindir}/dtdiff
%{_mingw32_bindir}/fdtdump.exe
%{_mingw32_bindir}/fdtget.exe
%{_mingw32_bindir}/fdtoverlay.exe
%{_mingw32_bindir}/fdtput.exe

%files -n %{lname}
%{_mingw32_bindir}/libfdt-1.dll

%files -n mingw32-libfdt-devel
%{_mingw32_includedir}/fdt.h
%{_mingw32_includedir}/libfdt.h
%{_mingw32_includedir}/libfdt_env.h
%{_mingw32_libdir}/libfdt.dll.a
%{_mingw32_libdir}/pkgconfig/libfdt.pc

%changelog
openSUSE Build Service is sponsored by