- told to support OpenGL 4.6
[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:
b55b4acb 7%bcond_with system_libglvnd # 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
a6591e72 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
09759ac2 31Version: 465.27
e4947020 32Release: %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
d7c1ffa0 33Epoch: 1
28142503 34License: nVidia Binary
4a185d32 35Group: X11
dd40547e 36Source0: https://us.download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x86_64-%{version}.run
09759ac2 37# Source0-md5: 212e7765216ca3961409637360acce4c
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
164c61ac 43URL: https://www.nvidia.com/en-us/drivers/unix/
9ec7e8e8 44BuildRequires: rpm-build >= 4.6
679b0225 45BuildRequires: rpmbuild(macros) >= 1.752
f1773542 46%{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.32}}
039c7221 47BuildRequires: sed >= 4.0
0ed6aeef 48BuildConflicts: XFree86-nvidia
0703c7e8 49Requires: %{pname}-libs = %{epoch}:%{version}-%{rel}
8343d24d 50Requires: xorg-xserver-server
78d034da 51Requires: xorg-xserver-server(videodrv-abi) <= 24.1
f1773542 52Requires: xorg-xserver-server(videodrv-abi) >= 4.0
857c0a69
JP
53Provides: ocl-icd(nvidia)
54Provides: ocl-icd-driver
ba44513b 55Provides: vulkan(icd) = 1.2.155
f3bf0f30 56Provides: xorg-driver-video
4e3e8de1 57Provides: xorg-xserver-module(glx)
d56b66df
JB
58Obsoletes: XFree86-driver-nvidia < 1.0.5336-4
59Obsoletes: XFree86-nvidia < 1.0
28142503 60Conflicts: XFree86-OpenGL-devel <= 4.2.0-3
c202a266 61ExclusiveArch: %{?with_userspace:%{ix86}} %{x8664}
b67880c3 62BuildRoot: %{tmpdir}/%{pname}-%{version}-root-%(id -u -n)
28142503 63
5ce5c6c8
JR
64%define _enable_debug_packages 0
65
04ec5f0a
JR
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
3c28cab0 115Provides: OpenGL = 4.6
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
b55b4acb
JB
121%if %{with system_libglvnd}
122Obsoletes: xorg-driver-video-nvidia-devel < 465.27-2
123%endif
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}
d56b66df
JB
137Obsoletes: X11-OpenGL-devel-base < 1:7.0.0
138Obsoletes: XFree86-OpenGL-devel-base < 1:7.0.0
139Obsoletes: XFree86-driver-nvidia-devel < 1.0.5336-4
28142503
PS
140Conflicts: XFree86-OpenGL-devel < 4.3.99.902-0.3
141
142%description devel
63c6d4b1
JB
143OpenGL header files (GL and GLX only) for NVIDIA OpenGL
144implementation.
28142503 145
754fc4fe
ZU
146%description devel -l hu.UTF-8
147OpenGL fejléc fájlok (csak GL és GLX) NVIDIA OpenGL implementációhoz.
148
c311612f 149%description devel -l pl.UTF-8
63c6d4b1
JB
150Pliki nagłówkowe OpenGL (tylko GL i GLX) dla implementacji OpenGL
151firmy NVIDIA.
152
a9160796
ER
153%package doc
154Summary: Documentation for NVIDIA Graphics Driver
9ec7e8e8 155Summary(pl.UTF-8): Dokumentacja do sterownika graficznego NVIDIA
a9160796 156Group: Documentation
37ef2ff1 157BuildArch: noarch
a9160796
ER
158
159%description doc
160NVIDIA Accelerated Linux Graphics Driver README and Installation
161Guide.
162
9ec7e8e8
JB
163%description doc -l pl.UTF-8
164Plik README oraz przewodnik instalacji do akcelerowanego sterownika
165graficznego NVIDIA dla Linuksa.
166
28142503
PS
167%package progs
168Summary: Tools for advanced control of nVidia graphic cards
754fc4fe 169Summary(hu.UTF-8): Eszközök az nVidia grafikus kártyák beállításához
b37addd9 170Summary(pl.UTF-8): Narzędzia do zarządzania kartami graficznymi nVidia
f12e8b24 171Group: Applications/System
0056ee0e 172Requires: %{pname} = %{epoch}:%{version}
c29343e3 173Suggests: pkgconfig
d56b66df 174Obsoletes: XFree86-driver-nvidia-progs < 1.0.5336-4
28142503
PS
175
176%description progs
177Tools for advanced control of nVidia graphic cards.
178
754fc4fe
ZU
179%description progs -l hu.UTF-8
180Eszközök az nVidia grafikus kártyák beállításához.
181
c311612f
JR
182%description progs -l pl.UTF-8
183Narzędzia do zarządzania kartami graficznymi nVidia.
28142503 184
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)\
d56b66df 202Obsoletes: XFree86-nvidia-kernel < 1.0.5336-4\
e4947020
JR
203\
204%description -n kernel%{_alt_kernel}-video-nvidia\
205nVidia Architecture support for Linux kernel.\
206\
207%description -n kernel%{_alt_kernel}-video-nvidia -l de.UTF-8\
208Die nVidia-Architektur-Unterstützung für den Linux-Kern.\
209\
210%description -n kernel%{_alt_kernel}-video-nvidia -l hu.UTF-8\
211nVidia Architektúra támogatás Linux kernelhez.\
212\
213%description -n kernel%{_alt_kernel}-video-nvidia -l pl.UTF-8\
214Obsługa architektury nVidia dla jądra Linuksa. Pakiet wymagany przez\
215sterownik nVidii dla Xorg/XFree86.\
216\
217%if %{with kernel}\
218%files -n kernel%{_alt_kernel}-video-nvidia\
219%defattr(644,root,root,755)\
220/lib/modules/%{_kernel_ver}/misc/*.ko*\
221%endif\
222\
223%post -n kernel%{_alt_kernel}-video-nvidia\
224%depmod %{_kernel_ver}\
225\
226%postun -n kernel%{_alt_kernel}-video-nvidia\
227%depmod %{_kernel_ver}\
228%{nil}
229
230%define build_kernel_pkg()\
e4947020 231cd kernel\
e4947020 232%{__make} SYSSRC=%{_kernelsrcdir} clean\
ef40d8b8 233%{__make} SYSSRC=%{_kernelsrcdir} IGNORE_CC_MISMATCH=1 NV_VERBOSE=1 CC=%{__cc} module\
e4947020 234cd ..\
10e941a4 235%install_kernel_modules -D installed -m kernel/nvidia,kernel/nvidia-drm,kernel/nvidia-modeset -d misc\
cad4d6b5 236%install_kernel_modules -D installed -m kernel/nvidia-uvm -d misc\
e4947020
JR
237%{nil}
238
db599715 239%ifarch %{x8664}
fb27eb94 240%{?with_kernel:%{expand:%create_kernel_packages}}
d626b139 241%endif
28142503 242
28142503
PS
243%prep
244cd %{_builddir}
7f0cefc2 245rm -rf NVIDIA-Linux-x86_64-%{version}
28142503 246/bin/sh %{SOURCE0} --extract-only
7f0cefc2 247%setup -qDT -n NVIDIA-Linux-x86_64-%{version}
bcf69910 248%patch0 -p1
8481604b 249echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> kernel/Makefile.kbuild
28142503
PS
250
251%build
d626b139 252%ifarch %{x8664}
fb27eb94 253%{?with_kernel:%{expand:%build_kernel_packages}}
d626b139 254%endif
28142503
PS
255
256%install
257rm -rf $RPM_BUILD_ROOT
1820d34b
ER
258
259%if %{with userspace}
cd436d42 260install -d $RPM_BUILD_ROOT%{_libdir}/{nvidia,xorg/modules/{drivers,extensions/nvidia}} \
117b7720 261 $RPM_BUILD_ROOT{%{_libdir}/vdpau,%{_bindir},%{_mandir}/man1} \
054fcee3 262 $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/etc/X11/xinit/xinitrc.d} \
6c7b79fe 263 $RPM_BUILD_ROOT%{_sysconfdir}/{OpenCL/vendors,ld.so.conf.d,X11/xorg.conf.d} \
96251f94 264 $RPM_BUILD_ROOT%{_datadir}/{glvnd/egl_vendor.d,nvidia,vulkan/icd.d}
28142503 265
d626b139 266%ifarch %{x8664}
5da85237
ER
267%if %{with settings}
268install -p nvidia-settings $RPM_BUILD_ROOT%{_bindir}
269cp -p nvidia-settings.1* $RPM_BUILD_ROOT%{_mandir}/man1
f3bf0f30
ER
270cp -p nvidia-settings.desktop $RPM_BUILD_ROOT%{_desktopdir}
271cp -p nvidia-settings.png $RPM_BUILD_ROOT%{_pixmapsdir}
f3b8319b 272install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d/nvidia-settings.sh
5da85237
ER
273%endif
274
275install -p nvidia-{smi,xconfig,bug-report.sh} $RPM_BUILD_ROOT%{_bindir}
df1704ce
KK
276install -p nvidia-cuda-mps-{control,server} $RPM_BUILD_ROOT%{_bindir}
277cp -p nvidia-{smi,xconfig,cuda-mps-control}.1* $RPM_BUILD_ROOT%{_mandir}/man1
f3bf0f30 278install -p nvidia.icd $RPM_BUILD_ROOT%{_sysconfdir}/OpenCL/vendors
eb6ba6c9 279
cd436d42
JR
280install %{SOURCE4} $RPM_BUILD_ROOT/etc/X11/xorg.conf.d
281install %{SOURCE5} $RPM_BUILD_ROOT/etc/X11/xorg.conf.d
282sed -i -e 's|@@LIBDIR@@|%{_libdir}|g' $RPM_BUILD_ROOT/etc/X11/xorg.conf.d/10-nvidia-modules.conf
c6948e82 283install -p nvidia-drm-outputclass.conf $RPM_BUILD_ROOT/etc/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf
da05371c 284
28bd8abb
JP
285install -p nvidia-application-profiles-%{version}-key-documentation $RPM_BUILD_ROOT%{_datadir}/nvidia
286install -p nvidia-application-profiles-%{version}-rc $RPM_BUILD_ROOT%{_datadir}/nvidia
d626b139
JR
287%endif
288
289%ifarch %{ix86}
290%define srcdir 32
291%else
292%define srcdir .
293%endif
28bd8abb 294
eb6ba6c9 295for f in \
75de51d2 296%if %{without system_libglvnd}
d626b139
JR
297 %{srcdir}/libGL.so.1.7.0 \
298 %{srcdir}/libGLX.so.0 \
299 %{srcdir}/libOpenGL.so.0 \
300 %{srcdir}/libGLdispatch.so.0 \
301 %{srcdir}/libGLESv1_CM.so.1.2.0 \
302 %{srcdir}/libGLESv2.so.2.1.0 \
303 %{srcdir}/libEGL.so.1.1.0 \
304%endif
305 %{srcdir}/libGLX_nvidia.so.%{version} \
306 %{srcdir}/libEGL_nvidia.so.%{version} \
307 %{srcdir}/libGLESv1_CM_nvidia.so.%{version} \
308 %{srcdir}/libGLESv2_nvidia.so.%{version} \
309%ifarch %{x8664}
0bbb9c86 310 %{srcdir}/libnvidia-egl-wayland.so.1.1.5 \
d626b139 311 %{srcdir}/libnvidia-eglcore.so.%{version} \
d626b139
JR
312%endif
313 %{srcdir}/libcuda.so.%{version} \
314 %{srcdir}/libnvcuvid.so.%{version} \
315%ifarch %{x8664}
0f1616f9 316 %{srcdir}/libnvidia-cbl.so.%{version} \
d626b139 317 %{srcdir}/libnvidia-cfg.so.%{version} \
594c0c86 318 %{srcdir}/libnvidia-ngx.so.%{version} \
0f1616f9
JP
319 %{srcdir}/libnvidia-rtcore.so.%{version} \
320 %{srcdir}/libnvoptix.so.%{version} \
d626b139 321%endif
594c0c86 322 %{srcdir}/libnvidia-allocator.so.%{version} \
d626b139
JR
323 %{srcdir}/libnvidia-compiler.so.%{version} \
324 %{srcdir}/libnvidia-encode.so.%{version} \
d626b139
JR
325 %{srcdir}/libnvidia-fbc.so.%{version} \
326 %{srcdir}/libnvidia-glcore.so.%{version} \
327 %{srcdir}/libnvidia-glsi.so.%{version} \
328 %{srcdir}/libnvidia-glvkspirv.so.%{version} \
329 %{srcdir}/libnvidia-ifr.so.%{version} \
330 %{srcdir}/libnvidia-ml.so.%{version} \
331 %{srcdir}/libnvidia-opencl.so.%{version} \
594c0c86 332 %{srcdir}/libnvidia-opticalflow.so.%{version} \
d626b139 333 %{srcdir}/libnvidia-ptxjitcompiler.so.%{version} \
f1773542 334 %{srcdir}/libnvidia-tls.so.%{version} \
eb6ba6c9 335; do
cd436d42 336 install -p $f $RPM_BUILD_ROOT%{_libdir}/nvidia
ffec07c8 337done
76db0ca8 338
672bc855 339install -p %{srcdir}/libvdpau_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/vdpau
eb6ba6c9 340
d626b139 341%ifarch %{x8664}
117b7720
JP
342install -p libglxserver_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/nvidia
343ln -s libglxserver_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/nvidia/libglxserver_nvidia.so
7400930f
ER
344install -p nvidia_drv.so $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/nvidia_drv.so.%{version}
345ln -s nvidia_drv.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/nvidia_drv.so
d626b139 346%endif
cd436d42
JR
347
348/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}/nvidia
349/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/nvidia
28142503 350
76db0ca8 351ln -sf libvdpau_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/vdpau/libvdpau_nvidia.so.1
28142503 352
d626b139 353%ifarch %{x8664}
a116bc07
JR
354echo %{_libdir}/nvidia >$RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia64.conf
355echo %{_libdir}/vdpau >>$RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia64.conf
d626b139
JR
356%else
357echo %{_libdir}/nvidia >$RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia.conf
358echo %{_libdir}/vdpau >>$RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia.conf
359%endif
ffec07c8
JR
360
361# OpenGL ABI for Linux compatibility
75de51d2 362%if %{without system_libglvnd}
94175128 363ln -sf libGL.so.1.7.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGL.so.1
75de51d2
JP
364ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGL.so
365ln -sf libGLX.so.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLX.so
366ln -sf libOpenGL.so.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libOpenGL.so
94175128 367ln -sf libGLESv1_CM.so.1.2.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv1_CM.so.1
75de51d2 368ln -sf libGLESv1_CM.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv1_CM.so
94175128 369ln -sf libGLESv2.so.2.1.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv2.so.2
75de51d2 370ln -sf libGLESv2.so.2 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv2.so
94175128 371ln -sf libEGL.so.1.1.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libEGL.so.1
c2ff5cb2 372ln -sf libEGL.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libEGL.so
75de51d2 373%endif
538b2e0c 374ln -sf libGLX_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLX_nvidia.so.0
10e941a4 375ln -sf libGLX_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLX_indirect.so.0
538b2e0c
JP
376ln -sf libEGL_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libEGL_nvidia.so.0
377ln -sf libGLESv1_CM_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv1_CM_nvidia.so.1
378ln -sf libGLESv2_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv2_nvidia.so.2
3427c6f3 379
d626b139 380%ifarch %{x8664}
3427c6f3 381install -p 10_nvidia.json $RPM_BUILD_ROOT%{_datadir}/glvnd/egl_vendor.d
d626b139 382%endif
cd436d42
JR
383ln -sf libcuda.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libcuda.so
384ln -sf libnvcuvid.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libnvcuvid.so
6c7b79fe 385
d626b139 386%ifarch %{x8664}
1f3a72f3 387install -p nvidia_icd.json $RPM_BUILD_ROOT%{_datadir}/vulkan/icd.d
ffec07c8 388%endif
d626b139 389%endif
28142503 390
d626b139 391%ifarch %{x8664}
1fdf7dcc 392%if %{with kernel}
e4947020
JR
393install -d $RPM_BUILD_ROOT
394cp -a installed/* $RPM_BUILD_ROOT
1fdf7dcc 395%endif
d626b139 396%endif
28142503 397
236b5374 398install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
02b832fe
ER
399sed -e '
400 s|@@prefix@@|%{_prefix}|g;
401 s|@@libdir@@|%{_libdir}|g;
02b832fe 402 s|@@version@@|%{version}|g' < %{SOURCE3} \
236b5374 403 > $RPM_BUILD_ROOT%{_pkgconfigdir}/gl.pc
404
28142503
PS
405%clean
406rm -rf $RPM_BUILD_ROOT
407
a641155e 408%post
2b14e59b
ER
409cat << 'EOF'
410NOTE: You must also install kernel module for this driver to work
5ff69e47 411 kernel%{_alt_kernel}-video-nvidia-%{version}
2b14e59b 412
25b520ff 413EOF
f3b8319b 414
5ff69e47 415%post libs -p /sbin/ldconfig
cd436d42 416%postun libs -p /sbin/ldconfig
25b520ff 417
1820d34b 418%if %{with userspace}
d626b139 419%ifarch %{x8664}
28142503
PS
420%files
421%defattr(644,root,root,755)
8481604b 422%doc LICENSE NVIDIA_Changelog README.txt
007619d4 423%dir %{_libdir}/xorg/modules/extensions/nvidia
117b7720
JP
424%attr(755,root,root) %{_libdir}/xorg/modules/extensions/nvidia/libglxserver_nvidia.so.*
425%attr(755,root,root) %{_libdir}/xorg/modules/extensions/nvidia/libglxserver_nvidia.so
7400930f 426%attr(755,root,root) %{_libdir}/xorg/modules/drivers/nvidia_drv.so.*
cd436d42 427%attr(755,root,root) %{_libdir}/xorg/modules/drivers/nvidia_drv.so
65e71729 428%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/X11/xorg.conf.d/10-nvidia.conf
cd436d42 429%{_sysconfdir}/X11/xorg.conf.d/10-nvidia-modules.conf
c6948e82 430%{_sysconfdir}/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf
28bd8abb
JP
431%dir %{_datadir}/nvidia
432%{_datadir}/nvidia/nvidia-application-profiles-%{version}-key-documentation
433%{_datadir}/nvidia/nvidia-application-profiles-%{version}-rc
d626b139 434%endif
17fdb673
JR
435
436%files libs
f3b8319b 437%defattr(644,root,root,755)
d626b139 438%ifarch %{x8664}
f3bf0f30
ER
439%dir %{_sysconfdir}/OpenCL
440%dir %{_sysconfdir}/OpenCL/vendors
441%{_sysconfdir}/OpenCL/vendors/nvidia.icd
6d0509d9 442%endif
a116bc07 443%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ld.so.conf.d/nvidia*.conf
ffec07c8 444%dir %{_libdir}/nvidia
75de51d2 445%if %{without system_libglvnd}
94175128 446%attr(755,root,root) %{_libdir}/nvidia/libGL.so.1.7.0
75de51d2 447%attr(755,root,root) %ghost %{_libdir}/nvidia/libGL.so.1
b55b4acb 448%attr(755,root,root) %{_libdir}/nvidia/libGL.so
75de51d2
JP
449%attr(755,root,root) %{_libdir}/nvidia/libGLX.so.0
450%attr(755,root,root) %{_libdir}/nvidia/libOpenGL.so.0
451%attr(755,root,root) %{_libdir}/nvidia/libGLdispatch.so.0
94175128
JP
452%attr(755,root,root) %{_libdir}/nvidia/libGLESv1_CM.so.1.2.0
453%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLESv1_CM.so.1
454%attr(755,root,root) %{_libdir}/nvidia/libGLESv2.so.2.1.0
455%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLESv2.so.2
456%attr(755,root,root) %{_libdir}/nvidia/libEGL.so.1.1.0
457%attr(755,root,root) %ghost %{_libdir}/nvidia/libEGL.so.1
c2ff5cb2 458%endif
10e941a4
JP
459%attr(755,root,root) %ghost %{_libdir}/nvidia/libEGL_nvidia.so.0
460%attr(755,root,root) %{_libdir}/nvidia/libEGL_nvidia.so.*.*
10e941a4
JP
461%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLESv1_CM_nvidia.so.1
462%attr(755,root,root) %{_libdir}/nvidia/libGLESv1_CM_nvidia.so.*.*
10e941a4
JP
463%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLESv2_nvidia.so.2
464%attr(755,root,root) %{_libdir}/nvidia/libGLESv2_nvidia.so.*.*
10e941a4
JP
465%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLX_indirect.so.0
466%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLX_nvidia.so.0
467%attr(755,root,root) %{_libdir}/nvidia/libGLX_nvidia.so.*.*
d626b139 468%ifarch %{x8664}
538b2e0c 469%attr(755,root,root) %{_libdir}/nvidia/libnvidia-egl-wayland.so.*.*.*
b440dd78 470%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-egl-wayland.so.1
538b2e0c 471%attr(755,root,root) %{_libdir}/nvidia/libnvidia-eglcore.so.*.*
d626b139 472%endif
cd436d42
JR
473%attr(755,root,root) %{_libdir}/nvidia/libcuda.so.*.*
474%attr(755,root,root) %ghost %{_libdir}/nvidia/libcuda.so.1
475%attr(755,root,root) %{_libdir}/nvidia/libcuda.so
476%attr(755,root,root) %{_libdir}/nvidia/libnvcuvid.so.*.*
477%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvcuvid.so.1
478%attr(755,root,root) %{_libdir}/nvidia/libnvcuvid.so
d626b139 479%ifarch %{x8664}
0f1616f9 480%attr(755,root,root) %{_libdir}/nvidia/libnvidia-cbl.so.*.*
cd436d42
JR
481%attr(755,root,root) %{_libdir}/nvidia/libnvidia-cfg.so.*.*
482%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-cfg.so.1
594c0c86
JP
483%attr(755,root,root) %{_libdir}/nvidia/libnvidia-ngx.so.*.*
484%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-ngx.so.1
0f1616f9
JP
485%attr(755,root,root) %{_libdir}/nvidia/libnvidia-rtcore.so.*.*
486%attr(755,root,root) %{_libdir}/nvidia/libnvoptix.so.*.*
487%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvoptix.so.1
d626b139 488%endif
594c0c86
JP
489%attr(755,root,root) %{_libdir}/nvidia/libnvidia-allocator.so.*.*
490%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-allocator.so.1
cd436d42 491%attr(755,root,root) %{_libdir}/nvidia/libnvidia-compiler.so.*.*
5ee8f0c8
JR
492%attr(755,root,root) %{_libdir}/nvidia/libnvidia-encode.so.*.*
493%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-encode.so.1
10e941a4
JP
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.*.*
cd436d42
JR
501%attr(755,root,root) %{_libdir}/nvidia/libnvidia-ml.so.*.*
502%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-ml.so.1
5ee8f0c8
JR
503%attr(755,root,root) %{_libdir}/nvidia/libnvidia-opencl.so.*.*
504%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-opencl.so.1
594c0c86
JP
505%attr(755,root,root) %{_libdir}/nvidia/libnvidia-opticalflow.so.*.*
506%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-opticalflow.so.1
10e941a4 507%attr(755,root,root) %{_libdir}/nvidia/libnvidia-ptxjitcompiler.so.*.*
594c0c86 508%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-ptxjitcompiler.so.1
cd436d42 509%attr(755,root,root) %{_libdir}/nvidia/libnvidia-tls.so.*.*
76db0ca8 510%attr(755,root,root) %{_libdir}/vdpau/libvdpau_nvidia.so.*.*
f3b8319b 511%attr(755,root,root) %ghost %{_libdir}/vdpau/libvdpau_nvidia.so.1
d626b139 512%ifarch %{x8664}
96251f94 513%{_datadir}/glvnd/egl_vendor.d/10_nvidia.json
7c831f98 514%{_datadir}/vulkan/icd.d/nvidia_icd.json
d626b139 515%endif
28142503 516
b55b4acb 517%if %{without system_libglvnd}
28142503
PS
518%files devel
519%defattr(644,root,root,755)
75de51d2
JP
520%attr(755,root,root) %{_libdir}/nvidia/libGLX.so
521%attr(755,root,root) %{_libdir}/nvidia/libOpenGL.so
522%attr(755,root,root) %{_libdir}/nvidia/libGLESv1_CM.so
523%attr(755,root,root) %{_libdir}/nvidia/libGLESv2.so
10e941a4 524%attr(755,root,root) %{_libdir}/nvidia/libEGL.so
236b5374 525%{_pkgconfigdir}/gl.pc
b55b4acb 526%endif
63c6d4b1 527
a9160796
ER
528%files doc
529%defattr(644,root,root,755)
8481604b 530%doc html/*
a9160796 531
d626b139 532%ifarch %{x8664}
d4a34ce2 533%files progs
01766b04 534%defattr(644,root,root,755)
8481604b 535%attr(755,root,root) %{_bindir}/nvidia-bug-report.sh
df1704ce
KK
536%attr(755,root,root) %{_bindir}/nvidia-cuda-mps-control
537%attr(755,root,root) %{_bindir}/nvidia-cuda-mps-server
8481604b 538%attr(755,root,root) %{_bindir}/nvidia-smi
225cc701 539%attr(755,root,root) %{_bindir}/nvidia-xconfig
df1704ce 540%{_mandir}/man1/nvidia-cuda-mps-control.1*
5da85237
ER
541%{_mandir}/man1/nvidia-smi.1*
542%{_mandir}/man1/nvidia-xconfig.1*
543%if %{with settings}
b55b4acb 544%attr(755,root,root) /etc/X11/xinit/xinitrc.d/nvidia-settings.sh
5da85237
ER
545%attr(755,root,root) %{_bindir}/nvidia-settings
546%{_mandir}/man1/nvidia-settings.1*
225cc701 547%{_desktopdir}/nvidia-settings.desktop
225cc701 548%{_pixmapsdir}/nvidia-settings.png
1820d34b 549%endif
d626b139
JR
550%endif
551%endif
This page took 0.4318 seconds and 4 git commands to generate.