select proper vulkan lib based on glvnd bcond
authorJan Palus <atler@pld-linux.org>
Fri, 30 Jun 2017 22:24:52 +0000 (00:24 +0200)
committerJan Palus <atler@pld-linux.org>
Fri, 30 Jun 2017 22:24:52 +0000 (00:24 +0200)
xorg-driver-video-nvidia.spec

index 83f92e8..4410826 100644 (file)
 exit 1
 %endif
 
+%if %{with glvnd}
+%define                vulkan_lib      libGLX_nvidia.so.0
+%else
+%define                vulkan_lib      libGL.so.1
+%endif
+
 %if %{without userspace}
 # nothing to be placed to debuginfo package
 %define                _enable_debug_packages  0
@@ -364,7 +370,7 @@ ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGL.so
 ln -sf libcuda.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libcuda.so
 ln -sf libnvcuvid.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libnvcuvid.so
 
-install nvidia_icd.json $RPM_BUILD_ROOT%{_datadir}/vulkan/icd.d
+sed 's!"library_path":[[:blank:]]*"[^"]\+"!"library_path": "%{vulkan_lib}"!g' nvidia_icd.json > $RPM_BUILD_ROOT%{_datadir}/vulkan/icd.d/nvidia_icd.json
 %endif
 
 %if %{with kernel}
This page took 0.085937 seconds and 4 git commands to generate.