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