]>
Commit | Line | Data |
---|---|---|
da7717d7 JK |
1 | |
2 | # Conditional build: | |
3 | %bcond_with tests # run tests | |
4 | ||
5 | %define api_version 1.1.107 | |
6 | ||
7 | Summary: Vulkan API Tools | |
8 | Summary(pl.UTF-8): Narzędzia API Vulkan | |
9 | Name: Vulkan-Tools | |
10 | Version: %{api_version} | |
11 | Release: 1 | |
12 | License: Apache v2.0 | |
13 | Group: Development | |
14 | Source0: https://github.com/KhronosGroup/Vulkan-Tools/archive/v%{version}/%{name}-%{version}.tar.gz | |
15 | # Source0-md5: 658bece65da93e463c59b48ffa9057a2 | |
16 | URL: https://github.com/KhronosGroup/Vulkan-Tools/ | |
17 | BuildRequires: Vulkan-Loader-devel >= %{api_version} | |
18 | BuildRequires: cmake >= 3.4 | |
19 | BuildRequires: glslang | |
20 | %{?with_x11:BuildRequires: libxcb-devel} | |
21 | BuildRequires: pkgconfig | |
c62a5656 | 22 | BuildRequires: python3 >= 1:3 |
da7717d7 | 23 | BuildRequires: python3-lxml |
c62a5656 | 24 | BuildRequires: python3-modules >= 1:3 |
da7717d7 JK |
25 | %{?with_wayland:BuildRequires: wayland-devel} |
26 | %{?with_x11:BuildRequires: xorg-lib-libX11-devel} | |
e1b8a360 | 27 | Obsoletes: vulkan-sdk-demos |
da7717d7 JK |
28 | Obsoletes: vulkan-sdk-tools |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
32 | Tools for the Vulkan graphics API. | |
33 | ||
34 | %description -l pl.UTF-8 | |
35 | Narzędzia do graficznego API Vulkan. | |
36 | ||
37 | %package mock-icd | |
38 | Summary: Dummy Vulkan ICD (driver) | |
39 | Summary(pl.UTF-8): Atrapa sterownika Vulkan | |
40 | Group: Development | |
41 | Requires: %{name} = %{version}-%{release} | |
42 | ||
43 | %description mock-icd | |
44 | Dummy Vulkan ICD (driver). | |
45 | ||
46 | %description mock-icd -l pl.UTF-8 | |
47 | Atrapa sterownika Vulkan. | |
48 | ||
49 | %prep | |
50 | %setup -qn %{name}-%{version} | |
51 | ||
52 | %build | |
53 | install -d build | |
54 | cd build | |
55 | ||
56 | # .pc file creation expect CMAKE_INSTALL_LIBDIR to be relative (to CMAKE_INSTALL_PREFIX) | |
57 | %cmake .. \ | |
58 | -DCMAKE_INSTALL_LIBDIR=%{_lib} \ | |
59 | -DGLSLANG_INSTALL_DIR=%{_prefix} \ | |
60 | -DBUILD_TESTS=%{?with_tests:ON}%{!?with_tests:OFF} \ | |
61 | -DINSTALL_ICD=ON | |
62 | ||
63 | %{__make} | |
64 | ||
65 | %if %{with tests} | |
66 | cd tests | |
67 | LC_ALL=C.UTF-8 VK_LAYER_PATH=layers LD_LIBRARY_PATH=../loader:layers ./run_loader_tests.sh | |
68 | cd .. | |
69 | %endif | |
70 | ||
71 | cd .. | |
72 | ||
73 | %install | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | ||
76 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/vulkan/icd.d/ | |
77 | ||
78 | %{__make} -C build install \ | |
79 | DESTDIR=$RPM_BUILD_ROOT | |
80 | ||
81 | mv $RPM_BUILD_ROOT%{_datadir}/vulkan/icd.d/VkICD_mock_icd.json \ | |
82 | $RPM_BUILD_ROOT%{_sysconfdir}/vulkan/icd.d/VkICD_mock_icd.json.disabled | |
83 | ||
84 | %clean | |
85 | rm -rf $RPM_BUILD_ROOT | |
86 | ||
87 | %files | |
88 | %defattr(644,root,root,755) | |
89 | %doc README.md GOVERNANCE.md CONTRIBUTING.md | |
90 | %attr(755,root,root) %{_bindir}/vkcube | |
91 | %attr(755,root,root) %{_bindir}/vkcubepp | |
92 | %attr(755,root,root) %{_bindir}/vulkaninfo | |
93 | ||
94 | %files mock-icd | |
95 | %defattr(644,root,root,755) | |
96 | %{_sysconfdir}/vulkan/icd.d/VkICD_mock_icd.json.disabled | |
97 | %attr(755,root,root) %{_libdir}/libVkICD_mock_icd.so |