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