fix build with kernel 5.7
[packages/xorg-driver-video-nvidia-legacy-390xx.git] / xorg-driver-video-nvidia-legacy-390xx.spec
CommitLineData
2b14e59b 1# TODO
17fdb673 2# - should -libs Require main package?
8a7af30b 3# - drop binary-only nvidia-settings from here, and use nvidia-settings.spec for it?
0dbede64 4# - kernel-drm is required on never kernels. driver for kernel-longterm not requires drm
28142503
PS
5#
6# Conditional build:
538b2e0c 7%bcond_with glvnd # with GL vendor neutral libs
75de51d2 8%bcond_without system_libglvnd # do not use system libglvnd
bf683e7a 9%bcond_without kernel # without kernel packages
1820d34b 10%bcond_without userspace # don't build userspace programs
5da85237 11%bcond_with settings # package nvidia-settings here (GPL version of same packaged from nvidia-settings.spec)
a14b5013 12%bcond_with verbose # verbose build (V=1)
13
e4947020
JR
14# The goal here is to have main, userspace, package built once with
15# simple release number, and only rebuild kernel packages with kernel
16# version as part of release number, without the need to bump release
17# with every kernel change.
18%if 0%{?_pld_builder:1} && %{with kernel} && %{with userspace}
19%{error:kernel and userspace cannot be built at the same time on PLD builders}
20exit 1
21%endif
22
8d2b2a19
JP
23%if %{with glvnd}
24%define vulkan_lib libGLX_nvidia.so.0
25%else
26%define vulkan_lib libGL.so.1
27%endif
28
c543fa7c
ER
29%if %{without userspace}
30# nothing to be placed to debuginfo package
31%define _enable_debug_packages 0
32%endif
e4947020 33
7cbecde6 34%define no_install_post_check_so 1
c5bb5957 35
ecd2497a 36%define rel 6
a7e1fe10 37%define pname xorg-driver-video-nvidia-legacy-390xx
974295b8 38Summary: Linux Drivers for nVidia GeForce/Quadro Chips
754fc4fe 39Summary(hu.UTF-8): Linux meghajtók nVidia GeForce/Quadro chipekhez
974295b8 40Summary(pl.UTF-8): Sterowniki do kart graficznych nVidia GeForce/Quadro
e4947020 41Name: %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
8a7af30b 42# when updating version here, keep nvidia-settings.spec in sync as well
5a7adc0d 43Version: 390.132
e4947020 44Release: %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
d7c1ffa0 45Epoch: 1
28142503 46License: nVidia Binary
4a185d32 47Group: X11
82c24b90 48Source0: http://us.download.nvidia.com/XFree86/Linux-x86/%{version}/NVIDIA-Linux-x86-%{version}.run
5a7adc0d 49# Source0-md5: 2677480ee20cd4918b1de9289b2d0af8
82c24b90 50Source1: http://us.download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x86_64-%{version}-no-compat32.run
5a7adc0d 51# Source1-md5: dcc8f272fef30c43a68d21b3379d99aa
a14b5013 52Source2: %{pname}-xinitrc.sh
236b5374 53Source3: gl.pc.in
cd436d42
JR
54Source4: 10-nvidia.conf
55Source5: 10-nvidia-modules.conf
bcf69910
JB
56Patch0: X11-driver-nvidia-GL.patch
57Patch1: X11-driver-nvidia-desktop.patch
80f05ca0 58Patch2: kernel-5.5.patch
47227e12 59Patch3: kernel-5.6.patch
23759ce3 60Patch4: kernel-5.6-x8664.patch
bf926a14 61Patch5: kernel-5.7.patch
f517f625 62URL: http://www.nvidia.com/object/unix.html
fb27eb94
JR
63BuildRequires: rpmbuild(macros) >= 1.701
64%{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
039c7221 65BuildRequires: sed >= 4.0
0ed6aeef 66BuildConflicts: XFree86-nvidia
0703c7e8 67Requires: %{pname}-libs = %{epoch}:%{version}-%{rel}
8343d24d 68Requires: xorg-xserver-server
bf4bf75b 69Requires: xorg-xserver-server(videodrv-abi) <= 24.1
754fc4fe 70Requires: xorg-xserver-server(videodrv-abi) >= 2.0
857c0a69
JP
71Provides: ocl-icd(nvidia)
72Provides: ocl-icd-driver
82c24b90 73Provides: vulkan(icd) = 1.0.65
f3bf0f30 74Provides: xorg-driver-video
4e3e8de1 75Provides: xorg-xserver-module(glx)
2d490dca 76Obsoletes: XFree86-driver-nvidia
28142503
PS
77Obsoletes: XFree86-nvidia
78Conflicts: XFree86-OpenGL-devel <= 4.2.0-3
82c24b90 79ExclusiveArch: %{ix86} %{x8664}
b67880c3 80BuildRoot: %{tmpdir}/%{pname}-%{version}-root-%(id -u -n)
28142503 81
04ec5f0a
JR
82%define _noautoreqdep libGL.so.1 libnvcuvid.so
83# libnvidia-encode.so.*.* links with libnvcuvid.so instead of libnvcuvid.so.1
84%define _noautoreq libnvcuvid.so
28142503
PS
85
86%description
974295b8
JB
87This driver set adds improved 2D functionality to the Xorg X server as
88well as high performance OpenGL acceleration, AGP support, support for
89most flat panels, and 2D multiple monitor support. Supported hardware:
90modern NVIDIA GeForce (from GeForce2 MX) and Quadro (Quadro4 and up)
91based graphics accelerators.
28142503 92
974295b8
JB
93The older graphics chips are unsupported:
94- NV1 and RIVA 128/128ZX chips are supported in the base Xorg install
95 (nv driver)
96- TNT/TNT2/GeForce 256/GeForce2 Ultra/Quadro2 are suported by -legacy
97 drivers.
28142503 98
754fc4fe
ZU
99%description -l hu.UTF-8
100Ez a meghajtó kibővíti az Xorg X szerver 2D működését OpenGL
101gyorsítással, AGP támogatással és támogatja a több monitort.
102Támogatott hardverek: modern NVIDIA GeForce (GeForce2 MX-től) és
103Quadro (Quadro4 és újabbak) alapú grafikai gyorsítók.
104
105A régekbbi grafikus chipek nem támogatottak:
106- NV1 és RIVA 128/128ZX chipek az alap Xorg telepítéssel (nv meghajtó)
107- TNT/TNT2/GeForce 256/GeForce2 Ultra/Quadro2 a -legacy driverekkel
108 támogatottak.
109
c311612f 110%description -l pl.UTF-8
974295b8
JB
111Usprawnione sterowniki dla kart graficznych nVidia do serwera Xorg,
112dające wysokowydajną akcelerację OpenGL, obsługę AGP i wielu monitorów
1132D. Obsługują w miarę nowe karty NVIDIA GeForce (od wersji GeForce2
114MX) oraz Quadro (od wersji Quadro4).
28142503 115
974295b8
JB
116Starsze układy graficzne nie są obsługiwane przez ten pakiet:
117- NV1 i RIVA 128/128ZX są obsługiwane przez sterownik nv z Xorg
118- TNT/TNT2/GeForce 256/GeForce 2 Ultra/Quadro 2 są obsługiwane przez
119 sterowniki -legacy
28142503 120
17fdb673
JR
121%package libs
122Summary: OpenGL (GL and GLX) Nvidia libraries
123Summary(pl.UTF-8): Biblioteki OpenGL (GL i GLX) Nvidia
124Group: X11/Development/Libraries
f3b8319b 125Requires(post,postun): /sbin/ldconfig
75de51d2 126%if %{with glvnd} && %{with system_libglvnd}
538b2e0c
JP
127Requires: libglvnd
128Requires: libglvnd-libGL
129Requires: libglvnd-libGLES
130%endif
76db0ca8 131Requires: libvdpau >= 0.3
ba4c5c19 132Provides: OpenGL = 3.3
17fdb673 133Provides: OpenGL-GLX = 1.4
17fdb673
JR
134Obsoletes: X11-OpenGL-core < 1:7.0.0
135Obsoletes: X11-OpenGL-libGL < 1:7.0.0
136Obsoletes: XFree86-OpenGL-core < 1:7.0.0
137Obsoletes: XFree86-OpenGL-libGL < 1:7.0.0
17fdb673 138
4c842b35 139%description libs
17fdb673
JR
140NVIDIA OpenGL (GL and GLX only) implementation libraries.
141
4c842b35 142%description libs -l pl.UTF-8
17fdb673
JR
143Implementacja OpenGL (tylko GL i GLX) firmy NVIDIA.
144
28142503 145%package devel
63c6d4b1 146Summary: OpenGL (GL and GLX) header files
754fc4fe 147Summary(hu.UTF-8): OpenGL (GL és GLX) fejléc fájlok
63c6d4b1 148Summary(pl.UTF-8): Pliki nagłówkowe OpenGL (GL i GLX)
28142503 149Group: X11/Development/Libraries
0703c7e8 150Requires: %{pname}-libs = %{epoch}:%{version}-%{rel}
63c6d4b1 151Provides: OpenGL-GLX-devel = 1.4
1b8b7646 152Provides: OpenGL-devel = 2.1
63c6d4b1
JB
153Obsoletes: X11-OpenGL-devel-base
154Obsoletes: XFree86-OpenGL-devel-base
2d490dca 155Obsoletes: XFree86-driver-nvidia-devel
28142503
PS
156Conflicts: XFree86-OpenGL-devel < 4.3.99.902-0.3
157
158%description devel
63c6d4b1
JB
159OpenGL header files (GL and GLX only) for NVIDIA OpenGL
160implementation.
28142503 161
754fc4fe
ZU
162%description devel -l hu.UTF-8
163OpenGL fejléc fájlok (csak GL és GLX) NVIDIA OpenGL implementációhoz.
164
c311612f 165%description devel -l pl.UTF-8
63c6d4b1
JB
166Pliki nagłówkowe OpenGL (tylko GL i GLX) dla implementacji OpenGL
167firmy NVIDIA.
168
a9160796
ER
169%package doc
170Summary: Documentation for NVIDIA Graphics Driver
171Group: Documentation
fd356b88
ER
172%if "%{_rpmversion}" >= "5"
173BuildArch: noarch
174%endif
a9160796
ER
175
176%description doc
177NVIDIA Accelerated Linux Graphics Driver README and Installation
178Guide.
179
28142503
PS
180%package progs
181Summary: Tools for advanced control of nVidia graphic cards
754fc4fe 182Summary(hu.UTF-8): Eszközök az nVidia grafikus kártyák beállításához
b37addd9 183Summary(pl.UTF-8): Narzędzia do zarządzania kartami graficznymi nVidia
f12e8b24 184Group: Applications/System
0056ee0e 185Requires: %{pname} = %{epoch}:%{version}
c29343e3 186Suggests: pkgconfig
c064a147 187Obsoletes: XFree86-driver-nvidia-progs
28142503
PS
188
189%description progs
190Tools for advanced control of nVidia graphic cards.
191
754fc4fe
ZU
192%description progs -l hu.UTF-8
193Eszközök az nVidia grafikus kártyák beállításához.
194
c311612f
JR
195%description progs -l pl.UTF-8
196Narzędzia do zarządzania kartami graficznymi nVidia.
28142503 197
e4947020 198%define kernel_pkg()\
f8c3aed0 199%package -n kernel%{_alt_kernel}-video-nvidia-legacy-390xx\
e4947020
JR
200Summary: nVidia kernel module for nVidia Architecture support\
201Summary(de.UTF-8): Das nVidia-Kern-Modul für die nVidia-Architektur-Unterstützung\
202Summary(hu.UTF-8): nVidia Architektúra támogatás Linux kernelhez.\
203Summary(pl.UTF-8): Moduł jądra dla obsługi kart graficznych nVidia\
204Release: %{rel}@%{_kernel_ver_str}\
205Group: Base/Kernel\
206Requires(post,postun): /sbin/depmod\
207Requires: dev >= 2.7.7-10\
e4947020
JR
208%requires_releq_kernel\
209%if %{_kernel_version_code} >= %{_kernel_version_magic 3 10 0}\
210Requires: %{releq_kernel -n drm}\
211%endif\
212Requires(postun): %releq_kernel\
e4947020
JR
213Requires: %{pname} = %{epoch}:%{version}\
214Provides: X11-driver-nvidia(kernel)\
215Obsoletes: XFree86-nvidia-kernel\
216\
f8c3aed0 217%description -n kernel%{_alt_kernel}-video-nvidia-legacy-390xx\
e4947020
JR
218nVidia Architecture support for Linux kernel.\
219\
f8c3aed0 220%description -n kernel%{_alt_kernel}-video-nvidia-legacy-390xx -l de.UTF-8\
e4947020
JR
221Die nVidia-Architektur-Unterstützung für den Linux-Kern.\
222\
f8c3aed0 223%description -n kernel%{_alt_kernel}-video-nvidia-legacy-390xx -l hu.UTF-8\
e4947020
JR
224nVidia Architektúra támogatás Linux kernelhez.\
225\
f8c3aed0 226%description -n kernel%{_alt_kernel}-video-nvidia-legacy-390xx -l pl.UTF-8\
e4947020
JR
227Obsługa architektury nVidia dla jądra Linuksa. Pakiet wymagany przez\
228sterownik nVidii dla Xorg/XFree86.\
229\
230%if %{with kernel}\
f8c3aed0 231%files -n kernel%{_alt_kernel}-video-nvidia-legacy-390xx\
e4947020
JR
232%defattr(644,root,root,755)\
233/lib/modules/%{_kernel_ver}/misc/*.ko*\
234%endif\
235\
f8c3aed0 236%post -n kernel%{_alt_kernel}-video-nvidia-legacy-390xx\
e4947020
JR
237%depmod %{_kernel_ver}\
238\
f8c3aed0 239%postun -n kernel%{_alt_kernel}-video-nvidia-legacy-390xx\
e4947020
JR
240%depmod %{_kernel_ver}\
241%{nil}
242
243%define build_kernel_pkg()\
e4947020 244cd kernel\
e4947020 245%{__make} SYSSRC=%{_kernelsrcdir} clean\
ef40d8b8 246%{__make} SYSSRC=%{_kernelsrcdir} IGNORE_CC_MISMATCH=1 NV_VERBOSE=1 CC=%{__cc} module\
e4947020 247cd ..\
10e941a4 248%install_kernel_modules -D installed -m kernel/nvidia,kernel/nvidia-drm,kernel/nvidia-modeset -d misc\
82c24b90 249%ifarch %{x8664}\
cad4d6b5 250%install_kernel_modules -D installed -m kernel/nvidia-uvm -d misc\
82c24b90 251%endif\
e4947020
JR
252%{nil}
253
fb27eb94 254%{?with_kernel:%{expand:%create_kernel_packages}}
28142503 255
28142503
PS
256%prep
257cd %{_builddir}
82c24b90
JP
258rm -rf NVIDIA-Linux-x86*-%{version}*
259%ifarch %{ix86}
28142503 260/bin/sh %{SOURCE0} --extract-only
82c24b90
JP
261%setup -qDT -n NVIDIA-Linux-x86-%{version}
262%else
263/bin/sh %{SOURCE1} --extract-only
264%setup -qDT -n NVIDIA-Linux-x86_64-%{version}-no-compat32
265%endif
bcf69910 266%patch0 -p1
0029e8cc 267%patch1 -p1
80f05ca0 268%patch2 -p1
47227e12 269%patch3 -p1
23759ce3
JR
270%ifarch %{x8664}
271%patch4 -p1
272%endif
bf926a14 273%patch5 -p1
8481604b 274echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> kernel/Makefile.kbuild
28142503
PS
275
276%build
fb27eb94 277%{?with_kernel:%{expand:%build_kernel_packages}}
28142503
PS
278
279%install
280rm -rf $RPM_BUILD_ROOT
1820d34b
ER
281
282%if %{with userspace}
cd436d42 283install -d $RPM_BUILD_ROOT%{_libdir}/{nvidia,xorg/modules/{drivers,extensions/nvidia}} \
56656271 284 $RPM_BUILD_ROOT{%{_includedir}/GL,%{_libdir}/vdpau,%{_bindir},%{_mandir}/man1} \
054fcee3 285 $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/etc/X11/xinit/xinitrc.d} \
6c7b79fe 286 $RPM_BUILD_ROOT%{_sysconfdir}/{OpenCL/vendors,ld.so.conf.d,X11/xorg.conf.d} \
96251f94 287 $RPM_BUILD_ROOT%{_datadir}/{glvnd/egl_vendor.d,nvidia,vulkan/icd.d}
28142503 288
5da85237
ER
289%if %{with settings}
290install -p nvidia-settings $RPM_BUILD_ROOT%{_bindir}
291cp -p nvidia-settings.1* $RPM_BUILD_ROOT%{_mandir}/man1
f3bf0f30
ER
292cp -p nvidia-settings.desktop $RPM_BUILD_ROOT%{_desktopdir}
293cp -p nvidia-settings.png $RPM_BUILD_ROOT%{_pixmapsdir}
f3b8319b 294install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d/nvidia-settings.sh
5da85237
ER
295%endif
296
297install -p nvidia-{smi,xconfig,bug-report.sh} $RPM_BUILD_ROOT%{_bindir}
df1704ce
KK
298install -p nvidia-cuda-mps-{control,server} $RPM_BUILD_ROOT%{_bindir}
299cp -p nvidia-{smi,xconfig,cuda-mps-control}.1* $RPM_BUILD_ROOT%{_mandir}/man1
f3bf0f30 300install -p nvidia.icd $RPM_BUILD_ROOT%{_sysconfdir}/OpenCL/vendors
eb6ba6c9 301
cd436d42
JR
302install %{SOURCE4} $RPM_BUILD_ROOT/etc/X11/xorg.conf.d
303install %{SOURCE5} $RPM_BUILD_ROOT/etc/X11/xorg.conf.d
304sed -i -e 's|@@LIBDIR@@|%{_libdir}|g' $RPM_BUILD_ROOT/etc/X11/xorg.conf.d/10-nvidia-modules.conf
c6948e82 305install -p nvidia-drm-outputclass.conf $RPM_BUILD_ROOT/etc/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf
da05371c 306
28bd8abb
JP
307install -p nvidia-application-profiles-%{version}-key-documentation $RPM_BUILD_ROOT%{_datadir}/nvidia
308install -p nvidia-application-profiles-%{version}-rc $RPM_BUILD_ROOT%{_datadir}/nvidia
309
eb6ba6c9 310for f in \
538b2e0c 311%if %{with glvnd}
75de51d2 312%if %{without system_libglvnd}
82c24b90
JP
313 libGL.so.1.7.0 \
314 libGLX.so.0 \
315 libOpenGL.so.0 \
316 libGLdispatch.so.0 \
317 libGLESv1_CM.so.1.2.0 \
318 libGLESv2.so.2.1.0 \
319 libEGL.so.1.1.0 \
320%endif
321 libGLX_nvidia.so.%{version} \
322 libEGL_nvidia.so.%{version} \
323 libGLESv1_CM_nvidia.so.%{version} \
324 libGLESv2_nvidia.so.%{version} \
325 libnvidia-egl-wayland.so.1.0.2 \
326 libnvidia-eglcore.so.%{version} \
538b2e0c 327%else
82c24b90
JP
328 libGL.so.%{version} \
329%endif
330 libcuda.so.%{version} \
331 libnvcuvid.so.%{version} \
332 libnvidia-cfg.so.%{version} \
333 libnvidia-compiler.so.%{version} \
334 libnvidia-encode.so.%{version} \
335 libnvidia-fatbinaryloader.so.%{version} \
336 libnvidia-fbc.so.%{version} \
337 libnvidia-glcore.so.%{version} \
338 libnvidia-glsi.so.%{version} \
339 libnvidia-ifr.so.%{version} \
340 libnvidia-ml.so.%{version} \
341 libnvidia-opencl.so.%{version} \
342 libnvidia-ptxjitcompiler.so.%{version} \
343 tls/libnvidia-tls.so.%{version} \
eb6ba6c9 344; do
cd436d42 345 install -p $f $RPM_BUILD_ROOT%{_libdir}/nvidia
ffec07c8 346done
76db0ca8 347
82c24b90 348install -p libvdpau_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/vdpau
eb6ba6c9 349
cd436d42
JR
350install -p libglx.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/nvidia
351ln -s libglx.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/nvidia/libglx.so
7400930f
ER
352install -p nvidia_drv.so $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/nvidia_drv.so.%{version}
353ln -s nvidia_drv.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/nvidia_drv.so
cd436d42 354install -p libnvidia-wfb.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/nvidia
2f2dbb1c 355ln -s libnvidia-wfb.so.1 $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/nvidia/libnvidia-wfb.so
cd436d42
JR
356
357/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}/nvidia
358/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/nvidia
28142503 359
02b832fe 360cp -p gl*.h $RPM_BUILD_ROOT%{_includedir}/GL
28142503 361
76db0ca8 362ln -sf libvdpau_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/vdpau/libvdpau_nvidia.so.1
28142503 363
d626b139 364%ifarch %{x8664}
a116bc07
JR
365echo %{_libdir}/nvidia >$RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia64.conf
366echo %{_libdir}/vdpau >>$RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia64.conf
d626b139
JR
367%else
368echo %{_libdir}/nvidia >$RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia.conf
369echo %{_libdir}/vdpau >>$RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia.conf
370%endif
ffec07c8
JR
371
372# OpenGL ABI for Linux compatibility
538b2e0c 373%if %{with glvnd}
75de51d2 374%if %{without system_libglvnd}
94175128 375ln -sf libGL.so.1.7.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGL.so.1
75de51d2
JP
376ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGL.so
377ln -sf libGLX.so.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLX.so
378ln -sf libOpenGL.so.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libOpenGL.so
94175128 379ln -sf libGLESv1_CM.so.1.2.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv1_CM.so.1
75de51d2 380ln -sf libGLESv1_CM.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv1_CM.so
94175128 381ln -sf libGLESv2.so.2.1.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv2.so.2
75de51d2 382ln -sf libGLESv2.so.2 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv2.so
94175128 383ln -sf libEGL.so.1.1.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libEGL.so.1
c2ff5cb2 384ln -sf libEGL.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libEGL.so
75de51d2 385%endif
538b2e0c 386ln -sf libGLX_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLX_nvidia.so.0
10e941a4 387ln -sf libGLX_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLX_indirect.so.0
538b2e0c
JP
388ln -sf libEGL_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libEGL_nvidia.so.0
389ln -sf libGLESv1_CM_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv1_CM_nvidia.so.1
390ln -sf libGLESv2_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv2_nvidia.so.2
3427c6f3
JP
391
392install -p 10_nvidia.json $RPM_BUILD_ROOT%{_datadir}/glvnd/egl_vendor.d
538b2e0c
JP
393%else
394ln -sf libGL.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libGL.so.1
395ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGL.so
396%endif
cd436d42
JR
397ln -sf libcuda.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libcuda.so
398ln -sf libnvcuvid.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libnvcuvid.so
6c7b79fe 399
8d5d4797 400sed 's!__NV_VK_ICD__!%{vulkan_lib}!g' nvidia_icd.json.template > $RPM_BUILD_ROOT%{_datadir}/vulkan/icd.d/nvidia_icd.json
ffec07c8 401%endif
28142503 402
1fdf7dcc 403%if %{with kernel}
e4947020
JR
404install -d $RPM_BUILD_ROOT
405cp -a installed/* $RPM_BUILD_ROOT
1fdf7dcc 406%endif
28142503 407
236b5374 408install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
02b832fe
ER
409sed -e '
410 s|@@prefix@@|%{_prefix}|g;
411 s|@@libdir@@|%{_libdir}|g;
412 s|@@includedir@@|%{_includedir}|g;
413 s|@@version@@|%{version}|g' < %{SOURCE3} \
236b5374 414 > $RPM_BUILD_ROOT%{_pkgconfigdir}/gl.pc
415
28142503
PS
416%clean
417rm -rf $RPM_BUILD_ROOT
418
a641155e 419%post
2b14e59b
ER
420cat << 'EOF'
421NOTE: You must also install kernel module for this driver to work
f8c3aed0 422 kernel%{_alt_kernel}-video-nvidia-legacy-390xx-%{version}
2b14e59b 423
25b520ff 424EOF
f3b8319b 425
5ff69e47 426%post libs -p /sbin/ldconfig
cd436d42 427%postun libs -p /sbin/ldconfig
25b520ff 428
1820d34b 429%if %{with userspace}
28142503
PS
430%files
431%defattr(644,root,root,755)
8481604b 432%doc LICENSE NVIDIA_Changelog README.txt
007619d4 433%dir %{_libdir}/xorg/modules/extensions/nvidia
cd436d42 434%attr(755,root,root) %{_libdir}/xorg/modules/extensions/nvidia/libnvidia-wfb.so.*.*
4c0d0c97
JR
435%attr(755,root,root) %{_libdir}/xorg/modules/extensions/nvidia/libnvidia-wfb.so.1
436%attr(755,root,root) %{_libdir}/xorg/modules/extensions/nvidia/libnvidia-wfb.so
cd436d42 437%attr(755,root,root) %{_libdir}/xorg/modules/extensions/nvidia/libglx.so.*
4c0d0c97 438%attr(755,root,root) %{_libdir}/xorg/modules/extensions/nvidia/libglx.so
7400930f 439%attr(755,root,root) %{_libdir}/xorg/modules/drivers/nvidia_drv.so.*
cd436d42 440%attr(755,root,root) %{_libdir}/xorg/modules/drivers/nvidia_drv.so
65e71729 441%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/X11/xorg.conf.d/10-nvidia.conf
cd436d42 442%{_sysconfdir}/X11/xorg.conf.d/10-nvidia-modules.conf
c6948e82 443%{_sysconfdir}/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf
28bd8abb
JP
444%dir %{_datadir}/nvidia
445%{_datadir}/nvidia/nvidia-application-profiles-%{version}-key-documentation
446%{_datadir}/nvidia/nvidia-application-profiles-%{version}-rc
17fdb673
JR
447
448%files libs
f3b8319b 449%defattr(644,root,root,755)
f3bf0f30
ER
450%dir %{_sysconfdir}/OpenCL
451%dir %{_sysconfdir}/OpenCL/vendors
452%{_sysconfdir}/OpenCL/vendors/nvidia.icd
a116bc07 453%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ld.so.conf.d/nvidia*.conf
ffec07c8 454%dir %{_libdir}/nvidia
538b2e0c 455%if %{with glvnd}
75de51d2 456%if %{without system_libglvnd}
94175128 457%attr(755,root,root) %{_libdir}/nvidia/libGL.so.1.7.0
75de51d2
JP
458%attr(755,root,root) %ghost %{_libdir}/nvidia/libGL.so.1
459%attr(755,root,root) %{_libdir}/nvidia/libGLX.so.0
460%attr(755,root,root) %{_libdir}/nvidia/libOpenGL.so.0
461%attr(755,root,root) %{_libdir}/nvidia/libGLdispatch.so.0
94175128
JP
462%attr(755,root,root) %{_libdir}/nvidia/libGLESv1_CM.so.1.2.0
463%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLESv1_CM.so.1
464%attr(755,root,root) %{_libdir}/nvidia/libGLESv2.so.2.1.0
465%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLESv2.so.2
466%attr(755,root,root) %{_libdir}/nvidia/libEGL.so.1.1.0
467%attr(755,root,root) %ghost %{_libdir}/nvidia/libEGL.so.1
c2ff5cb2 468%endif
10e941a4
JP
469%attr(755,root,root) %ghost %{_libdir}/nvidia/libEGL_nvidia.so.0
470%attr(755,root,root) %{_libdir}/nvidia/libEGL_nvidia.so.*.*
10e941a4
JP
471%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLESv1_CM_nvidia.so.1
472%attr(755,root,root) %{_libdir}/nvidia/libGLESv1_CM_nvidia.so.*.*
10e941a4
JP
473%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLESv2_nvidia.so.2
474%attr(755,root,root) %{_libdir}/nvidia/libGLESv2_nvidia.so.*.*
10e941a4
JP
475%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLX_indirect.so.0
476%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLX_nvidia.so.0
477%attr(755,root,root) %{_libdir}/nvidia/libGLX_nvidia.so.*.*
538b2e0c 478%attr(755,root,root) %{_libdir}/nvidia/libnvidia-egl-wayland.so.*.*.*
b440dd78 479%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-egl-wayland.so.1
538b2e0c
JP
480%attr(755,root,root) %{_libdir}/nvidia/libnvidia-eglcore.so.*.*
481%else
482%attr(755,root,root) %{_libdir}/nvidia/libGL.so.*.*
483%attr(755,root,root) %ghost %{_libdir}/nvidia/libGL.so.1
484%endif
cd436d42
JR
485%attr(755,root,root) %{_libdir}/nvidia/libcuda.so.*.*
486%attr(755,root,root) %ghost %{_libdir}/nvidia/libcuda.so.1
487%attr(755,root,root) %{_libdir}/nvidia/libcuda.so
488%attr(755,root,root) %{_libdir}/nvidia/libnvcuvid.so.*.*
489%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvcuvid.so.1
490%attr(755,root,root) %{_libdir}/nvidia/libnvcuvid.so
491%attr(755,root,root) %{_libdir}/nvidia/libnvidia-cfg.so.*.*
492%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-cfg.so.1
493%attr(755,root,root) %{_libdir}/nvidia/libnvidia-compiler.so.*.*
5ee8f0c8
JR
494%attr(755,root,root) %{_libdir}/nvidia/libnvidia-encode.so.*.*
495%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-encode.so.1
10e941a4
JP
496%attr(755,root,root) %{_libdir}/nvidia/libnvidia-fatbinaryloader.so.*.*
497%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-fbc.so.1
498%attr(755,root,root) %{_libdir}/nvidia/libnvidia-fbc.so.*.*
cd436d42 499%attr(755,root,root) %{_libdir}/nvidia/libnvidia-glcore.so.*.*
10e941a4
JP
500%attr(755,root,root) %{_libdir}/nvidia/libnvidia-glsi.so.*.*
501%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-ifr.so.1
502%attr(755,root,root) %{_libdir}/nvidia/libnvidia-ifr.so.*.*
8d5d4797 503%attr(755,root,root) %{_libdir}/nvidia/libnvidia-ptxjitcompiler.so.1
cd436d42
JR
504%attr(755,root,root) %{_libdir}/nvidia/libnvidia-ml.so.*.*
505%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-ml.so.1
5ee8f0c8
JR
506%attr(755,root,root) %{_libdir}/nvidia/libnvidia-opencl.so.*.*
507%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-opencl.so.1
10e941a4 508%attr(755,root,root) %{_libdir}/nvidia/libnvidia-ptxjitcompiler.so.*.*
cd436d42 509%attr(755,root,root) %{_libdir}/nvidia/libnvidia-tls.so.*.*
76db0ca8 510%attr(755,root,root) %{_libdir}/vdpau/libvdpau_nvidia.so.*.*
f3b8319b 511%attr(755,root,root) %ghost %{_libdir}/vdpau/libvdpau_nvidia.so.1
96251f94
JP
512%if %{with glvnd}
513%{_datadir}/glvnd/egl_vendor.d/10_nvidia.json
514%endif
7c831f98 515%{_datadir}/vulkan/icd.d/nvidia_icd.json
28142503 516
28142503
PS
517%files devel
518%defattr(644,root,root,755)
73eb73e1 519%dir %{_includedir}/GL
63c6d4b1
JB
520%{_includedir}/GL/gl.h
521%{_includedir}/GL/glext.h
522%{_includedir}/GL/glx.h
523%{_includedir}/GL/glxext.h
538b2e0c 524%if %{with glvnd}
75de51d2
JP
525%if %{without system_libglvnd}
526%attr(755,root,root) %{_libdir}/nvidia/libGL.so
527%attr(755,root,root) %{_libdir}/nvidia/libGLX.so
528%attr(755,root,root) %{_libdir}/nvidia/libOpenGL.so
529%attr(755,root,root) %{_libdir}/nvidia/libGLESv1_CM.so
530%attr(755,root,root) %{_libdir}/nvidia/libGLESv2.so
10e941a4 531%attr(755,root,root) %{_libdir}/nvidia/libEGL.so
c2ff5cb2 532%endif
538b2e0c
JP
533%else
534%attr(755,root,root) %{_libdir}/nvidia/libGL.so
535%endif
236b5374 536%{_pkgconfigdir}/gl.pc
63c6d4b1 537
a9160796
ER
538%files doc
539%defattr(644,root,root,755)
8481604b 540%doc html/*
a9160796 541
d4a34ce2 542%files progs
01766b04 543%defattr(644,root,root,755)
8481604b 544%attr(755,root,root) %{_bindir}/nvidia-bug-report.sh
df1704ce
KK
545%attr(755,root,root) %{_bindir}/nvidia-cuda-mps-control
546%attr(755,root,root) %{_bindir}/nvidia-cuda-mps-server
8481604b 547%attr(755,root,root) %{_bindir}/nvidia-smi
225cc701 548%attr(755,root,root) %{_bindir}/nvidia-xconfig
df1704ce 549%{_mandir}/man1/nvidia-cuda-mps-control.1*
5da85237
ER
550%{_mandir}/man1/nvidia-smi.1*
551%{_mandir}/man1/nvidia-xconfig.1*
552%if %{with settings}
2a45f872 553%attr(755,root,root) /etc/X11/xinit/xinitrc.d/*.sh
5da85237
ER
554%attr(755,root,root) %{_bindir}/nvidia-settings
555%{_mandir}/man1/nvidia-settings.1*
225cc701 556%{_desktopdir}/nvidia-settings.desktop
225cc701 557%{_pixmapsdir}/nvidia-settings.png
1820d34b 558%endif
d626b139 559%endif
This page took 0.824059 seconds and 4 git commands to generate.