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