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