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