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