summaryrefslogtreecommitdiff
path: root/packaging/vulkan-validation-layers.spec
blob: 9a837ac01426ba5f4b408c0fa2169dc9ad041bb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Name:       vulkan-validation-layers
Version:    1.3.240
Release:    0
Summary:    Vulkan validation layers
Group:      Graphics & UI Framework/GL
License:    Apache-2.0
Source:     %{name}-%{version}.tar.gz
Source1001: %{name}.manifest

BuildRequires:  cmake
BuildRequires:  python3
BuildRequires:  vulkan-headers = %{version}
BuildRequires:  glslang-devel
BuildRequires:  pkgconfig(SPIRV-Tools) = 2023.1.1
BuildRequires:  spirv-tools
BuildRequires:  vulkan-loader-devel
BuildRequires:  pkgconfig(wayland-client)
BuildRequires:  spirv-headers
BuildRequires:  spirv-headers-devel

%define BUILD_TYPE Debug

%description
This project provides the Vulkan validation layers.

%package        devel
Summary:        Development files for %{name}
Requires:       vulkan-headers

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%prep
%setup -q

%build
cp %{SOURCE1001} .
export CFLAGS="$CFLAGS -w -Wno-psabi"
export CXXFLAGS="$CXXFLAGS -w -Wno-psabi"
cmake . -DCMAKE_BUILD_TYPE=%{BUILD_TYPE} \
      -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF -DBUILD_WSI_WAYLAND_SUPPORT=ON \
      -DGLSLANG_INSTALL_DIR=%{_bindir} -DSPIRV_HEADERS_INSTALL_DIR=%{_includedir}/spirv \
      -DVULKAN_HEADERS_INSTALL_DIR=/usr -DSPIRV_HEADERS_INCLUDE_DIR=%{_includedir} \
      -DUSE_ROBIN_HOOD_HASHING=OFF \
      -DCMAKE_INSTALL_LIBDIR=%{_libdir} -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}/vulkan \
      -DCMAKE_INSTALL_DATADIR=%{_datadir} -DCMAKE_INSTALL_BINDIR=%{_bindir}
make -j8

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_includedir}/vulkan
%make_install
cp -a ./layers/generated/*.h %{buildroot}%{_includedir}/vulkan

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%manifest %{name}.manifest
%license LICENSE.txt
%defattr(-,root,root,-)
%{_includedir}/vulkan/*
%{_libdir}/libVkLayer_khronos_validation.so
/usr/share/vulkan/explicit_layer.d/*

%files devel
%defattr(-,root,root,-)
%{_includedir}/vulkan/