]> git.pld-linux.org Git - packages/Vulkan-Loader.git/blob - Vulkan-Loader.spec
- updated to sdk-1.3.280.0
[packages/Vulkan-Loader.git] / Vulkan-Loader.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # run tests (some failing?)
4 %bcond_without  wayland # Wayland support in loader
5 %bcond_without  x11     # XLib support in loader
6
7 # note: prefer "vulkan-sdk-" tags for better quality level
8 %define api_version     1.3.280.0
9 %define gitref          vulkan-sdk-%{api_version}
10
11 Summary:        Vulkan API loader
12 Summary(pl.UTF-8):      Biblioteka wczytująca sterowniki Vulkan
13 Name:           Vulkan-Loader
14 Version:        %{api_version}
15 Release:        1
16 License:        Apache v2.0, parts MIT-like
17 Group:          Libraries
18 #Source0Download: https://github.com/KhronosGroup/Vulkan-Loader/tags
19 Source0:        https://github.com/KhronosGroup/Vulkan-Loader/archive/%{gitref}/%{name}-%{gitref}.tar.gz
20 # Source0-md5:  282d32eab31abf5aa14ec59be8e8ae19
21 URL:            https://github.com/KhronosGroup/Vulkan-Loader/
22 BuildRequires:  cmake >= 3.17.2
23 %if %{with tests} && %(locale -a | grep -q '^C\.utf8$'; echo $?)
24 BuildRequires:  glibc-localedb-all
25 %endif
26 BuildRequires:  Vulkan-Headers = %{api_version}
27 %{?with_tests:BuildRequires:    gmock-devel}
28 %{?with_tests:BuildRequires:    gtest-devel}
29 BuildRequires:  libstdc++-devel >= 6:4.7
30 %{?with_x11:BuildRequires:      libxcb-devel}
31 BuildRequires:  pkgconfig
32 BuildRequires:  python3 >= 1:3
33 BuildRequires:  python3-lxml
34 BuildRequires:  python3-modules >= 1:3
35 BuildRequires:  rpmbuild(macros) >= 1.605
36 %{?with_wayland:BuildRequires:  wayland-devel}
37 %{?with_x11:BuildRequires:      xorg-lib-libX11-devel}
38 Provides:       vulkan(loader) = %{version}
39 Obsoletes:      vulkan-loader < 1.1
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 Common loader for Vulkan API drivers.
44
45 %description -l pl.UTF-8
46 Wspólna biblioteka wczytująca sterowniki Vulkan.
47
48 %package devel
49 Summary:        Development files files for the Vulkan loader
50 Summary(pl.UTF-8):      Pliki nagłówkowe loadera Vulkan
51 Group:          Development/Libraries
52 Requires:       Vulkan-Headers = %{api_version}
53 Requires:       Vulkan-Loader = %{version}-%{release}
54 Obsoletes:      vulkan-devel < 1.1.106
55
56 %description devel
57 Development files for the Vulkan loader.
58
59 %description devel -l pl.UTF-8
60 Pliki nagłówkowe loadera Vulkan.
61
62 %prep
63 %setup -q -n %{name}-%{gitref}
64
65 %build
66 %cmake -B build \
67         -DBUILD_TESTS=%{?with_tests:ON}%{!?with_tests:OFF} \
68         -DBUILD_WSI_WAYLAND_SUPPORT=%{?with_wayland:ON}%{!?with_wayland:OFF} \
69         -DBUILD_WSI_XLIB_SUPPORT=%{?with_x11:ON}%{!?with_x11:OFF} \
70         -DBUILD_WSI_XCB_SUPPORT=%{?with_x11:ON}%{!?with_x11:OFF}
71
72 %{__make} -C build
73
74 %if %{with tests}
75 cd build/tests
76 LC_ALL=C.UTF-8 \
77 LD_LIBRARY_PATH=../loader:layers \
78 VK_LAYER_PATH=layers \
79 ./run_loader_tests.sh
80 %endif
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_datadir}}/vulkan/{icd.d,explicit_layer.d,implicit_layer.d}
85
86 %{__make} -C build install \
87         DESTDIR=$RPM_BUILD_ROOT
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92 %post   -p /sbin/ldconfig
93 %postun -p /sbin/ldconfig
94
95 %files
96 %defattr(644,root,root,755)
97 %doc README.md GOVERNANCE.md CONTRIBUTING.md
98 %dir %{_sysconfdir}/vulkan
99 %dir %{_sysconfdir}/vulkan/icd.d
100 %dir %{_sysconfdir}/vulkan/explicit_layer.d
101 %dir %{_sysconfdir}/vulkan/implicit_layer.d
102 %dir %{_datadir}/vulkan
103 %dir %{_datadir}/vulkan/icd.d
104 %dir %{_datadir}/vulkan/explicit_layer.d
105 %dir %{_datadir}/vulkan/implicit_layer.d
106 %attr(755,root,root) %{_libdir}/libvulkan.so.1.*.*
107 %attr(755,root,root) %ghost %{_libdir}/libvulkan.so.1
108
109 %files devel
110 %defattr(644,root,root,755)
111 %attr(755,root,root) %{_libdir}/libvulkan.so
112 %{_pkgconfigdir}/vulkan.pc
113 %{_libdir}/cmake/VulkanLoader
This page took 0.144804 seconds and 4 git commands to generate.