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