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