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