- updated hardware list
[packages/xorg-driver-video-nvidia.git] / xorg-driver-video-nvidia.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:
b55b4acb 7%bcond_with system_libglvnd # use system libglvnd
bf683e7a 8%bcond_without kernel # without kernel packages
1820d34b 9%bcond_without userspace # don't build userspace programs
5da85237 10%bcond_with settings # package nvidia-settings here (GPL version of same packaged from nvidia-settings.spec)
a14b5013 11%bcond_with verbose # verbose build (V=1)
12
e4947020
JR
13# The goal here is to have main, userspace, package built once with
14# simple release number, and only rebuild kernel packages with kernel
15# version as part of release number, without the need to bump release
16# with every kernel change.
17%if 0%{?_pld_builder:1} && %{with kernel} && %{with userspace}
18%{error:kernel and userspace cannot be built at the same time on PLD builders}
19exit 1
20%endif
21
7cbecde6 22%define no_install_post_check_so 1
c5bb5957 23
a6591e72 24%define rel 2
f3bf0f30 25%define pname xorg-driver-video-nvidia
974295b8 26Summary: Linux Drivers for nVidia GeForce/Quadro Chips
754fc4fe 27Summary(hu.UTF-8): Linux meghajtók nVidia GeForce/Quadro chipekhez
974295b8 28Summary(pl.UTF-8): Sterowniki do kart graficznych nVidia GeForce/Quadro
e4947020 29Name: %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
8a7af30b 30# when updating version here, keep nvidia-settings.spec in sync as well
09759ac2 31Version: 465.27
e4947020 32Release: %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
d7c1ffa0 33Epoch: 1
28142503 34License: nVidia Binary
4a185d32 35Group: X11
dd40547e 36Source0: https://us.download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x86_64-%{version}.run
09759ac2 37# Source0-md5: 212e7765216ca3961409637360acce4c
a14b5013 38Source2: %{pname}-xinitrc.sh
236b5374 39Source3: gl.pc.in
cd436d42
JR
40Source4: 10-nvidia.conf
41Source5: 10-nvidia-modules.conf
117b7720 42Patch0: X11-driver-nvidia-desktop.patch
164c61ac 43URL: https://www.nvidia.com/en-us/drivers/unix/
9ec7e8e8 44BuildRequires: rpm-build >= 4.6
679b0225 45BuildRequires: rpmbuild(macros) >= 1.752
f1773542 46%{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.32}}
039c7221 47BuildRequires: sed >= 4.0
0ed6aeef 48BuildConflicts: XFree86-nvidia
0703c7e8 49Requires: %{pname}-libs = %{epoch}:%{version}-%{rel}
8343d24d 50Requires: xorg-xserver-server
78d034da 51Requires: xorg-xserver-server(videodrv-abi) <= 24.1
f1773542 52Requires: xorg-xserver-server(videodrv-abi) >= 4.0
857c0a69
JP
53Provides: ocl-icd(nvidia)
54Provides: ocl-icd-driver
ba44513b 55Provides: vulkan(icd) = 1.2.155
f3bf0f30 56Provides: xorg-driver-video
4e3e8de1 57Provides: xorg-xserver-module(glx)
d56b66df
JB
58Obsoletes: XFree86-driver-nvidia < 1.0.5336-4
59Obsoletes: XFree86-nvidia < 1.0
28142503 60Conflicts: XFree86-OpenGL-devel <= 4.2.0-3
c202a266 61ExclusiveArch: %{?with_userspace:%{ix86}} %{x8664}
b67880c3 62BuildRoot: %{tmpdir}/%{pname}-%{version}-root-%(id -u -n)
28142503 63
5ce5c6c8
JR
64%define _enable_debug_packages 0
65
04ec5f0a
JR
66# libnvidia-encode.so.*.* links with libnvcuvid.so instead of libnvcuvid.so.1
67%define _noautoreq libnvcuvid.so
28142503
PS
68
69%description
974295b8
JB
70This driver set adds improved 2D functionality to the Xorg X server as
71well as high performance OpenGL acceleration, AGP support, support for
5bf93a34 72most flat panels, and 2D multiple monitor support.
28142503 73
5bf93a34
JB
74Supported hardware:
75- GeForce 600 series (excluding 605/GT 610/GT 620/GT 645)
76- GeForce 600M series (GT 640M LE only)
77- GeForce 700 series (excluding GT 705)
78- GeForce 800M series (830M/840M/845M/850M/860M only)
79- GeForce 900/900M series (excluding 910M/920M)
80- GeForce 10 series (including GT 1010)
81- GeForce 10 mobile series
82- GeForce 16 series (also mobile)
83- GeForce MX100 series
84- GeForce MX200 series
85- GeForce MX300 series
86- GeForce MX400 series
87- GeForce RTX 20 series (also mobile)
88- GeForce RTX 30 series (also mobile)
89- GeForce TITAN series (GTX TITAN X/GTX TITAN Black/GTX TITAN Z)
90- NVIDIA RTX series (also mobile)
91- NVIDIA TITAN series (RTX/V/Xp)
92- NVS series (NVS 510/NVS 810 only)
93- Quadro NVS series (NVS 510/NVS 810 only)
94- Quadro Blade/Embedded series (M3000 SE/M5000 SE/P3000/P5000 only)
95- Quadro mobile series (K620M/K2200M/M*/P*/T* only)
96- Quadro series (410/K*/M*/P*/GP100/GV100 only)
97- Quadro RTX series (also mobile)
98- GRID series (K520)
99
100For older hardware see appropriate xorg-driver-video-nvidia-legacy-*
101driver series.
28142503 102
754fc4fe
ZU
103%description -l hu.UTF-8
104Ez a meghajtó kibővíti az Xorg X szerver 2D működését OpenGL
105gyorsítással, AGP támogatással és támogatja a több monitort.
754fc4fe 106
5bf93a34
JB
107Támogatott hardverek:
108- GeForce 600 series (- 605/GT 610/GT 620/GT 645)
109- GeForce 600M series (GT 640M LE)
110- GeForce 700 series (- GT 705)
111- GeForce 800M series (830M/840M/845M/850M/860M)
112- GeForce 900/900M series (- 910M/920M)
113- GeForce 10 series
114- GeForce 10 mobile series
115- GeForce 16 series (+mobile)
116- GeForce MX100 series
117- GeForce MX200 series
118- GeForce MX300 series
119- GeForce MX400 series
120- GeForce RTX 20 series (+mobile)
121- GeForce RTX 30 series (+mobile)
122- GeForce TITAN series (GTX TITAN X/GTX TITAN Black/GTX TITAN Z)
123- NVIDIA RTX series (+mobile)
124- NVIDIA TITAN series (RTX/V/Xp)
125- NVS series (NVS 510/NVS 810)
126- Quadro NVS series (NVS 510/NVS 810)
127- Quadro Blade/Embedded series (M3000 SE/M5000 SE/P3000/P5000)
128- Quadro mobile series (K620M/K2200M/M*/P*/T*)
129- Quadro series (410/K*/M*/P*/GP100/GV100)
130- Quadro RTX series (+mobile)
131- GRID series (K520)
754fc4fe 132
c311612f 133%description -l pl.UTF-8
974295b8
JB
134Usprawnione sterowniki dla kart graficznych nVidia do serwera Xorg,
135dające wysokowydajną akcelerację OpenGL, obsługę AGP i wielu monitorów
5bf93a34 1362D.
28142503 137
5bf93a34
JB
138Obsługują karty:
139- GeForce serii 600 (oprócz 605/GT 610/GT 620/GT 645)
140- GeForce serii 600M (tylko GT 640M LE)
141- GeForce serii 700 (oprócz GT 705)
142- GeForce serii 800M (tylko 830M/840M/845M/850M/860M)
143- GeForce serii 900/900M series (oprócz 910M/920M)
144- GeForce serii 10 (wraz z GT 1010)
145- GeForce serii 10 mobile
146- GeForce serii 16 (także mobile)
147- GeForce serii MX100
148- GeForce serii MX200
149- GeForce serii MX300
150- GeForce serii MX400
151- GeForce serii RTX 20 (także mobile)
152- GeForce serii RTX 30 (także mobile)
153- GeForce serii TITAN (GTX TITAN X/GTX TITAN Black/GTX TITAN Z)
154- NVIDIA serii RTX (także mobile)
155- NVIDIA serii TITAN (RTX/V/Xp)
156- serii NVS (tylko NVS 510/NVS 810)
157- Quadro serii NVS (tylko NVS 510/NVS 810)
158- Quadro serii Blade/Embedded (tylko M3000 SE/M5000 SE/P3000/P5000)
159- Quadro mobile (tylko K620M/K2200M/M*/P*/T*)
160- Quadro (tylko 410/K*/M*/P*/GP100/GV100)
161- Quadro serii RTX (także mobile)
162- GRID (K520)
28142503 163
17fdb673
JR
164%package libs
165Summary: OpenGL (GL and GLX) Nvidia libraries
166Summary(pl.UTF-8): Biblioteki OpenGL (GL i GLX) Nvidia
167Group: X11/Development/Libraries
f3b8319b 168Requires(post,postun): /sbin/ldconfig
1011cf4a 169%if %{with system_libglvnd}
538b2e0c
JP
170Requires: libglvnd
171Requires: libglvnd-libGL
172Requires: libglvnd-libGLES
173%endif
76db0ca8 174Requires: libvdpau >= 0.3
3c28cab0 175Provides: OpenGL = 4.6
17fdb673 176Provides: OpenGL-GLX = 1.4
17fdb673
JR
177Obsoletes: X11-OpenGL-core < 1:7.0.0
178Obsoletes: X11-OpenGL-libGL < 1:7.0.0
179Obsoletes: XFree86-OpenGL-core < 1:7.0.0
180Obsoletes: XFree86-OpenGL-libGL < 1:7.0.0
b55b4acb
JB
181%if %{with system_libglvnd}
182Obsoletes: xorg-driver-video-nvidia-devel < 465.27-2
183%endif
17fdb673 184
4c842b35 185%description libs
17fdb673
JR
186NVIDIA OpenGL (GL and GLX only) implementation libraries.
187
4c842b35 188%description libs -l pl.UTF-8
17fdb673
JR
189Implementacja OpenGL (tylko GL i GLX) firmy NVIDIA.
190
28142503 191%package devel
63c6d4b1 192Summary: OpenGL (GL and GLX) header files
754fc4fe 193Summary(hu.UTF-8): OpenGL (GL és GLX) fejléc fájlok
63c6d4b1 194Summary(pl.UTF-8): Pliki nagłówkowe OpenGL (GL i GLX)
28142503 195Group: X11/Development/Libraries
0703c7e8 196Requires: %{pname}-libs = %{epoch}:%{version}-%{rel}
d56b66df
JB
197Obsoletes: X11-OpenGL-devel-base < 1:7.0.0
198Obsoletes: XFree86-OpenGL-devel-base < 1:7.0.0
199Obsoletes: XFree86-driver-nvidia-devel < 1.0.5336-4
28142503
PS
200Conflicts: XFree86-OpenGL-devel < 4.3.99.902-0.3
201
202%description devel
63c6d4b1
JB
203OpenGL header files (GL and GLX only) for NVIDIA OpenGL
204implementation.
28142503 205
754fc4fe
ZU
206%description devel -l hu.UTF-8
207OpenGL fejléc fájlok (csak GL és GLX) NVIDIA OpenGL implementációhoz.
208
c311612f 209%description devel -l pl.UTF-8
63c6d4b1
JB
210Pliki nagłówkowe OpenGL (tylko GL i GLX) dla implementacji OpenGL
211firmy NVIDIA.
212
a9160796
ER
213%package doc
214Summary: Documentation for NVIDIA Graphics Driver
9ec7e8e8 215Summary(pl.UTF-8): Dokumentacja do sterownika graficznego NVIDIA
a9160796 216Group: Documentation
37ef2ff1 217BuildArch: noarch
a9160796
ER
218
219%description doc
220NVIDIA Accelerated Linux Graphics Driver README and Installation
221Guide.
222
9ec7e8e8
JB
223%description doc -l pl.UTF-8
224Plik README oraz przewodnik instalacji do akcelerowanego sterownika
225graficznego NVIDIA dla Linuksa.
226
28142503
PS
227%package progs
228Summary: Tools for advanced control of nVidia graphic cards
754fc4fe 229Summary(hu.UTF-8): Eszközök az nVidia grafikus kártyák beállításához
b37addd9 230Summary(pl.UTF-8): Narzędzia do zarządzania kartami graficznymi nVidia
f12e8b24 231Group: Applications/System
0056ee0e 232Requires: %{pname} = %{epoch}:%{version}
c29343e3 233Suggests: pkgconfig
d56b66df 234Obsoletes: XFree86-driver-nvidia-progs < 1.0.5336-4
28142503
PS
235
236%description progs
237Tools for advanced control of nVidia graphic cards.
238
754fc4fe
ZU
239%description progs -l hu.UTF-8
240Eszközök az nVidia grafikus kártyák beállításához.
241
c311612f
JR
242%description progs -l pl.UTF-8
243Narzędzia do zarządzania kartami graficznymi nVidia.
28142503 244
e4947020
JR
245%define kernel_pkg()\
246%package -n kernel%{_alt_kernel}-video-nvidia\
247Summary: nVidia kernel module for nVidia Architecture support\
248Summary(de.UTF-8): Das nVidia-Kern-Modul für die nVidia-Architektur-Unterstützung\
249Summary(hu.UTF-8): nVidia Architektúra támogatás Linux kernelhez.\
250Summary(pl.UTF-8): Moduł jądra dla obsługi kart graficznych nVidia\
251Release: %{rel}@%{_kernel_ver_str}\
252Group: Base/Kernel\
253Requires(post,postun): /sbin/depmod\
254Requires: dev >= 2.7.7-10\
e4947020
JR
255%requires_releq_kernel\
256%if %{_kernel_version_code} >= %{_kernel_version_magic 3 10 0}\
257Requires: %{releq_kernel -n drm}\
258%endif\
259Requires(postun): %releq_kernel\
e4947020
JR
260Requires: %{pname} = %{epoch}:%{version}\
261Provides: X11-driver-nvidia(kernel)\
d56b66df 262Obsoletes: XFree86-nvidia-kernel < 1.0.5336-4\
e4947020
JR
263\
264%description -n kernel%{_alt_kernel}-video-nvidia\
265nVidia Architecture support for Linux kernel.\
266\
267%description -n kernel%{_alt_kernel}-video-nvidia -l de.UTF-8\
268Die nVidia-Architektur-Unterstützung für den Linux-Kern.\
269\
270%description -n kernel%{_alt_kernel}-video-nvidia -l hu.UTF-8\
271nVidia Architektúra támogatás Linux kernelhez.\
272\
273%description -n kernel%{_alt_kernel}-video-nvidia -l pl.UTF-8\
274Obsługa architektury nVidia dla jądra Linuksa. Pakiet wymagany przez\
275sterownik nVidii dla Xorg/XFree86.\
276\
277%if %{with kernel}\
278%files -n kernel%{_alt_kernel}-video-nvidia\
279%defattr(644,root,root,755)\
280/lib/modules/%{_kernel_ver}/misc/*.ko*\
281%endif\
282\
283%post -n kernel%{_alt_kernel}-video-nvidia\
284%depmod %{_kernel_ver}\
285\
286%postun -n kernel%{_alt_kernel}-video-nvidia\
287%depmod %{_kernel_ver}\
288%{nil}
289
290%define build_kernel_pkg()\
e4947020 291cd kernel\
e4947020 292%{__make} SYSSRC=%{_kernelsrcdir} clean\
ef40d8b8 293%{__make} SYSSRC=%{_kernelsrcdir} IGNORE_CC_MISMATCH=1 NV_VERBOSE=1 CC=%{__cc} module\
e4947020 294cd ..\
10e941a4 295%install_kernel_modules -D installed -m kernel/nvidia,kernel/nvidia-drm,kernel/nvidia-modeset -d misc\
cad4d6b5 296%install_kernel_modules -D installed -m kernel/nvidia-uvm -d misc\
e4947020
JR
297%{nil}
298
db599715 299%ifarch %{x8664}
fb27eb94 300%{?with_kernel:%{expand:%create_kernel_packages}}
d626b139 301%endif
28142503 302
28142503
PS
303%prep
304cd %{_builddir}
7f0cefc2 305rm -rf NVIDIA-Linux-x86_64-%{version}
28142503 306/bin/sh %{SOURCE0} --extract-only
7f0cefc2 307%setup -qDT -n NVIDIA-Linux-x86_64-%{version}
bcf69910 308%patch0 -p1
8481604b 309echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> kernel/Makefile.kbuild
28142503
PS
310
311%build
d626b139 312%ifarch %{x8664}
fb27eb94 313%{?with_kernel:%{expand:%build_kernel_packages}}
d626b139 314%endif
28142503
PS
315
316%install
317rm -rf $RPM_BUILD_ROOT
1820d34b
ER
318
319%if %{with userspace}
cd436d42 320install -d $RPM_BUILD_ROOT%{_libdir}/{nvidia,xorg/modules/{drivers,extensions/nvidia}} \
117b7720 321 $RPM_BUILD_ROOT{%{_libdir}/vdpau,%{_bindir},%{_mandir}/man1} \
054fcee3 322 $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/etc/X11/xinit/xinitrc.d} \
6c7b79fe 323 $RPM_BUILD_ROOT%{_sysconfdir}/{OpenCL/vendors,ld.so.conf.d,X11/xorg.conf.d} \
96251f94 324 $RPM_BUILD_ROOT%{_datadir}/{glvnd/egl_vendor.d,nvidia,vulkan/icd.d}
28142503 325
d626b139 326%ifarch %{x8664}
5da85237
ER
327%if %{with settings}
328install -p nvidia-settings $RPM_BUILD_ROOT%{_bindir}
329cp -p nvidia-settings.1* $RPM_BUILD_ROOT%{_mandir}/man1
f3bf0f30
ER
330cp -p nvidia-settings.desktop $RPM_BUILD_ROOT%{_desktopdir}
331cp -p nvidia-settings.png $RPM_BUILD_ROOT%{_pixmapsdir}
f3b8319b 332install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d/nvidia-settings.sh
5da85237
ER
333%endif
334
335install -p nvidia-{smi,xconfig,bug-report.sh} $RPM_BUILD_ROOT%{_bindir}
df1704ce
KK
336install -p nvidia-cuda-mps-{control,server} $RPM_BUILD_ROOT%{_bindir}
337cp -p nvidia-{smi,xconfig,cuda-mps-control}.1* $RPM_BUILD_ROOT%{_mandir}/man1
f3bf0f30 338install -p nvidia.icd $RPM_BUILD_ROOT%{_sysconfdir}/OpenCL/vendors
eb6ba6c9 339
cd436d42
JR
340install %{SOURCE4} $RPM_BUILD_ROOT/etc/X11/xorg.conf.d
341install %{SOURCE5} $RPM_BUILD_ROOT/etc/X11/xorg.conf.d
342sed -i -e 's|@@LIBDIR@@|%{_libdir}|g' $RPM_BUILD_ROOT/etc/X11/xorg.conf.d/10-nvidia-modules.conf
c6948e82 343install -p nvidia-drm-outputclass.conf $RPM_BUILD_ROOT/etc/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf
da05371c 344
28bd8abb
JP
345install -p nvidia-application-profiles-%{version}-key-documentation $RPM_BUILD_ROOT%{_datadir}/nvidia
346install -p nvidia-application-profiles-%{version}-rc $RPM_BUILD_ROOT%{_datadir}/nvidia
d626b139
JR
347%endif
348
349%ifarch %{ix86}
350%define srcdir 32
351%else
352%define srcdir .
353%endif
28bd8abb 354
eb6ba6c9 355for f in \
75de51d2 356%if %{without system_libglvnd}
d626b139
JR
357 %{srcdir}/libGL.so.1.7.0 \
358 %{srcdir}/libGLX.so.0 \
359 %{srcdir}/libOpenGL.so.0 \
360 %{srcdir}/libGLdispatch.so.0 \
361 %{srcdir}/libGLESv1_CM.so.1.2.0 \
362 %{srcdir}/libGLESv2.so.2.1.0 \
363 %{srcdir}/libEGL.so.1.1.0 \
364%endif
365 %{srcdir}/libGLX_nvidia.so.%{version} \
366 %{srcdir}/libEGL_nvidia.so.%{version} \
367 %{srcdir}/libGLESv1_CM_nvidia.so.%{version} \
368 %{srcdir}/libGLESv2_nvidia.so.%{version} \
369%ifarch %{x8664}
0bbb9c86 370 %{srcdir}/libnvidia-egl-wayland.so.1.1.5 \
d626b139 371 %{srcdir}/libnvidia-eglcore.so.%{version} \
d626b139
JR
372%endif
373 %{srcdir}/libcuda.so.%{version} \
374 %{srcdir}/libnvcuvid.so.%{version} \
375%ifarch %{x8664}
0f1616f9 376 %{srcdir}/libnvidia-cbl.so.%{version} \
d626b139 377 %{srcdir}/libnvidia-cfg.so.%{version} \
594c0c86 378 %{srcdir}/libnvidia-ngx.so.%{version} \
0f1616f9
JP
379 %{srcdir}/libnvidia-rtcore.so.%{version} \
380 %{srcdir}/libnvoptix.so.%{version} \
d626b139 381%endif
594c0c86 382 %{srcdir}/libnvidia-allocator.so.%{version} \
d626b139
JR
383 %{srcdir}/libnvidia-compiler.so.%{version} \
384 %{srcdir}/libnvidia-encode.so.%{version} \
d626b139
JR
385 %{srcdir}/libnvidia-fbc.so.%{version} \
386 %{srcdir}/libnvidia-glcore.so.%{version} \
387 %{srcdir}/libnvidia-glsi.so.%{version} \
388 %{srcdir}/libnvidia-glvkspirv.so.%{version} \
389 %{srcdir}/libnvidia-ifr.so.%{version} \
390 %{srcdir}/libnvidia-ml.so.%{version} \
391 %{srcdir}/libnvidia-opencl.so.%{version} \
594c0c86 392 %{srcdir}/libnvidia-opticalflow.so.%{version} \
d626b139 393 %{srcdir}/libnvidia-ptxjitcompiler.so.%{version} \
f1773542 394 %{srcdir}/libnvidia-tls.so.%{version} \
eb6ba6c9 395; do
cd436d42 396 install -p $f $RPM_BUILD_ROOT%{_libdir}/nvidia
ffec07c8 397done
76db0ca8 398
672bc855 399install -p %{srcdir}/libvdpau_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/vdpau
eb6ba6c9 400
d626b139 401%ifarch %{x8664}
117b7720
JP
402install -p libglxserver_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/nvidia
403ln -s libglxserver_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/nvidia/libglxserver_nvidia.so
7400930f
ER
404install -p nvidia_drv.so $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/nvidia_drv.so.%{version}
405ln -s nvidia_drv.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/nvidia_drv.so
d626b139 406%endif
cd436d42
JR
407
408/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}/nvidia
409/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/nvidia
28142503 410
76db0ca8 411ln -sf libvdpau_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/vdpau/libvdpau_nvidia.so.1
28142503 412
d626b139 413%ifarch %{x8664}
a116bc07
JR
414echo %{_libdir}/nvidia >$RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia64.conf
415echo %{_libdir}/vdpau >>$RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia64.conf
d626b139
JR
416%else
417echo %{_libdir}/nvidia >$RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia.conf
418echo %{_libdir}/vdpau >>$RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia.conf
419%endif
ffec07c8
JR
420
421# OpenGL ABI for Linux compatibility
75de51d2 422%if %{without system_libglvnd}
94175128 423ln -sf libGL.so.1.7.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGL.so.1
75de51d2
JP
424ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGL.so
425ln -sf libGLX.so.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLX.so
426ln -sf libOpenGL.so.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libOpenGL.so
94175128 427ln -sf libGLESv1_CM.so.1.2.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv1_CM.so.1
75de51d2 428ln -sf libGLESv1_CM.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv1_CM.so
94175128 429ln -sf libGLESv2.so.2.1.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv2.so.2
75de51d2 430ln -sf libGLESv2.so.2 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv2.so
94175128 431ln -sf libEGL.so.1.1.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libEGL.so.1
c2ff5cb2 432ln -sf libEGL.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libEGL.so
75de51d2 433%endif
538b2e0c 434ln -sf libGLX_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLX_nvidia.so.0
10e941a4 435ln -sf libGLX_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLX_indirect.so.0
538b2e0c
JP
436ln -sf libEGL_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libEGL_nvidia.so.0
437ln -sf libGLESv1_CM_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv1_CM_nvidia.so.1
438ln -sf libGLESv2_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv2_nvidia.so.2
3427c6f3 439
d626b139 440%ifarch %{x8664}
3427c6f3 441install -p 10_nvidia.json $RPM_BUILD_ROOT%{_datadir}/glvnd/egl_vendor.d
d626b139 442%endif
cd436d42
JR
443ln -sf libcuda.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libcuda.so
444ln -sf libnvcuvid.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libnvcuvid.so
6c7b79fe 445
d626b139 446%ifarch %{x8664}
1f3a72f3 447install -p nvidia_icd.json $RPM_BUILD_ROOT%{_datadir}/vulkan/icd.d
ffec07c8 448%endif
d626b139 449%endif
28142503 450
d626b139 451%ifarch %{x8664}
1fdf7dcc 452%if %{with kernel}
e4947020
JR
453install -d $RPM_BUILD_ROOT
454cp -a installed/* $RPM_BUILD_ROOT
1fdf7dcc 455%endif
d626b139 456%endif
28142503 457
236b5374 458install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
02b832fe
ER
459sed -e '
460 s|@@prefix@@|%{_prefix}|g;
461 s|@@libdir@@|%{_libdir}|g;
02b832fe 462 s|@@version@@|%{version}|g' < %{SOURCE3} \
236b5374 463 > $RPM_BUILD_ROOT%{_pkgconfigdir}/gl.pc
464
28142503
PS
465%clean
466rm -rf $RPM_BUILD_ROOT
467
a641155e 468%post
2b14e59b
ER
469cat << 'EOF'
470NOTE: You must also install kernel module for this driver to work
5ff69e47 471 kernel%{_alt_kernel}-video-nvidia-%{version}
2b14e59b 472
25b520ff 473EOF
f3b8319b 474
5ff69e47 475%post libs -p /sbin/ldconfig
cd436d42 476%postun libs -p /sbin/ldconfig
25b520ff 477
1820d34b 478%if %{with userspace}
d626b139 479%ifarch %{x8664}
28142503
PS
480%files
481%defattr(644,root,root,755)
8481604b 482%doc LICENSE NVIDIA_Changelog README.txt
007619d4 483%dir %{_libdir}/xorg/modules/extensions/nvidia
117b7720
JP
484%attr(755,root,root) %{_libdir}/xorg/modules/extensions/nvidia/libglxserver_nvidia.so.*
485%attr(755,root,root) %{_libdir}/xorg/modules/extensions/nvidia/libglxserver_nvidia.so
7400930f 486%attr(755,root,root) %{_libdir}/xorg/modules/drivers/nvidia_drv.so.*
cd436d42 487%attr(755,root,root) %{_libdir}/xorg/modules/drivers/nvidia_drv.so
65e71729 488%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/X11/xorg.conf.d/10-nvidia.conf
cd436d42 489%{_sysconfdir}/X11/xorg.conf.d/10-nvidia-modules.conf
c6948e82 490%{_sysconfdir}/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf
28bd8abb
JP
491%dir %{_datadir}/nvidia
492%{_datadir}/nvidia/nvidia-application-profiles-%{version}-key-documentation
493%{_datadir}/nvidia/nvidia-application-profiles-%{version}-rc
d626b139 494%endif
17fdb673
JR
495
496%files libs
f3b8319b 497%defattr(644,root,root,755)
d626b139 498%ifarch %{x8664}
f3bf0f30
ER
499%dir %{_sysconfdir}/OpenCL
500%dir %{_sysconfdir}/OpenCL/vendors
501%{_sysconfdir}/OpenCL/vendors/nvidia.icd
6d0509d9 502%endif
a116bc07 503%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ld.so.conf.d/nvidia*.conf
ffec07c8 504%dir %{_libdir}/nvidia
75de51d2 505%if %{without system_libglvnd}
94175128 506%attr(755,root,root) %{_libdir}/nvidia/libGL.so.1.7.0
75de51d2 507%attr(755,root,root) %ghost %{_libdir}/nvidia/libGL.so.1
b55b4acb 508%attr(755,root,root) %{_libdir}/nvidia/libGL.so
75de51d2
JP
509%attr(755,root,root) %{_libdir}/nvidia/libGLX.so.0
510%attr(755,root,root) %{_libdir}/nvidia/libOpenGL.so.0
511%attr(755,root,root) %{_libdir}/nvidia/libGLdispatch.so.0
94175128
JP
512%attr(755,root,root) %{_libdir}/nvidia/libGLESv1_CM.so.1.2.0
513%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLESv1_CM.so.1
514%attr(755,root,root) %{_libdir}/nvidia/libGLESv2.so.2.1.0
515%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLESv2.so.2
516%attr(755,root,root) %{_libdir}/nvidia/libEGL.so.1.1.0
517%attr(755,root,root) %ghost %{_libdir}/nvidia/libEGL.so.1
c2ff5cb2 518%endif
10e941a4
JP
519%attr(755,root,root) %ghost %{_libdir}/nvidia/libEGL_nvidia.so.0
520%attr(755,root,root) %{_libdir}/nvidia/libEGL_nvidia.so.*.*
10e941a4
JP
521%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLESv1_CM_nvidia.so.1
522%attr(755,root,root) %{_libdir}/nvidia/libGLESv1_CM_nvidia.so.*.*
10e941a4
JP
523%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLESv2_nvidia.so.2
524%attr(755,root,root) %{_libdir}/nvidia/libGLESv2_nvidia.so.*.*
10e941a4
JP
525%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLX_indirect.so.0
526%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLX_nvidia.so.0
527%attr(755,root,root) %{_libdir}/nvidia/libGLX_nvidia.so.*.*
d626b139 528%ifarch %{x8664}
538b2e0c 529%attr(755,root,root) %{_libdir}/nvidia/libnvidia-egl-wayland.so.*.*.*
b440dd78 530%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-egl-wayland.so.1
538b2e0c 531%attr(755,root,root) %{_libdir}/nvidia/libnvidia-eglcore.so.*.*
d626b139 532%endif
cd436d42
JR
533%attr(755,root,root) %{_libdir}/nvidia/libcuda.so.*.*
534%attr(755,root,root) %ghost %{_libdir}/nvidia/libcuda.so.1
535%attr(755,root,root) %{_libdir}/nvidia/libcuda.so
536%attr(755,root,root) %{_libdir}/nvidia/libnvcuvid.so.*.*
537%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvcuvid.so.1
538%attr(755,root,root) %{_libdir}/nvidia/libnvcuvid.so
d626b139 539%ifarch %{x8664}
0f1616f9 540%attr(755,root,root) %{_libdir}/nvidia/libnvidia-cbl.so.*.*
cd436d42
JR
541%attr(755,root,root) %{_libdir}/nvidia/libnvidia-cfg.so.*.*
542%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-cfg.so.1
594c0c86
JP
543%attr(755,root,root) %{_libdir}/nvidia/libnvidia-ngx.so.*.*
544%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-ngx.so.1
0f1616f9
JP
545%attr(755,root,root) %{_libdir}/nvidia/libnvidia-rtcore.so.*.*
546%attr(755,root,root) %{_libdir}/nvidia/libnvoptix.so.*.*
547%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvoptix.so.1
d626b139 548%endif
594c0c86
JP
549%attr(755,root,root) %{_libdir}/nvidia/libnvidia-allocator.so.*.*
550%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-allocator.so.1
cd436d42 551%attr(755,root,root) %{_libdir}/nvidia/libnvidia-compiler.so.*.*
5ee8f0c8
JR
552%attr(755,root,root) %{_libdir}/nvidia/libnvidia-encode.so.*.*
553%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-encode.so.1
10e941a4
JP
554%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-fbc.so.1
555%attr(755,root,root) %{_libdir}/nvidia/libnvidia-fbc.so.*.*
cd436d42 556%attr(755,root,root) %{_libdir}/nvidia/libnvidia-glcore.so.*.*
10e941a4 557%attr(755,root,root) %{_libdir}/nvidia/libnvidia-glsi.so.*.*
7f0cefc2 558%attr(755,root,root) %{_libdir}/nvidia/libnvidia-glvkspirv.so.*.*
10e941a4
JP
559%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-ifr.so.1
560%attr(755,root,root) %{_libdir}/nvidia/libnvidia-ifr.so.*.*
cd436d42
JR
561%attr(755,root,root) %{_libdir}/nvidia/libnvidia-ml.so.*.*
562%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-ml.so.1
5ee8f0c8
JR
563%attr(755,root,root) %{_libdir}/nvidia/libnvidia-opencl.so.*.*
564%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-opencl.so.1
594c0c86
JP
565%attr(755,root,root) %{_libdir}/nvidia/libnvidia-opticalflow.so.*.*
566%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-opticalflow.so.1
10e941a4 567%attr(755,root,root) %{_libdir}/nvidia/libnvidia-ptxjitcompiler.so.*.*
594c0c86 568%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-ptxjitcompiler.so.1
cd436d42 569%attr(755,root,root) %{_libdir}/nvidia/libnvidia-tls.so.*.*
76db0ca8 570%attr(755,root,root) %{_libdir}/vdpau/libvdpau_nvidia.so.*.*
f3b8319b 571%attr(755,root,root) %ghost %{_libdir}/vdpau/libvdpau_nvidia.so.1
d626b139 572%ifarch %{x8664}
96251f94 573%{_datadir}/glvnd/egl_vendor.d/10_nvidia.json
7c831f98 574%{_datadir}/vulkan/icd.d/nvidia_icd.json
d626b139 575%endif
28142503 576
b55b4acb 577%if %{without system_libglvnd}
28142503
PS
578%files devel
579%defattr(644,root,root,755)
75de51d2
JP
580%attr(755,root,root) %{_libdir}/nvidia/libGLX.so
581%attr(755,root,root) %{_libdir}/nvidia/libOpenGL.so
582%attr(755,root,root) %{_libdir}/nvidia/libGLESv1_CM.so
583%attr(755,root,root) %{_libdir}/nvidia/libGLESv2.so
10e941a4 584%attr(755,root,root) %{_libdir}/nvidia/libEGL.so
236b5374 585%{_pkgconfigdir}/gl.pc
b55b4acb 586%endif
63c6d4b1 587
a9160796
ER
588%files doc
589%defattr(644,root,root,755)
8481604b 590%doc html/*
a9160796 591
d626b139 592%ifarch %{x8664}
d4a34ce2 593%files progs
01766b04 594%defattr(644,root,root,755)
8481604b 595%attr(755,root,root) %{_bindir}/nvidia-bug-report.sh
df1704ce
KK
596%attr(755,root,root) %{_bindir}/nvidia-cuda-mps-control
597%attr(755,root,root) %{_bindir}/nvidia-cuda-mps-server
8481604b 598%attr(755,root,root) %{_bindir}/nvidia-smi
225cc701 599%attr(755,root,root) %{_bindir}/nvidia-xconfig
df1704ce 600%{_mandir}/man1/nvidia-cuda-mps-control.1*
5da85237
ER
601%{_mandir}/man1/nvidia-smi.1*
602%{_mandir}/man1/nvidia-xconfig.1*
603%if %{with settings}
b55b4acb 604%attr(755,root,root) /etc/X11/xinit/xinitrc.d/nvidia-settings.sh
5da85237
ER
605%attr(755,root,root) %{_bindir}/nvidia-settings
606%{_mandir}/man1/nvidia-settings.1*
225cc701 607%{_desktopdir}/nvidia-settings.desktop
225cc701 608%{_pixmapsdir}/nvidia-settings.png
1820d34b 609%endif
d626b139
JR
610%endif
611%endif
This page took 0.435056 seconds and 4 git commands to generate.