]> git.pld-linux.org Git - packages/Vulkan-Loader.git/blob - Vulkan-Loader.spec
- updated to sdk 1.2.135.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.2.135.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/releases
18 Source0:        https://github.com/KhronosGroup/Vulkan-Loader/archive/sdk-%{version}/%{name}-sdk-%{version}.tar.gz
19 # Source0-md5:  9cc783820e0116bb3dc2148d1236ae67
20 Patch0:         %{name}-system-gtest.patch
21 URL:            https://github.com/KhronosGroup/Vulkan-Loader/
22 BuildRequires:  cmake >= 3.10.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:    gtest-devel}
28 %{?with_tests: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) = %{api_version}
38 Obsoletes:      vulkan-loader
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 %patch0 -p1
64
65 %build
66 install -d build
67 cd build
68
69 # .pc file creation expect CMAKE_INSTALL_LIBDIR to be relative (to CMAKE_INSTALL_PREFIX)
70 %cmake .. \
71         -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \
72         -DBUILD_TESTS=%{?with_tests:ON}%{!?with_tests:OFF} \
73         -DBUILD_WSI_WAYLAND_SUPPORT=%{?with_wayland:ON}%{!?with_wayland:OFF} \
74         -DBUILD_WSI_XLIB_SUPPORT=%{?with_x11:ON}%{!?with_x11:OFF} \
75         -DBUILD_WSI_XCB_SUPPORT=%{?with_x11:ON}%{!?with_x11:OFF}
76
77 %{__make}
78
79 %if %{with tests}
80 cd tests
81 LC_ALL=C.UTF-8 \
82 LD_LIBRARY_PATH=../loader:layers \
83 VK_LAYER_PATH=layers \
84 ./run_loader_tests.sh
85 cd ..
86 %endif
87
88 cd ..
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_datadir}}/vulkan/{icd.d,explicit_layer.d,implicit_layer.d}
93
94 %{__make} -C build install \
95         DESTDIR=$RPM_BUILD_ROOT
96
97 %clean
98 rm -rf $RPM_BUILD_ROOT
99
100 %post   -p /sbin/ldconfig
101 %postun -p /sbin/ldconfig
102
103 %files
104 %defattr(644,root,root,755)
105 %doc README.md GOVERNANCE.md CONTRIBUTING.md
106 %dir %{_sysconfdir}/vulkan
107 %dir %{_sysconfdir}/vulkan/icd.d
108 %dir %{_sysconfdir}/vulkan/explicit_layer.d
109 %dir %{_sysconfdir}/vulkan/implicit_layer.d
110 %dir %{_datadir}/vulkan
111 %dir %{_datadir}/vulkan/icd.d
112 %dir %{_datadir}/vulkan/explicit_layer.d
113 %dir %{_datadir}/vulkan/implicit_layer.d
114 %attr(755,root,root) %{_libdir}/libvulkan.so.1.*.*
115 %attr(755,root,root) %ghost %{_libdir}/libvulkan.so.1
116
117 %files devel
118 %defattr(644,root,root,755)
119 %attr(755,root,root) %{_libdir}/libvulkan.so
120 %{_pkgconfigdir}/vulkan.pc
This page took 0.068923 seconds and 3 git commands to generate.