File mingw64-vulkan-tools.spec of Package mingw64-vulkan-tools

#
# spec file for package mingw64-vulkan-tools
#
# Copyright (c) 2021 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#

%global _mingw64_find_requires_exclude api-ms-win-crt-convert-l1-1-0 api-ms-win-crt-environment-l1-1-0 api-ms-win-crt-heap-l1-1-0 api-ms-win-crt-private-l1-1-0 api-ms-win-crt-runtime-l1-1-0 api-ms-win-crt-stdio-l1-1-0 api-ms-win-crt-string-l1-1-0 api-ms-win-crt-time-l1-1-0

%define _name   vulkan-tools
Name:           mingw64-%{_name}
Version:        1.3.250.0
Release:        0
Summary:        Diagnostic utilities for Vulkan
License:        Apache-2.0
Group:          Development/Tools/Other
URL:            https://github.com/KhronosGroup/Vulkan-Tools
Source:         https://github.com/KhronosGroup/Vulkan-Tools/archive/sdk-%version.tar.gz
Patch0:         sdk-1.3.239.0-use-cmake-copy-command.patch
BuildRequires:  glslang-devel
BuildRequires:  mingw64-cross-cmake 
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-pkgconf
BuildRequires:  mingw64-vulkan-devel >= %version
BuildRequires:  python3-base
Obsoletes:      mingw64-vulkan < %version-%release
Provides:       mingw64-vulkan = %version-%release
%_mingw64_package_header_debug
BuildArch:      noarch

%description
Vulkan is a 3D graphics and compute API providing cross-platform
access to modern GPUs with low overhead and targeting realtime
graphics applications such as games and interactive media.

This package contains the Khronos official Vulkan tools and utilities.

%_mingw64_debug_package

%prep
%autosetup -p1 -n Vulkan-Tools-sdk-%version

%build
MINGW64_LFLAGS="-Wl,--enable-stdcall-fixup %_mingw64_ldflags"
%_mingw64_cmake \
    -DGLSLANG_INSTALL_DIR=/usr \
    -DVulkan_LIBRARY=%_mingw64_prefix/bin/vulkan-1.dll

%_mingw64_cmake_build

%install
%_mingw64_cmake_install

%files
%license LICENSE.txt
%_mingw64_bindir/*.exe

%changelog
openSUSE Build Service is sponsored by