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