%define sdkver  1.3.246.1

Name:           vulkan-tools
Version:        1.3.246.1
Release:        1%{?dist}
Summary:        Vulkan tools

License:        ASL 2.0
URL:            https://github.com/KhronosGroup/Vulkan-Tools
Source0:        %url/archive/sdk-%{version}.tar.gz#/Vulkan-Tools-sdk-%{version}.tar.gz

%if 0%{?rhel} == 7
BuildRequires:  devtoolset-8-gcc
BuildRequires:  devtoolset-8-gcc-c++
%else
BuildRequires:  gcc
BuildRequires:  gcc-c++
%endif
BuildRequires:  cmake3
BuildRequires:  glslang >= 12.1.0+%{sdkver}
BuildRequires:  ninja-build
BuildRequires:  python%{python3_pkgversion}-devel
BuildRequires:  vulkan-loader-devel = %{version}
BuildRequires:  pkgconfig(wayland-client)
BuildRequires:  pkgconfig(wayland-cursor)
BuildRequires:  pkgconfig(wayland-server)
BuildRequires:  pkgconfig(wayland-egl)
BuildRequires:  pkgconfig(wayland-protocols)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xrandr)
BuildRequires:  pkgconfig(xcb)

Provides:       vulkan-demos%{?_isa} = %{version}-%{release}
Obsoletes:      vulkan-demos < %{version}-%{release}

%description
Vulkan tools

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


%build
%if 0%{?rhel} == 7
. /opt/rh/devtoolset-8/enable
%endif
%cmake3 -GNinja -DCMAKE_BUILD_TYPE=Release -DGLSLANG_INSTALL_DIR=%{_prefix}
%cmake_build


%install
%cmake_install

%files
%license LICENSE.txt
%doc README.md CONTRIBUTING.md
%{_bindir}/*

%changelog
* Sun May 21 2023 Jean-Marc Liger <ligenix@iscp.fr> - 1.3.246.1-1
- Update to 1.3.246.1 sdk

* Sat Feb 18 2023 Jean-Marc Liger <ligenix@iscp.fr> - 1.3.239.0-1
- Update to 1.3.239.0 sdk

* Fri Nov 11 2022 Jean-Marc Liger <ligenix@iscp.fr> - 1.3.231.1-1
- Update to 1.3.231.1 sdk

* Wed Oct 05 2022 Jean-Marc Liger <ligenix@iscp.fr> - 1.3.224.1-1
- Update to 1.3.224.1 sdk

* Fri Aug 05 2022 Jean-Marc Liger <ligenix@iscp.fr> - 1.3.224-1
- Update to 1.3.224

* Mon Apr 25 2022 Jean-Marc Liger <ligenix@iscp.fr> - 1.3.212-1
- Update to 1.3.212

* Mon Jan 31 2022 Jean-Marc Liger <ligenix@iscp.fr> - 1.3.204-1
- Update to 1.3.204

* Sun Nov 21 2021 Jean-Marc Liger <ligenix@iscp.fr> - 1.2.199-1
- Update to 1.2.199

* Sat Oct 16 2021 Jean-Marc Liger <ligenix@iscp.fr> - 1.2.196-1
- Update to 1.2.196

* Wed Jul 14 2021 Jean-Marc Liger <ligenix@iscp.fr> - 1.2.184-1
- Update to 1.2.184

* Sat May 22 2021 Jean-Marc Liger <ligenix@iscp.fr> - 1.2.178-1
- Update to 1.2.178

* Thu Apr 22 2021 Jean-Marc Liger <ligenix@iscp.fr> - 1.2.176-1
- Update to 1.2.176

* Fri Jan 29 2021 Dave Airlie <airlied@redhat.com> - 1.2.162.0-1
- Update to 1.2.162.0

* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.154.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Wed Nov 04 2020 Dave Airlie <airlied@redhat.com> - 1.2.154.0-1
- Update to 1.2.154.0

* Wed Aug 05 2020 Dave Airlie <airlied@redhat.com> - 1.2.148.0-1
- Update to 1.2.148.0

* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.135.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Wed Apr 22 2020 Dave Airlie <airlied@redhat.com> - 1.2.135.0-1
- Update to 1.2.135.0

* Wed Jan 29 2020 Dave Airlie <airlied@redhat.com> - 1.2.131.1-1
- Update to 1.2.131.1

* Thu Nov 14 2019 Dave Airlie <airlied@redhat.com> - 1.1.126.0-1
- Update to 1.1.126.0

* Wed Jul 31 2019 Dave Airlie <airlied@redhat.com> - 1.1.114.0-1
- Update to 1.1.114.0

* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.108.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Tue Jun 25 2019 Dave Airlie <airlied@redhat.com> - 1.1.108.0-1
- Update to 1.1.108.0

* Thu Mar 07 2019 Dave Airlie <airlied@redhat.com> - 1.1.101.0-1
- Update to 1.1.101.0

* Wed Feb 13 2019 Dave Airlie <airlied@redhat.com> - 1.1.97.0-1
- Update to 1.1.97.0

* Tue Feb 12 2019 Dave Airlie <airlied@redhat.com> - 1.1.92.0-1
- Update to 1.1.92.0
- don't rename anymore, upstream changed cube app name

* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.82.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Tue Aug 07 2018 Leigh Scott <leigh123linux@googlemail.com> - 1.1.82.0-1
- Update to 1.1.82.0

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.77.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Sat Jun 23 2018 Leigh Scott <leigh123linux@googlemail.com> - 1.1.77.0-1
- Initial package