drop "glvnd" bcond (glvnd-less libs no longer provided)
[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
1f3a72f3 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
1f3a72f3 36Version: 435.21
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
1f3a72f3 42# Source0-md5: 050acb0aecc93ba15d1fc609ee82bebe
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
7f0cefc2 55Requires: xorg-xserver-server(videodrv-abi) <= 24.0
f1773542 56Requires: xorg-xserver-server(videodrv-abi) >= 4.0
857c0a69
JP
57Provides: ocl-icd(nvidia)
58Provides: ocl-icd-driver
1f3a72f3 59Provides: vulkan(icd) = 1.1.109
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
JR
231cd kernel\
232#cat >> Makefile <<'EOF'\
233#\
234#$(obj)/nv-kernel.o: $(src)/nv-kernel.o.bin\
235# cp $< $@\
236#EOF\
237#mv nv-kernel.o{,.bin}\
238#build_kernel_modules -m nvidia\
239%{__make} SYSSRC=%{_kernelsrcdir} clean\
ef40d8b8 240%{__make} SYSSRC=%{_kernelsrcdir} IGNORE_CC_MISMATCH=1 NV_VERBOSE=1 CC=%{__cc} module\
e4947020 241cd ..\
10e941a4 242%install_kernel_modules -D installed -m kernel/nvidia,kernel/nvidia-drm,kernel/nvidia-modeset -d misc\
cad4d6b5 243%install_kernel_modules -D installed -m kernel/nvidia-uvm -d misc\
e4947020
JR
244%{nil}
245
fb27eb94 246%{?with_kernel:%{expand:%create_kernel_packages}}
d626b139 247%endif
28142503 248
28142503
PS
249%prep
250cd %{_builddir}
7f0cefc2 251rm -rf NVIDIA-Linux-x86_64-%{version}
28142503 252/bin/sh %{SOURCE0} --extract-only
7f0cefc2 253%setup -qDT -n NVIDIA-Linux-x86_64-%{version}
bcf69910 254%patch0 -p1
8481604b 255echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> kernel/Makefile.kbuild
28142503
PS
256
257%build
d626b139 258%ifarch %{x8664}
fb27eb94 259%{?with_kernel:%{expand:%build_kernel_packages}}
d626b139 260%endif
28142503
PS
261
262%install
263rm -rf $RPM_BUILD_ROOT
1820d34b
ER
264
265%if %{with userspace}
cd436d42 266install -d $RPM_BUILD_ROOT%{_libdir}/{nvidia,xorg/modules/{drivers,extensions/nvidia}} \
117b7720 267 $RPM_BUILD_ROOT{%{_libdir}/vdpau,%{_bindir},%{_mandir}/man1} \
054fcee3 268 $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/etc/X11/xinit/xinitrc.d} \
6c7b79fe 269 $RPM_BUILD_ROOT%{_sysconfdir}/{OpenCL/vendors,ld.so.conf.d,X11/xorg.conf.d} \
96251f94 270 $RPM_BUILD_ROOT%{_datadir}/{glvnd/egl_vendor.d,nvidia,vulkan/icd.d}
28142503 271
d626b139 272%ifarch %{x8664}
5da85237
ER
273%if %{with settings}
274install -p nvidia-settings $RPM_BUILD_ROOT%{_bindir}
275cp -p nvidia-settings.1* $RPM_BUILD_ROOT%{_mandir}/man1
f3bf0f30
ER
276cp -p nvidia-settings.desktop $RPM_BUILD_ROOT%{_desktopdir}
277cp -p nvidia-settings.png $RPM_BUILD_ROOT%{_pixmapsdir}
f3b8319b 278install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d/nvidia-settings.sh
5da85237
ER
279%endif
280
281install -p nvidia-{smi,xconfig,bug-report.sh} $RPM_BUILD_ROOT%{_bindir}
df1704ce
KK
282install -p nvidia-cuda-mps-{control,server} $RPM_BUILD_ROOT%{_bindir}
283cp -p nvidia-{smi,xconfig,cuda-mps-control}.1* $RPM_BUILD_ROOT%{_mandir}/man1
f3bf0f30 284install -p nvidia.icd $RPM_BUILD_ROOT%{_sysconfdir}/OpenCL/vendors
eb6ba6c9 285
cd436d42
JR
286install %{SOURCE4} $RPM_BUILD_ROOT/etc/X11/xorg.conf.d
287install %{SOURCE5} $RPM_BUILD_ROOT/etc/X11/xorg.conf.d
288sed -i -e 's|@@LIBDIR@@|%{_libdir}|g' $RPM_BUILD_ROOT/etc/X11/xorg.conf.d/10-nvidia-modules.conf
c6948e82 289install -p nvidia-drm-outputclass.conf $RPM_BUILD_ROOT/etc/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf
da05371c 290
28bd8abb
JP
291install -p nvidia-application-profiles-%{version}-key-documentation $RPM_BUILD_ROOT%{_datadir}/nvidia
292install -p nvidia-application-profiles-%{version}-rc $RPM_BUILD_ROOT%{_datadir}/nvidia
d626b139
JR
293%endif
294
295%ifarch %{ix86}
296%define srcdir 32
297%else
298%define srcdir .
299%endif
28bd8abb 300
eb6ba6c9 301for f in \
75de51d2 302%if %{without system_libglvnd}
d626b139
JR
303 %{srcdir}/libGL.so.1.7.0 \
304 %{srcdir}/libGLX.so.0 \
305 %{srcdir}/libOpenGL.so.0 \
306 %{srcdir}/libGLdispatch.so.0 \
307 %{srcdir}/libGLESv1_CM.so.1.2.0 \
308 %{srcdir}/libGLESv2.so.2.1.0 \
309 %{srcdir}/libEGL.so.1.1.0 \
310%endif
311 %{srcdir}/libGLX_nvidia.so.%{version} \
312 %{srcdir}/libEGL_nvidia.so.%{version} \
313 %{srcdir}/libGLESv1_CM_nvidia.so.%{version} \
314 %{srcdir}/libGLESv2_nvidia.so.%{version} \
315%ifarch %{x8664}
1f3a72f3 316 %{srcdir}/libnvidia-egl-wayland.so.1.1.3 \
d626b139 317 %{srcdir}/libnvidia-eglcore.so.%{version} \
d626b139
JR
318%endif
319 %{srcdir}/libcuda.so.%{version} \
320 %{srcdir}/libnvcuvid.so.%{version} \
321%ifarch %{x8664}
0f1616f9 322 %{srcdir}/libnvidia-cbl.so.%{version} \
d626b139 323 %{srcdir}/libnvidia-cfg.so.%{version} \
0f1616f9
JP
324 %{srcdir}/libnvidia-rtcore.so.%{version} \
325 %{srcdir}/libnvoptix.so.%{version} \
d626b139
JR
326%endif
327 %{srcdir}/libnvidia-compiler.so.%{version} \
328 %{srcdir}/libnvidia-encode.so.%{version} \
329 %{srcdir}/libnvidia-fatbinaryloader.so.%{version} \
330 %{srcdir}/libnvidia-fbc.so.%{version} \
331 %{srcdir}/libnvidia-glcore.so.%{version} \
332 %{srcdir}/libnvidia-glsi.so.%{version} \
333 %{srcdir}/libnvidia-glvkspirv.so.%{version} \
334 %{srcdir}/libnvidia-ifr.so.%{version} \
335 %{srcdir}/libnvidia-ml.so.%{version} \
336 %{srcdir}/libnvidia-opencl.so.%{version} \
337 %{srcdir}/libnvidia-ptxjitcompiler.so.%{version} \
f1773542 338 %{srcdir}/libnvidia-tls.so.%{version} \
eb6ba6c9 339; do
cd436d42 340 install -p $f $RPM_BUILD_ROOT%{_libdir}/nvidia
ffec07c8 341done
76db0ca8 342
672bc855 343install -p %{srcdir}/libvdpau_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/vdpau
eb6ba6c9 344
d626b139 345%ifarch %{x8664}
117b7720
JP
346install -p libglxserver_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/nvidia
347ln -s libglxserver_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/nvidia/libglxserver_nvidia.so
7400930f
ER
348install -p nvidia_drv.so $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/nvidia_drv.so.%{version}
349ln -s nvidia_drv.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/nvidia_drv.so
d626b139 350%endif
cd436d42
JR
351
352/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}/nvidia
353/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/nvidia
28142503 354
76db0ca8 355ln -sf libvdpau_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/vdpau/libvdpau_nvidia.so.1
28142503 356
d626b139 357%ifarch %{x8664}
a116bc07
JR
358echo %{_libdir}/nvidia >$RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia64.conf
359echo %{_libdir}/vdpau >>$RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia64.conf
d626b139
JR
360%else
361echo %{_libdir}/nvidia >$RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia.conf
362echo %{_libdir}/vdpau >>$RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia.conf
363%endif
ffec07c8
JR
364
365# OpenGL ABI for Linux compatibility
75de51d2 366%if %{without system_libglvnd}
94175128 367ln -sf libGL.so.1.7.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGL.so.1
75de51d2
JP
368ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGL.so
369ln -sf libGLX.so.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLX.so
370ln -sf libOpenGL.so.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libOpenGL.so
94175128 371ln -sf libGLESv1_CM.so.1.2.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv1_CM.so.1
75de51d2 372ln -sf libGLESv1_CM.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv1_CM.so
94175128 373ln -sf libGLESv2.so.2.1.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv2.so.2
75de51d2 374ln -sf libGLESv2.so.2 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv2.so
94175128 375ln -sf libEGL.so.1.1.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libEGL.so.1
c2ff5cb2 376ln -sf libEGL.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libEGL.so
75de51d2 377%endif
538b2e0c 378ln -sf libGLX_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLX_nvidia.so.0
10e941a4 379ln -sf libGLX_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLX_indirect.so.0
538b2e0c
JP
380ln -sf libEGL_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libEGL_nvidia.so.0
381ln -sf libGLESv1_CM_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv1_CM_nvidia.so.1
382ln -sf libGLESv2_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv2_nvidia.so.2
3427c6f3 383
d626b139 384%ifarch %{x8664}
3427c6f3 385install -p 10_nvidia.json $RPM_BUILD_ROOT%{_datadir}/glvnd/egl_vendor.d
d626b139 386%endif
cd436d42
JR
387ln -sf libcuda.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libcuda.so
388ln -sf libnvcuvid.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libnvcuvid.so
6c7b79fe 389
d626b139 390%ifarch %{x8664}
1f3a72f3 391install -p nvidia_icd.json $RPM_BUILD_ROOT%{_datadir}/vulkan/icd.d
ffec07c8 392%endif
d626b139 393%endif
28142503 394
d626b139 395%ifarch %{x8664}
1fdf7dcc 396%if %{with kernel}
e4947020
JR
397install -d $RPM_BUILD_ROOT
398cp -a installed/* $RPM_BUILD_ROOT
1fdf7dcc 399%endif
d626b139 400%endif
28142503 401
236b5374 402install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
02b832fe
ER
403sed -e '
404 s|@@prefix@@|%{_prefix}|g;
405 s|@@libdir@@|%{_libdir}|g;
02b832fe 406 s|@@version@@|%{version}|g' < %{SOURCE3} \
236b5374 407 > $RPM_BUILD_ROOT%{_pkgconfigdir}/gl.pc
408
28142503
PS
409%clean
410rm -rf $RPM_BUILD_ROOT
411
a641155e 412%post
2b14e59b
ER
413cat << 'EOF'
414NOTE: You must also install kernel module for this driver to work
5ff69e47 415 kernel%{_alt_kernel}-video-nvidia-%{version}
2b14e59b 416
25b520ff 417EOF
f3b8319b 418
5ff69e47 419%post libs -p /sbin/ldconfig
cd436d42 420%postun libs -p /sbin/ldconfig
25b520ff 421
1820d34b 422%if %{with userspace}
d626b139 423%ifarch %{x8664}
28142503
PS
424%files
425%defattr(644,root,root,755)
8481604b 426%doc LICENSE NVIDIA_Changelog README.txt
007619d4 427%dir %{_libdir}/xorg/modules/extensions/nvidia
117b7720
JP
428%attr(755,root,root) %{_libdir}/xorg/modules/extensions/nvidia/libglxserver_nvidia.so.*
429%attr(755,root,root) %{_libdir}/xorg/modules/extensions/nvidia/libglxserver_nvidia.so
7400930f 430%attr(755,root,root) %{_libdir}/xorg/modules/drivers/nvidia_drv.so.*
cd436d42 431%attr(755,root,root) %{_libdir}/xorg/modules/drivers/nvidia_drv.so
65e71729 432%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/X11/xorg.conf.d/10-nvidia.conf
cd436d42 433%{_sysconfdir}/X11/xorg.conf.d/10-nvidia-modules.conf
c6948e82 434%{_sysconfdir}/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf
28bd8abb
JP
435%dir %{_datadir}/nvidia
436%{_datadir}/nvidia/nvidia-application-profiles-%{version}-key-documentation
437%{_datadir}/nvidia/nvidia-application-profiles-%{version}-rc
d626b139 438%endif
17fdb673
JR
439
440%files libs
f3b8319b 441%defattr(644,root,root,755)
d626b139 442%ifarch %{x8664}
f3bf0f30
ER
443%dir %{_sysconfdir}/OpenCL
444%dir %{_sysconfdir}/OpenCL/vendors
445%{_sysconfdir}/OpenCL/vendors/nvidia.icd
d626b139 446%endif}
a116bc07 447%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ld.so.conf.d/nvidia*.conf
ffec07c8 448%dir %{_libdir}/nvidia
75de51d2 449%if %{without system_libglvnd}
94175128 450%attr(755,root,root) %{_libdir}/nvidia/libGL.so.1.7.0
75de51d2
JP
451%attr(755,root,root) %ghost %{_libdir}/nvidia/libGL.so.1
452%attr(755,root,root) %{_libdir}/nvidia/libGLX.so.0
453%attr(755,root,root) %{_libdir}/nvidia/libOpenGL.so.0
454%attr(755,root,root) %{_libdir}/nvidia/libGLdispatch.so.0
94175128
JP
455%attr(755,root,root) %{_libdir}/nvidia/libGLESv1_CM.so.1.2.0
456%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLESv1_CM.so.1
457%attr(755,root,root) %{_libdir}/nvidia/libGLESv2.so.2.1.0
458%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLESv2.so.2
459%attr(755,root,root) %{_libdir}/nvidia/libEGL.so.1.1.0
460%attr(755,root,root) %ghost %{_libdir}/nvidia/libEGL.so.1
c2ff5cb2 461%endif
10e941a4
JP
462%attr(755,root,root) %ghost %{_libdir}/nvidia/libEGL_nvidia.so.0
463%attr(755,root,root) %{_libdir}/nvidia/libEGL_nvidia.so.*.*
10e941a4
JP
464%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLESv1_CM_nvidia.so.1
465%attr(755,root,root) %{_libdir}/nvidia/libGLESv1_CM_nvidia.so.*.*
10e941a4
JP
466%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLESv2_nvidia.so.2
467%attr(755,root,root) %{_libdir}/nvidia/libGLESv2_nvidia.so.*.*
10e941a4
JP
468%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLX_indirect.so.0
469%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLX_nvidia.so.0
470%attr(755,root,root) %{_libdir}/nvidia/libGLX_nvidia.so.*.*
d626b139 471%ifarch %{x8664}
538b2e0c 472%attr(755,root,root) %{_libdir}/nvidia/libnvidia-egl-wayland.so.*.*.*
b440dd78 473%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-egl-wayland.so.1
538b2e0c 474%attr(755,root,root) %{_libdir}/nvidia/libnvidia-eglcore.so.*.*
d626b139 475%endif
cd436d42
JR
476%attr(755,root,root) %{_libdir}/nvidia/libcuda.so.*.*
477%attr(755,root,root) %ghost %{_libdir}/nvidia/libcuda.so.1
478%attr(755,root,root) %{_libdir}/nvidia/libcuda.so
479%attr(755,root,root) %{_libdir}/nvidia/libnvcuvid.so.*.*
480%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvcuvid.so.1
481%attr(755,root,root) %{_libdir}/nvidia/libnvcuvid.so
d626b139 482%ifarch %{x8664}
0f1616f9 483%attr(755,root,root) %{_libdir}/nvidia/libnvidia-cbl.so.*.*
cd436d42
JR
484%attr(755,root,root) %{_libdir}/nvidia/libnvidia-cfg.so.*.*
485%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-cfg.so.1
0f1616f9
JP
486%attr(755,root,root) %{_libdir}/nvidia/libnvidia-rtcore.so.*.*
487%attr(755,root,root) %{_libdir}/nvidia/libnvoptix.so.*.*
488%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvoptix.so.1
d626b139 489%endif
cd436d42 490%attr(755,root,root) %{_libdir}/nvidia/libnvidia-compiler.so.*.*
5ee8f0c8
JR
491%attr(755,root,root) %{_libdir}/nvidia/libnvidia-encode.so.*.*
492%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-encode.so.1
10e941a4
JP
493%attr(755,root,root) %{_libdir}/nvidia/libnvidia-fatbinaryloader.so.*.*
494%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-fbc.so.1
495%attr(755,root,root) %{_libdir}/nvidia/libnvidia-fbc.so.*.*
cd436d42 496%attr(755,root,root) %{_libdir}/nvidia/libnvidia-glcore.so.*.*
10e941a4 497%attr(755,root,root) %{_libdir}/nvidia/libnvidia-glsi.so.*.*
7f0cefc2 498%attr(755,root,root) %{_libdir}/nvidia/libnvidia-glvkspirv.so.*.*
10e941a4
JP
499%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-ifr.so.1
500%attr(755,root,root) %{_libdir}/nvidia/libnvidia-ifr.so.*.*
8d5d4797 501%attr(755,root,root) %{_libdir}/nvidia/libnvidia-ptxjitcompiler.so.1
cd436d42
JR
502%attr(755,root,root) %{_libdir}/nvidia/libnvidia-ml.so.*.*
503%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-ml.so.1
5ee8f0c8
JR
504%attr(755,root,root) %{_libdir}/nvidia/libnvidia-opencl.so.*.*
505%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-opencl.so.1
10e941a4 506%attr(755,root,root) %{_libdir}/nvidia/libnvidia-ptxjitcompiler.so.*.*
cd436d42 507%attr(755,root,root) %{_libdir}/nvidia/libnvidia-tls.so.*.*
76db0ca8 508%attr(755,root,root) %{_libdir}/vdpau/libvdpau_nvidia.so.*.*
f3b8319b 509%attr(755,root,root) %ghost %{_libdir}/vdpau/libvdpau_nvidia.so.1
d626b139 510%ifarch %{x8664}
96251f94 511%{_datadir}/glvnd/egl_vendor.d/10_nvidia.json
7c831f98 512%{_datadir}/vulkan/icd.d/nvidia_icd.json
d626b139 513%endif
28142503 514
28142503
PS
515%files devel
516%defattr(644,root,root,755)
75de51d2
JP
517%if %{without system_libglvnd}
518%attr(755,root,root) %{_libdir}/nvidia/libGL.so
519%attr(755,root,root) %{_libdir}/nvidia/libGLX.so
520%attr(755,root,root) %{_libdir}/nvidia/libOpenGL.so
521%attr(755,root,root) %{_libdir}/nvidia/libGLESv1_CM.so
522%attr(755,root,root) %{_libdir}/nvidia/libGLESv2.so
10e941a4 523%attr(755,root,root) %{_libdir}/nvidia/libEGL.so
c2ff5cb2 524%endif
236b5374 525%{_pkgconfigdir}/gl.pc
63c6d4b1 526
a9160796
ER
527%files doc
528%defattr(644,root,root,755)
8481604b 529%doc html/*
a9160796 530
d626b139 531%ifarch %{x8664}
d4a34ce2 532%files progs
01766b04 533%defattr(644,root,root,755)
8481604b 534%attr(755,root,root) %{_bindir}/nvidia-bug-report.sh
df1704ce
KK
535%attr(755,root,root) %{_bindir}/nvidia-cuda-mps-control
536%attr(755,root,root) %{_bindir}/nvidia-cuda-mps-server
8481604b 537%attr(755,root,root) %{_bindir}/nvidia-smi
225cc701 538%attr(755,root,root) %{_bindir}/nvidia-xconfig
df1704ce 539%{_mandir}/man1/nvidia-cuda-mps-control.1*
5da85237
ER
540%{_mandir}/man1/nvidia-smi.1*
541%{_mandir}/man1/nvidia-xconfig.1*
542%if %{with settings}
2a45f872 543%attr(755,root,root) /etc/X11/xinit/xinitrc.d/*.sh
5da85237
ER
544%attr(755,root,root) %{_bindir}/nvidia-settings
545%{_mandir}/man1/nvidia-settings.1*
225cc701 546%{_desktopdir}/nvidia-settings.desktop
225cc701 547%{_pixmapsdir}/nvidia-settings.png
1820d34b 548%endif
d626b139
JR
549%endif
550%endif
This page took 1.533229 seconds and 4 git commands to generate.