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