commit 417d70bb39dc91ca615f7e15927fff74b28fb13c
Author: Simone Caronni <negativo17(a)gmail.com>
Date: Mon Apr 10 13:52:32 2017 +0200
Hardcode installation of the alternate-install-present file where nvidia-installer
expects it. Also, include it in the main package and not the library subpackage.
xorg-x11-drv-nvidia.spec | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/xorg-x11-drv-nvidia.spec b/xorg-x11-drv-nvidia.spec
index edc8b75..ea8fd92 100644
--- a/xorg-x11-drv-nvidia.spec
+++ b/xorg-x11-drv-nvidia.spec
@@ -1,6 +1,10 @@
%global _nvidia_serie nvidia
%global _nvidia_libdir %{_libdir}/%{_nvidia_serie}
%global _nvidia_xorgdir %{_nvidia_libdir}/xorg
+# Unfortunately this is always hardcoded regardless of architecture:
+#
https://github.com/NVIDIA/nvidia-installer/blob/master/misc.c#L2443
+#
https://github.com/NVIDIA/nvidia-installer/blob/master/misc.c#L2556-L2558
+%global _alternate_dir %{_prefix}/lib/nvidia
%if 0%{?rhel} || 0%{?fedora} == 24
%global _glvnd_libdir %{_libdir}/libglvnd
@@ -324,7 +328,8 @@ desktop-file-install --vendor "" \
nvidia-settings.desktop
#Alternate-install-present is checked by the nvidia .run
-install -p -m 0644 %{SOURCE7} %{buildroot}%{_nvidia_libdir}
+mkdir -p %{buildroot}%{_alternate_dir}
+install -p -m 0644 %{SOURCE7} %{buildroot}%{_alternate_dir}
#install the NVIDIA supplied application profiles
mkdir -p %{buildroot}%{_datadir}/nvidia
@@ -442,6 +447,8 @@ fi ||:
%doc nvidiapkg/README.txt
%doc nvidiapkg/nvidia-application-profiles-%{version}-rc
%doc nvidiapkg/html
+%dir %{_alternate_dir}
+%{_alternate_dir}/alternate-install-present
%ifarch x86_64 i686
%{_datadir}/vulkan/icd.d/nvidia_icd.json
%endif
@@ -503,7 +510,6 @@ fi ||:
%dir %{_libdir}
%endif
%dir %{_nvidia_libdir}
-%{_nvidia_libdir}/alternate-install-present
%{_libdir}/libEGL_nvidia.so.0
%{_libdir}/libEGL_nvidia.so.%{version}
%{_libdir}/libGLESv1_CM_nvidia.so.1