%endif
%define USE_VULKAN 0
+%define VULKAN_DRIVER broadcom
%description
Mesa is a 3-D graphics library with an API which is very similar to
-Dvulkan-drivers=""
%else
%if "%{USE_VULKAN}" == "1"
- -Dvulkan-drivers="broadcom" \
+ -Dvulkan-drivers="%{VULKAN_DRIVER}" \
%endif
-Dgallium-drivers="vc4,v3d,kmsro,swrast"
%endif
%install
DESTDIR=%{buildroot} ninja -C build/ install
mkdir -p %{buildroot}%{_hal_libdir}/driver
-mkdir -p %{buildroot}%{_hal_libdir}/dri
cp -a %{buildroot}%{_libdir}/libEGL* %{buildroot}%{_hal_libdir}/driver/
cp -a %{buildroot}%{_libdir}/libGLES* %{buildroot}%{_hal_libdir}/driver/
-cp -a %{buildroot}%{_libdir}/dri/* %{buildroot}%{_hal_libdir}/dri/
cp -a %{buildroot}%{_libdir}/libglapi* %{buildroot}%{_hal_libdir}/
+mv %{buildroot}%{_libdir}/dri %{buildroot}%{_hal_libdir}/dri
%if "%{USE_VULKAN}" == "1"
-cp -a %{buildroot}%{_libdir}/libvulkan* %{buildroot}%{_hal_libdir}/
+mv %{buildroot}%{_libdir}/libvulkan_%{VULKAN_DRIVER}.so %{buildroot}%{_hal_libdir}/
+ln -sf %{_hal_libdir}/libvulkan_%{VULKAN_DRIVER}.so %{buildroot}%{_libdir}/libvulkan_%{VULKAN_DRIVER}.so
%endif
ln -sf %{_hal_libdir}/dri %{buildroot}%{_libdir}/dri
-ln -sf %{_hal_libdri}/libglapi.so.0.0.0 %{buildroot}%{_libdir}/libglapi.0.0.0
+ln -sf %{_hal_libdir}/libglapi.so.0.0.0 %{buildroot}%{_libdir}/libglapi.0.0.0
mkdir -p %{buildroot}%{_udevrulesdir}
cp 99-GPU-Acceleration.rules %{buildroot}%{_udevrulesdir}
%{_libdir}/dri
%{_libdir}/libgbm*
%if "%{USE_VULKAN}" == "1"
-%{_hal_libdir}/libvulkan*
+%{_hal_libdir}/libvulkan_%{VULKAN_DRIVER}.so
+%{_libdir}/libvulkan_%{VULKAN_DRIVER}.so
/usr/share/vulkan/icd.d/*
%endif
%{_udevrulesdir}/99-GPU-Acceleration.rules