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