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