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