1 |
ahmad |
56864 |
# I love OpenSource :-( |
2 |
|
|
|
3 |
|
|
## NOTE: When modifying this .spec, you do not necessarily need to care about |
4 |
|
|
## the %simple stuff. It is fine to break them, I'll fix it when I need them :) |
5 |
|
|
## - Anssi |
6 |
|
|
|
7 |
|
|
# %simple mode can be used to transform an arbitrary nvidia installer |
8 |
|
|
# package to rpms, similar to %atibuild mode in fglrx. |
9 |
|
|
# Macros version, rel, nsource, pkgname, distsuffix should be manually defined. |
10 |
|
|
%define simple 0 |
11 |
|
|
%{?_without_simple: %global simple 0} |
12 |
|
|
%{?_with_simple: %global simple 1} |
13 |
|
|
|
14 |
tmb |
1021483 |
# debugfiles.list is empty, dont try to create the rpms |
15 |
|
|
%define _enable_debug_packages %{nil} |
16 |
|
|
%define debug_package %{nil} |
17 |
|
|
|
18 |
ahmad |
56864 |
%define name nvidia-current |
19 |
|
|
|
20 |
|
|
%if !%simple |
21 |
|
|
# When updating, please add new ids to ldetect-lst (merge2pcitable.pl) |
22 |
ghibo |
1056246 |
%define version 367.44 |
23 |
|
|
%define rel 1 |
24 |
ahmad |
56864 |
# the highest supported videodrv abi |
25 |
tv |
902295 |
%define videodrv_abi 20 |
26 |
ahmad |
56864 |
%endif |
27 |
|
|
|
28 |
|
|
%define priority 9700 |
29 |
|
|
|
30 |
|
|
%define pkgname32 NVIDIA-Linux-x86-%{version} |
31 |
|
|
%define pkgname64 NVIDIA-Linux-x86_64-%{version} |
32 |
|
|
|
33 |
ahmad |
131342 |
# Disable when the sources aren't on ftp yet, but can be downloaded from |
34 |
|
|
# http://us.download.nvidia.com |
35 |
tmb |
447858 |
%define ftp 1 |
36 |
ahmad |
131342 |
|
37 |
ahmad |
56864 |
# For now, backportability is kept for 2008.0 forwards. |
38 |
|
|
|
39 |
|
|
%define drivername nvidia-current |
40 |
|
|
%define driverpkgname x11-driver-video-%{drivername} |
41 |
|
|
%define modulename %{drivername} |
42 |
|
|
# for description and documentation |
43 |
anssi |
812247 |
%define cards GeForce 420 and later cards |
44 |
ahmad |
56864 |
%define xorg_extra_modules %{_libdir}/xorg/extra-modules |
45 |
|
|
%define nvidia_driversdir %{_libdir}/%{drivername}/xorg |
46 |
|
|
%define nvidia_extensionsdir %{_libdir}/%{drivername}/xorg |
47 |
|
|
%define nvidia_modulesdir %{_libdir}/%{drivername}/xorg |
48 |
|
|
%define nvidia_libdir %{_libdir}/%{drivername} |
49 |
|
|
%define nvidia_libdir32 %{_prefix}/lib/%{drivername} |
50 |
|
|
%define nvidia_bindir %{nvidia_libdir}/bin |
51 |
anssi |
812247 |
%define nvidia_datadir %{_datadir}/nvidia-alt-%{drivername} |
52 |
ahmad |
56864 |
# The entry in Cards+ this driver should be associated with, if there is |
53 |
|
|
# no entry in ldetect-lst default pcitable: |
54 |
|
|
# cooker ldetect-lst should be up-to-date |
55 |
|
|
%define ldetect_cards_name %nil |
56 |
|
|
|
57 |
anssi |
812247 |
%if %simple |
58 |
|
|
# assign a Cards+ entry according to Mageia version |
59 |
|
|
%define ldetect_cards_name NVIDIA GeForce 420 series and later |
60 |
|
|
%if %mgaversion <= 4 |
61 |
|
|
# nvidia/nouveau |
62 |
ahmad |
56864 |
%define ldetect_cards_name NVIDIA GeForce 400 series and later |
63 |
|
|
%endif |
64 |
anssi |
812247 |
%endif |
65 |
ahmad |
56864 |
|
66 |
|
|
%define biarches x86_64 |
67 |
|
|
|
68 |
|
|
%if !%simple |
69 |
|
|
%ifarch %{ix86} |
70 |
|
|
%define nsource %{SOURCE0} |
71 |
|
|
%define pkgname %{pkgname32} |
72 |
|
|
%endif |
73 |
|
|
%ifarch x86_64 |
74 |
|
|
%define nsource %{SOURCE1} |
75 |
|
|
%define pkgname %{pkgname64} |
76 |
|
|
%endif |
77 |
|
|
%endif |
78 |
|
|
|
79 |
|
|
# Other packages should not require any NVIDIA libraries, and this package |
80 |
|
|
# should not be pulled in when libGL.so.1 is required |
81 |
tv |
677249 |
%global __provides_exclude \\.so |
82 |
tmb |
1000684 |
%global common__requires_exclude ^libGL\\.so|^libGLcore\\.so|^libGLdispatch\\.so|^libnvidia.*\\.so |
83 |
ahmad |
56864 |
|
84 |
|
|
%ifarch %{biarches} |
85 |
|
|
# (anssi) Allow installing of 64-bit package if the runtime dependencies |
86 |
|
|
# of 32-bit libraries are not satisfied. If a 32-bit package that requires |
87 |
|
|
# libGL.so.1 is installed, the 32-bit mesa libs are pulled in and that will |
88 |
|
|
# pull the dependencies of 32-bit nvidia libraries in as well. |
89 |
tmb |
795041 |
%global __requires_exclude %common__requires_exclude|^libX11\\.so\\.6$|^libXext\\.so\\.6$|^libdl\\.so\\.2$|^libm\\.so\\.6$|^libpthread\\.so\\.0$|^librt\\.so\\.1$ |
90 |
ahmad |
56864 |
%else |
91 |
tmb |
701446 |
%global __requires_exclude %common__requires_exclude |
92 |
ahmad |
56864 |
%endif |
93 |
|
|
|
94 |
anssi |
320407 |
# (anssi) Workaround wrong linking as of 310.19. |
95 |
|
|
# This will probably be fixed soon (at least similar issues have been in the past). |
96 |
|
|
# https://devtalk.nvidia.com/default/topic/523762/libnvidia-encode-so-310-19-has-dependency-on-missing-library/ |
97 |
tv |
677550 |
%global __requires_exclude_from libnvidia-encode.so.%version |
98 |
anssi |
320407 |
|
99 |
anssi |
812247 |
# backportability |
100 |
|
|
%global _provides_exceptions %(echo '%__provides_exclude' | sed 's,|,\\\\|,g') |
101 |
|
|
%global _requires_exceptions %(echo '%__requires_exclude' | sed 's,|,\\\\|,g') |
102 |
|
|
%global _exclude_files_from_autoreq %(echo '%__requires_exclude_from' | sed 's,|,\\\\|,g') |
103 |
|
|
|
104 |
ahmad |
56864 |
Summary: NVIDIA proprietary X.org driver and libraries, current driver series |
105 |
|
|
Name: %{name} |
106 |
|
|
Version: %{version} |
107 |
|
|
Release: %mkrel %{rel} |
108 |
|
|
%if !%simple |
109 |
ahmad |
131342 |
%if %ftp |
110 |
ahmad |
56864 |
Source0: ftp://download.nvidia.com/XFree86/Linux-x86/%{version}/%{pkgname32}.run |
111 |
|
|
Source1: ftp://download.nvidia.com/XFree86/Linux-x86_64/%{version}/%{pkgname64}.run |
112 |
|
|
# GPLv2 source code; see also http://cgit.freedesktop.org/~aplattner/ |
113 |
|
|
Source2: ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-%{version}.tar.bz2 |
114 |
|
|
Source3: ftp://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-%{version}.tar.bz2 |
115 |
anssi |
412170 |
Source4: ftp://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-%{version}.tar.bz2 |
116 |
|
|
Source5: ftp://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-%{version}.tar.bz2 |
117 |
ahmad |
131342 |
%else |
118 |
|
|
Source0: http://us.download.nvidia.com/XFree86/Linux-x86/%{version}/%{pkgname32}.run |
119 |
|
|
Source1: http://us.download.nvidia.com/XFree86/Linux-x86_64/%{version}/%{pkgname64}.run |
120 |
|
|
# GPLv2 source code; see also http://cgit.freedesktop.org/~aplattner/ |
121 |
|
|
Source2: http://us.download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-%{version}.tar.bz2 |
122 |
|
|
Source3: http://us.download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-%{version}.tar.bz2 |
123 |
anssi |
412170 |
Source4: http://us.download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-%{version}.tar.bz2 |
124 |
|
|
Source5: http://us.download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-%{version}.tar.bz2 |
125 |
ahmad |
131342 |
%endif |
126 |
ahmad |
56864 |
# Script for building rpms of arbitrary nvidia installers (needs this .spec appended) |
127 |
anssi |
412170 |
Source10: nvidia-mgabuild-skel |
128 |
ahmad |
56864 |
# include xf86vmproto for X_XF86VidModeGetGammaRampSize, fixes build on cooker |
129 |
|
|
Patch3: nvidia-settings-include-xf86vmproto.patch |
130 |
|
|
%endif |
131 |
tmb |
804013 |
|
132 |
ahmad |
56864 |
License: Freeware |
133 |
|
|
BuildRoot: %{_tmppath}/%{name}-buildroot |
134 |
|
|
URL: http://www.nvidia.com/object/unix.html |
135 |
|
|
Group: System/Kernel and hardware |
136 |
|
|
ExclusiveArch: %{ix86} x86_64 |
137 |
|
|
%if !%simple |
138 |
|
|
BuildRequires: ImageMagick |
139 |
|
|
BuildRequires: gtk+2-devel |
140 |
tmb |
811410 |
BuildRequires: gtk+3-devel |
141 |
ahmad |
56864 |
BuildRequires: libxv-devel |
142 |
|
|
BuildRequires: MesaGL-devel |
143 |
|
|
BuildRequires: libxxf86vm-devel |
144 |
tmb |
811409 |
BuildRequires: vdpau-devel >= 0.9 |
145 |
ahmad |
56864 |
%endif |
146 |
|
|
|
147 |
|
|
%description |
148 |
|
|
Source package of the current NVIDIA proprietary driver. Binary |
149 |
anssi |
812247 |
packages are named %{driverpkgname}. |
150 |
ahmad |
56864 |
|
151 |
|
|
%package -n %{driverpkgname} |
152 |
|
|
Summary: NVIDIA proprietary X.org driver and libraries for %cards |
153 |
|
|
Group: System/Kernel and hardware |
154 |
luigiwalser |
928604 |
Requires(post): update-alternatives |
155 |
|
|
Requires(postun): update-alternatives |
156 |
ahmad |
56864 |
Requires: x11-server-common |
157 |
tv |
676075 |
Recommends: %{drivername}-doc-html = %{version} |
158 |
ahmad |
56864 |
# Proper support for versioned kmod() was added in 2008.1: |
159 |
tmb |
723397 |
Requires: kmod(%{modulename}.ko) = %{version} |
160 |
ahmad |
56864 |
# At least mplayer dlopens libvdpau.so.1, so the software will not pull in |
161 |
|
|
# the vdpau library package. We ensure its installation here. |
162 |
|
|
Requires: %{_lib}vdpau1 |
163 |
anssi |
219541 |
%if !%simple && %mgaversion >= 2 |
164 |
|
|
Requires: xserver-abi(videodrv) < %(echo $((%{videodrv_abi}+1))) |
165 |
ahmad |
66356 |
%endif |
166 |
tmb |
274692 |
Conflicts: nvidia-current-cuda-opencl <= 295.59-1 |
167 |
ahmad |
56864 |
# Obsoletes for naming changes: |
168 |
|
|
Obsoletes: nvidia < 1:%{version}-%{release} |
169 |
|
|
Provides: nvidia = 1:%{version}-%{release} |
170 |
|
|
Obsoletes: nvidia97xx < %{version}-%{release} |
171 |
|
|
Provides: nvidia97xx = %{version}-%{release} |
172 |
|
|
|
173 |
|
|
%description -n %{driverpkgname} |
174 |
|
|
NVIDIA proprietary X.org graphics driver, related libraries and |
175 |
|
|
configuration tools for %cards, |
176 |
|
|
including the associated Quadro cards. |
177 |
|
|
|
178 |
|
|
NOTE: You should use XFdrake to configure your NVIDIA card. The |
179 |
|
|
correct packages will be automatically installed and configured. |
180 |
|
|
|
181 |
|
|
If you do not want to use XFdrake, see README.manual-setup. |
182 |
|
|
|
183 |
|
|
This NVIDIA driver should be used with %cards, |
184 |
|
|
including the associated Quadro cards. |
185 |
|
|
|
186 |
|
|
%package -n dkms-%{drivername} |
187 |
|
|
Summary: NVIDIA kernel module for %cards |
188 |
|
|
Group: System/Kernel and hardware |
189 |
tmb |
1021591 |
Requires: dkms >= 2.0.19-37 |
190 |
|
|
Requires(post): dkms >= 2.0.19-37 |
191 |
|
|
Requires(preun): dkms >= 2.0.19-37 |
192 |
tmb |
723397 |
Provides: kmod(%{modulename}.ko) = %{version} |
193 |
ahmad |
56864 |
Obsoletes: dkms-nvidia < 1:%{version}-%{release} |
194 |
|
|
Provides: dkms-nvidia = 1:%{version}-%{release} |
195 |
|
|
Obsoletes: dkms-nvidia97xx < %{version}-%{release} |
196 |
|
|
Provides: dkms-nvidia97xx = %{version}-%{release} |
197 |
tmb |
1010185 |
# (tmb) prebuilt kmods violates gpl |
198 |
|
|
%ifarch %{ix86} |
199 |
|
|
%rename nvidia-current-kernel-desktop586-latest |
200 |
|
|
%endif |
201 |
|
|
%rename nvidia-current-kernel-desktop-latest |
202 |
|
|
%rename nvidia-current-kernel-server-latest |
203 |
ahmad |
56864 |
|
204 |
|
|
%description -n dkms-%{drivername} |
205 |
|
|
NVIDIA kernel module for %cards. This |
206 |
|
|
is to be used with the %{driverpkgname} package. |
207 |
|
|
|
208 |
|
|
%package -n %{drivername}-devel |
209 |
anssi |
320407 |
Summary: NVIDIA OpenGL/CUDA development liraries and headers |
210 |
ahmad |
56864 |
Group: Development/C |
211 |
|
|
Requires: %{driverpkgname} = %{version}-%{release} |
212 |
|
|
Requires: %{drivername}-cuda-opencl = %{version}-%{release} |
213 |
|
|
Obsoletes: nvidia-devel < 1:%{version}-%{release} |
214 |
|
|
Provides: nvidia-devel = 1:%{version}-%{release} |
215 |
|
|
Obsoletes: nvidia97xx-devel < %{version}-%{release} |
216 |
|
|
Provides: nvidia97xx-devel = %{version}-%{release} |
217 |
|
|
Requires: %{_lib}vdpau-devel |
218 |
|
|
|
219 |
|
|
%description -n %{drivername}-devel |
220 |
anssi |
320407 |
NVIDIA OpenGL/CUDA headers for %cards. This package |
221 |
|
|
is not required for normal use. |
222 |
ahmad |
56864 |
|
223 |
|
|
%package -n %{drivername}-cuda-opencl |
224 |
|
|
Summary: CUDA and OpenCL libraries for NVIDIA proprietary driver |
225 |
|
|
Group: System/Kernel and hardware |
226 |
|
|
Provides: %{drivername}-cuda = %{version}-%{release} |
227 |
tmb |
723397 |
Requires: kmod(%{modulename}.ko) = %{version} |
228 |
ahmad |
56864 |
Conflicts: nvidia < 1:195.36.15-4 |
229 |
tmb |
274692 |
Conflicts: x11-driver-video-nvidia-current <= 295.59-1 |
230 |
ahmad |
56864 |
|
231 |
|
|
%description -n %{drivername}-cuda-opencl |
232 |
|
|
Cuda and OpenCL libraries for NVIDIA proprietary driver. This package is not |
233 |
|
|
required for normal use, it provides libraries to use NVIDIA cards for High |
234 |
|
|
Performance Computing (HPC). |
235 |
|
|
|
236 |
|
|
# HTML doc splitted off because of size, for live cds: |
237 |
|
|
%package -n %{drivername}-doc-html |
238 |
|
|
Summary: NVIDIA html documentation (%{drivername}) |
239 |
|
|
Group: System/Kernel and hardware |
240 |
|
|
Requires: %{driverpkgname} = %{version}-%{release} |
241 |
|
|
|
242 |
|
|
%description -n %{drivername}-doc-html |
243 |
|
|
HTML version of the README.txt file provided in package |
244 |
|
|
%{driverpkgname}. |
245 |
|
|
|
246 |
|
|
%prep |
247 |
|
|
# No patches applied when %simple is set |
248 |
|
|
%if %simple |
249 |
|
|
%setup -q -c -T |
250 |
|
|
%else |
251 |
anssi |
412170 |
%setup -q -c -T -a 2 -a 3 -a 4 -a 5 |
252 |
ahmad |
56864 |
cd nvidia-settings-%{version} |
253 |
|
|
%patch3 -p1 |
254 |
|
|
cd .. |
255 |
|
|
%endif |
256 |
|
|
sh %{nsource} --extract-only |
257 |
|
|
|
258 |
tmb |
1038796 |
%if !%simple |
259 |
|
|
cd %{pkgname} |
260 |
|
|
%ifarch x86_64 |
261 |
ghibo |
1056246 |
# extra patches here |
262 |
tmb |
1038796 |
%endif |
263 |
ghibo |
1056246 |
# extra patches here |
264 |
tmb |
1038796 |
cd .. |
265 |
|
|
%endif |
266 |
ahmad |
56864 |
|
267 |
|
|
rm -rf %{pkgname}/usr/src/nv/precompiled |
268 |
|
|
|
269 |
anssi |
412170 |
%if %simple |
270 |
|
|
# for old releases |
271 |
|
|
mkdir -p %{pkgname}/kernel |
272 |
|
|
%endif |
273 |
|
|
|
274 |
tmb |
282366 |
# (tmb) nuke nVidia provided dkms.conf as we need our own |
275 |
tmb |
550648 |
rm -f %{pkgname}/kernel/dkms.conf |
276 |
tmb |
282366 |
|
277 |
|
|
# install our own dkms.conf |
278 |
|
|
cat > %{pkgname}/kernel/dkms.conf <<EOF |
279 |
|
|
PACKAGE_NAME="%{drivername}" |
280 |
|
|
PACKAGE_VERSION="%{version}-%{release}" |
281 |
|
|
BUILT_MODULE_NAME[0]="nvidia" |
282 |
tmb |
555885 |
DEST_MODULE_LOCATION[0]="/kernel/drivers/char/drm" |
283 |
tmb |
282366 |
DEST_MODULE_NAME[0]="%{modulename}" |
284 |
tmb |
1000684 |
BUILT_MODULE_NAME[1]="nvidia-modeset" |
285 |
tmb |
812400 |
DEST_MODULE_LOCATION[1]="/kernel/drivers/char/drm" |
286 |
tmb |
812394 |
%ifarch x86_64 |
287 |
tmb |
1000684 |
BUILT_MODULE_NAME[2]="nvidia-uvm" |
288 |
|
|
DEST_MODULE_LOCATION[2]="/kernel/drivers/char/drm" |
289 |
tmb |
812394 |
%endif |
290 |
ghibo |
1056246 |
BUILT_MODULE_NAME[3]="nvidia-drm" |
291 |
|
|
DEST_MODULE_LOCATION[3]="/kernel/drivers/char/drm" |
292 |
tmb |
1021591 |
MAKE[0]="'make' -j\${parallel_jobs} SYSSRC=\${kernel_source_dir} modules" |
293 |
tmb |
282366 |
AUTOINSTALL="yes" |
294 |
|
|
EOF |
295 |
|
|
|
296 |
anssi |
607237 |
%if %simple |
297 |
|
|
# backward-compatibility randomness |
298 |
|
|
if ! [ -e %{pkgname}/kernel/uvm ]; then |
299 |
|
|
grep -v uvm %{pkgname}/kernel/dkms.conf > %{pkgname}/kernel/dkms.conf.2 |
300 |
|
|
mv -f %{pkgname}/kernel/dkms.conf.2 %{pkgname}/kernel/dkms.conf |
301 |
|
|
fi |
302 |
|
|
%endif |
303 |
|
|
|
304 |
ahmad |
56864 |
cat > README.install.urpmi <<EOF |
305 |
|
|
This driver is for %cards. |
306 |
|
|
|
307 |
|
|
Use XFdrake to configure X to use the correct NVIDIA driver. Any needed |
308 |
|
|
packages will be automatically installed if not already present. |
309 |
|
|
1. Run XFdrake as root. |
310 |
|
|
2. Go to the Graphics Card list. |
311 |
|
|
3. Select your card (it is usually already autoselected). |
312 |
|
|
4. Answer any questions asked and then quit. |
313 |
|
|
|
314 |
|
|
If you do not want to use XFdrake, see README.manual-setup. |
315 |
|
|
EOF |
316 |
|
|
|
317 |
|
|
cat > README.manual-setup <<EOF |
318 |
|
|
This file describes the procedure for the manual installation of this NVIDIA |
319 |
|
|
driver package. You can find the instructions for the recommended automatic |
320 |
|
|
installation in the file 'README.install.urpmi' in this directory. |
321 |
|
|
|
322 |
|
|
- Open %{_sysconfdir}/X11/xorg.conf and make the following changes: |
323 |
|
|
o Change the Driver to "nvidia" in the Device section |
324 |
|
|
o Make the line below the only 'glx' related line in the Module section, |
325 |
|
|
adding it if it is not already there: |
326 |
|
|
Load "glx" |
327 |
|
|
o Remove any 'ModulePath' lines from the Files section |
328 |
|
|
- Run "update-alternatives --set gl_conf %{_sysconfdir}/%{drivername}/ld.so.conf" as root. |
329 |
|
|
- Run "ldconfig -X" as root. |
330 |
|
|
EOF |
331 |
|
|
|
332 |
|
|
%if !%simple |
333 |
tmb |
629397 |
#rm nvidia-settings-%{version}/src/*/*.a |
334 |
ahmad |
56864 |
|
335 |
|
|
%build |
336 |
anssi |
412170 |
# The code contains dozens on top of dozens on top of dozens of "false" positives |
337 |
|
|
export CFLAGS="%optflags -Wno-error=format-security" |
338 |
ahmad |
56864 |
export CXXFLAGS="$CFLAGS" |
339 |
|
|
export LDFLAGS="%{?ldflags}" |
340 |
|
|
%make -C nvidia-settings-%{version}/src/libXNVCtrl |
341 |
tmb |
1021483 |
%make -C nvidia-settings-%{version} NV_KEEP_UNSTRIPPED_BINARIES=false |
342 |
|
|
%make -C nvidia-xconfig-%{version} NV_KEEP_UNSTRIPPED_BINARIES=false |
343 |
|
|
%make -C nvidia-modprobe-%{version} NV_KEEP_UNSTRIPPED_BINARIES=false |
344 |
|
|
%make -C nvidia-persistenced-%{version} NV_KEEP_UNSTRIPPED_BINARIES=false |
345 |
ahmad |
56864 |
|
346 |
|
|
# %simple |
347 |
|
|
%endif |
348 |
|
|
|
349 |
|
|
%install |
350 |
|
|
rm -rf %{buildroot} |
351 |
|
|
cd %{pkgname} |
352 |
|
|
|
353 |
|
|
# menu entry |
354 |
|
|
install -d -m755 %{buildroot}%{_datadir}/%{drivername} |
355 |
ahmad |
56909 |
cat > %{buildroot}%{_datadir}/%{drivername}/mageia-nvidia-settings.desktop <<EOF |
356 |
ahmad |
56864 |
[Desktop Entry] |
357 |
|
|
Name=NVIDIA Display Settings |
358 |
|
|
Comment=Configure NVIDIA X driver |
359 |
|
|
Exec=%{_bindir}/nvidia-settings |
360 |
|
|
Icon=%{drivername}-settings |
361 |
|
|
Terminal=false |
362 |
|
|
Type=Application |
363 |
anssi |
181441 |
Categories=GTK;Settings;HardwareSettings; |
364 |
ahmad |
56864 |
EOF |
365 |
|
|
|
366 |
|
|
install -d -m755 %{buildroot}%{_datadir}/applications |
367 |
ahmad |
56909 |
touch %{buildroot}%{_datadir}/applications/mageia-nvidia-settings.desktop |
368 |
ahmad |
56864 |
|
369 |
|
|
# icons |
370 |
|
|
install -d -m755 %{buildroot}%{_iconsdir}/hicolor/{16x16,32x32,48x48}/apps |
371 |
|
|
%if !%simple |
372 |
|
|
convert nvidia-settings.png -resize 16x16 %{buildroot}%{_iconsdir}/hicolor/16x16/apps/%{drivername}-settings.png |
373 |
|
|
convert nvidia-settings.png -resize 32x32 %{buildroot}%{_iconsdir}/hicolor/32x32/apps/%{drivername}-settings.png |
374 |
|
|
convert nvidia-settings.png -resize 48x48 %{buildroot}%{_iconsdir}/hicolor/48x48/apps/%{drivername}-settings.png |
375 |
|
|
%else |
376 |
|
|
# no imagemagick |
377 |
|
|
[ -e nvidia-settings.png ] || cp -a usr/share/pixmaps/nvidia-settings.png . |
378 |
|
|
install -m644 nvidia-settings.png %{buildroot}%{_iconsdir}/hicolor/48x48/apps/%{drivername}-settings.png |
379 |
|
|
%endif |
380 |
|
|
|
381 |
|
|
error_fatal() { |
382 |
|
|
echo "Error: $@." >&2 |
383 |
|
|
exit 1 |
384 |
|
|
} |
385 |
|
|
|
386 |
|
|
error_unhandled() { |
387 |
|
|
echo "Warning: $@." >&2 |
388 |
|
|
echo "Warning: $@." >> warns.log |
389 |
|
|
%if !%simple |
390 |
|
|
# cause distro builds to fail in case of unhandled files |
391 |
|
|
exit 1 |
392 |
|
|
%endif |
393 |
|
|
} |
394 |
|
|
|
395 |
|
|
parseparams() { |
396 |
|
|
for value in $rest; do |
397 |
|
|
local param=$1 |
398 |
|
|
[ -n "$param" ] || error_fatal "unhandled parameter $value" |
399 |
|
|
shift |
400 |
|
|
eval $param=$value |
401 |
|
|
|
402 |
|
|
[ -n "$value" ] || error_fatal "empty $param" |
403 |
|
|
|
404 |
|
|
# resolve libdir based on $arch |
405 |
|
|
if [ "$param" = "arch" ]; then |
406 |
|
|
case "$arch" in |
407 |
|
|
NATIVE) nvidia_libdir=%{nvidia_libdir};; |
408 |
|
|
COMPAT32) nvidia_libdir=%{nvidia_libdir32};; |
409 |
|
|
*) error_fatal "unknown arch $arch" |
410 |
|
|
esac |
411 |
|
|
fi |
412 |
tmb |
1000684 |
if [ "$param" = "libtype" ]; then |
413 |
|
|
case "$libtype" in |
414 |
|
|
NON_GLVND);; |
415 |
|
|
GLVND);; |
416 |
|
|
*) error_fatal "unknown libtype $libtype" |
417 |
|
|
esac |
418 |
|
|
fi |
419 |
ahmad |
56864 |
done |
420 |
|
|
} |
421 |
|
|
|
422 |
|
|
add_to_list() { |
423 |
|
|
%if !%simple |
424 |
|
|
# on distro builds, only use .manifest for %doc files |
425 |
|
|
[ "${2#%doc}" = "${2}" ] && return |
426 |
|
|
%endif |
427 |
|
|
local list="$1.files" |
428 |
|
|
local entry="$2" |
429 |
|
|
echo $entry >> $list |
430 |
|
|
} |
431 |
|
|
|
432 |
|
|
install_symlink() { |
433 |
|
|
local pkg="$1" |
434 |
|
|
local dir="$2" |
435 |
|
|
mkdir -p %{buildroot}$dir |
436 |
|
|
ln -s $dest %{buildroot}$dir/$file |
437 |
|
|
add_to_list $pkg $dir/$file |
438 |
|
|
} |
439 |
|
|
|
440 |
|
|
install_lib_symlink() { |
441 |
|
|
local pkg="$1" |
442 |
|
|
local dir="$2" |
443 |
|
|
case "$file" in |
444 |
|
|
libvdpau_*.so) |
445 |
|
|
# vdpau drivers => not put into -devel |
446 |
|
|
;; |
447 |
|
|
*.so) |
448 |
|
|
pkg=nvidia-devel;; |
449 |
|
|
esac |
450 |
|
|
install_symlink $pkg $dir |
451 |
|
|
} |
452 |
|
|
|
453 |
|
|
install_file_only() { |
454 |
|
|
local pkg="$1" |
455 |
|
|
local dir="$2" |
456 |
|
|
mkdir -p %{buildroot}$dir |
457 |
|
|
# replace 0444 with more usual 0644 |
458 |
|
|
[ "$perms" = "0444" ] && perms="0644" |
459 |
|
|
install -m $perms $file %{buildroot}$dir |
460 |
|
|
} |
461 |
|
|
|
462 |
|
|
install_file() { |
463 |
|
|
local pkg="$1" |
464 |
|
|
local dir="$2" |
465 |
|
|
install_file_only $pkg $dir |
466 |
|
|
add_to_list $pkg $dir/$(basename $file) |
467 |
|
|
} |
468 |
|
|
|
469 |
tmb |
1000684 |
install_src_file() { |
470 |
|
|
local pkg="$1" |
471 |
|
|
local dir="$2" |
472 |
|
|
local moddir=$(dirname $file) |
473 |
|
|
local subdir=${moddir#kernel} |
474 |
|
|
install_file_only $pkg $dir$subdir |
475 |
|
|
add_to_list $pkg $dir$subdir/$(basename $file) |
476 |
|
|
} |
477 |
|
|
|
478 |
ahmad |
56864 |
get_module_dir() { |
479 |
|
|
local subdir="$1" |
480 |
|
|
case "$subdir" in |
481 |
|
|
extensions*) echo %{nvidia_extensionsdir};; |
482 |
|
|
drivers/) echo %{nvidia_driversdir};; |
483 |
|
|
/) echo %{nvidia_modulesdir};; |
484 |
|
|
*) error_unhandled "unhandled module subdir $subdir" |
485 |
|
|
echo %{nvidia_modulesdir};; |
486 |
|
|
esac |
487 |
|
|
} |
488 |
|
|
|
489 |
|
|
for file in nvidia.files nvidia-devel.files nvidia-cuda.files nvidia-dkms.files nvidia-html.files; do |
490 |
|
|
rm -f $file |
491 |
|
|
touch $file |
492 |
|
|
done |
493 |
|
|
|
494 |
|
|
# install files according to .manifest |
495 |
|
|
cat .manifest | tail -n +9 | while read line; do |
496 |
anssi |
607208 |
arch= |
497 |
|
|
style= |
498 |
|
|
subdir= |
499 |
|
|
dest= |
500 |
|
|
nvidia_libdir= |
501 |
tmb |
1000684 |
libtype= |
502 |
anssi |
607208 |
|
503 |
ahmad |
56864 |
rest=${line} |
504 |
|
|
file=${rest%%%% *} |
505 |
|
|
rest=${rest#* } |
506 |
|
|
perms=${rest%%%% *} |
507 |
|
|
rest=${rest#* } |
508 |
|
|
type=${rest%%%% *} |
509 |
anssi |
607208 |
[ "${rest#* }" = "$rest" ] && rest= || rest=${rest#* } |
510 |
ahmad |
56864 |
|
511 |
|
|
case "$type" in |
512 |
|
|
CUDA_LIB) |
513 |
|
|
parseparams arch subdir |
514 |
|
|
install_file nvidia-cuda $nvidia_libdir/$subdir |
515 |
|
|
;; |
516 |
|
|
CUDA_SYMLINK) |
517 |
|
|
parseparams arch subdir dest |
518 |
|
|
install_lib_symlink nvidia-cuda $nvidia_libdir/$subdir |
519 |
|
|
;; |
520 |
tmb |
319556 |
ENCODEAPI_LIB) |
521 |
anssi |
320407 |
parseparams arch subdir |
522 |
|
|
install_file nvidia $nvidia_libdir/$subdir |
523 |
tmb |
319556 |
;; |
524 |
|
|
ENCODEAPI_LIB_SYMLINK) |
525 |
|
|
parseparams arch dest |
526 |
|
|
install_lib_symlink nvidia $nvidia_libdir |
527 |
|
|
;; |
528 |
tmb |
595302 |
EXPLICIT_PATH) |
529 |
|
|
parseparams dest |
530 |
anssi |
812247 |
dest="$(echo "$dest" | sed s,%{_datadir}/nvidia,%{nvidia_datadir},)" |
531 |
|
|
install_file nvidia $dest |
532 |
tmb |
595302 |
;; |
533 |
tmb |
1000684 |
GLVND_LIB) |
534 |
|
|
parseparams arch |
535 |
|
|
install_file nvidia $nvidia_libdir |
536 |
|
|
;; |
537 |
|
|
GLVND_SYMLINK) |
538 |
|
|
parseparams arch dest |
539 |
|
|
install_lib_symlink nvidia $nvidia_libdir |
540 |
|
|
;; |
541 |
|
|
GLX_CLIENT_LIB) |
542 |
|
|
parseparams arch libtype |
543 |
|
|
# (tmb) skip for now |
544 |
|
|
case $libtype in NON_GLVND);; *) continue; esac |
545 |
|
|
install_file nvidia $nvidia_libdir |
546 |
|
|
;; |
547 |
|
|
GLX_CLIENT_SYMLINK) |
548 |
|
|
parseparams arch dest libtype |
549 |
|
|
# (tmb) skip for now |
550 |
|
|
case $libtype in NON_GLVND);; *) continue; esac |
551 |
|
|
install_lib_symlink nvidia $nvidia_libdir |
552 |
|
|
;; |
553 |
ahmad |
56864 |
NVCUVID_LIB) |
554 |
anssi |
320407 |
parseparams arch subdir |
555 |
|
|
install_file nvidia-cuda $nvidia_libdir/$subdir |
556 |
ahmad |
56864 |
;; |
557 |
|
|
NVCUVID_LIB_SYMLINK) |
558 |
|
|
parseparams arch dest |
559 |
|
|
install_lib_symlink nvidia-cuda $nvidia_libdir |
560 |
|
|
;; |
561 |
tmb |
469114 |
NVIFR_LIB) |
562 |
anssi |
607208 |
parseparams arch subdir |
563 |
|
|
install_file nvidia $nvidia_libdir/$subdir |
564 |
tmb |
469114 |
;; |
565 |
|
|
NVIFR_LIB_SYMLINK) |
566 |
anssi |
607208 |
parseparams arch dest |
567 |
tmb |
469114 |
install_lib_symlink nvidia $nvidia_libdir |
568 |
|
|
;; |
569 |
tmb |
811426 |
OPENCL_LIB) |
570 |
|
|
parseparams arch subdir |
571 |
|
|
install_file nvidia-cuda $nvidia_libdir/$subdir |
572 |
|
|
;; |
573 |
|
|
OPENCL_LIB_SYMLINK) |
574 |
|
|
parseparams arch subdir dest |
575 |
|
|
install_lib_symlink nvidia-cuda $nvidia_libdir/$subdir |
576 |
|
|
;; |
577 |
|
|
OPENCL_WRAPPER_LIB) |
578 |
|
|
parseparams arch subdir |
579 |
|
|
install_file nvidia-cuda $nvidia_libdir/$subdir |
580 |
|
|
;; |
581 |
|
|
OPENCL_WRAPPER_SYMLINK) |
582 |
|
|
parseparams arch subdir dest |
583 |
|
|
install_lib_symlink nvidia-cuda $nvidia_libdir/$subdir |
584 |
|
|
;; |
585 |
ahmad |
56864 |
OPENGL_LIB) |
586 |
|
|
parseparams arch |
587 |
|
|
install_file nvidia $nvidia_libdir |
588 |
|
|
;; |
589 |
|
|
OPENGL_SYMLINK) |
590 |
|
|
parseparams arch dest |
591 |
|
|
install_lib_symlink nvidia $nvidia_libdir |
592 |
|
|
;; |
593 |
|
|
TLS_LIB) |
594 |
|
|
parseparams arch style subdir |
595 |
|
|
install_file nvidia $nvidia_libdir/$subdir |
596 |
|
|
;; |
597 |
|
|
TLS_SYMLINK) |
598 |
|
|
parseparams arch style subdir dest |
599 |
|
|
install_lib_symlink nvidia $nvidia_libdir/$subdir |
600 |
|
|
;; |
601 |
|
|
UTILITY_LIB) |
602 |
anssi |
812247 |
%if !%simple |
603 |
|
|
# skip libnvidia-gtk[23], we build those by ourself |
604 |
|
|
echo "$file" | grep -q nvidia-gtk && continue |
605 |
|
|
%endif |
606 |
anssi |
607208 |
# backward-compatibility |
607 |
|
|
[ -n "${rest}" ] || rest="NATIVE $rest" |
608 |
|
|
parseparams arch subdir |
609 |
|
|
install_file nvidia $nvidia_libdir/$subdir |
610 |
ahmad |
56864 |
;; |
611 |
|
|
UTILITY_LIB_SYMLINK) |
612 |
anssi |
607208 |
# backward-compatibility |
613 |
|
|
[ "${rest#* }" != "$rest" ] || rest="NATIVE $rest" |
614 |
|
|
parseparams arch dest |
615 |
|
|
install_lib_symlink nvidia $nvidia_libdir |
616 |
ahmad |
56864 |
;; |
617 |
|
|
VDPAU_LIB) |
618 |
|
|
parseparams arch subdir |
619 |
|
|
case $file in *libvdpau_nvidia.so*);; *) continue; esac |
620 |
|
|
install_file nvidia $nvidia_libdir/$subdir |
621 |
|
|
;; |
622 |
|
|
VDPAU_SYMLINK) |
623 |
|
|
parseparams arch subdir dest |
624 |
|
|
case $file in *libvdpau_nvidia.so*);; *) continue; esac |
625 |
|
|
install_lib_symlink nvidia $nvidia_libdir/$subdir |
626 |
|
|
;; |
627 |
tmb |
550648 |
VDPAU_WRAPPER_LIB) |
628 |
|
|
parseparams arch subdir |
629 |
|
|
case $file in *libvdpau_nvidia.so*);; *) continue; esac |
630 |
|
|
install_file nvidia $nvidia_libdir/$subdir |
631 |
|
|
;; |
632 |
|
|
VDPAU_WRAPPER_SYMLINK) |
633 |
|
|
parseparams arch subdir dest |
634 |
|
|
case $file in *libvdpau_nvidia.so*);; *) continue; esac |
635 |
|
|
install_lib_symlink nvidia $nvidia_libdir/$subdir |
636 |
|
|
;; |
637 |
tmb |
1021483 |
VULKAN_ICD_JSON) |
638 |
|
|
install_file nvidia %{_sysconfdir}/vulkan/icd.d/ |
639 |
|
|
;; |
640 |
ahmad |
56864 |
XLIB_STATIC_LIB) |
641 |
|
|
install_file nvidia-devel %{nvidia_libdir} |
642 |
|
|
;; |
643 |
|
|
XLIB_SHARED_LIB) |
644 |
|
|
install_file nvidia %{nvidia_libdir} |
645 |
|
|
;; |
646 |
|
|
XLIB_SYMLINK) |
647 |
|
|
parseparams dest |
648 |
|
|
install_lib_symlink nvidia %{nvidia_libdir} |
649 |
|
|
;; |
650 |
|
|
LIBGL_LA) |
651 |
|
|
# (Anssi) we don't install .la files |
652 |
|
|
;; |
653 |
anssi |
208481 |
XMODULE_SHARED_LIB|GLX_MODULE_SHARED_LIB) |
654 |
ahmad |
56864 |
parseparams subdir |
655 |
|
|
install_file nvidia $(get_module_dir $subdir) |
656 |
|
|
;; |
657 |
|
|
XMODULE_NEWSYM) |
658 |
|
|
# symlink that is created only if it doesn't already |
659 |
|
|
# exist (i.e. as part of x11-server) |
660 |
|
|
case "$file" in |
661 |
|
|
libwfb.so) |
662 |
|
|
continue |
663 |
|
|
;; |
664 |
|
|
*) |
665 |
|
|
error_unhandled "unknown XMODULE_NEWSYM type file $file, skipped" |
666 |
|
|
continue |
667 |
|
|
esac |
668 |
|
|
parseparams subdir dest |
669 |
|
|
install_symlink nvidia $(get_module_dir $subdir) |
670 |
|
|
;; |
671 |
tmb |
811426 |
XORG_OUTPUTCLASS_CONFIG) |
672 |
|
|
# (tmb) dont install xorg driver autoloader conf |
673 |
|
|
continue |
674 |
|
|
;; |
675 |
anssi |
208481 |
XMODULE_SYMLINK|GLX_MODULE_SYMLINK) |
676 |
ahmad |
56864 |
parseparams subdir dest |
677 |
|
|
install_symlink nvidia $(get_module_dir $subdir) |
678 |
|
|
;; |
679 |
|
|
VDPAU_HEADER) |
680 |
|
|
continue |
681 |
|
|
parseparams subdir |
682 |
|
|
install_file_only nvidia-devel %{_includedir}/%{drivername}/$subdir |
683 |
|
|
;; |
684 |
|
|
OPENGL_HEADER|CUDA_HEADER) |
685 |
|
|
parseparams subdir |
686 |
|
|
install_file_only nvidia-devel %{_includedir}/%{drivername}/$subdir |
687 |
|
|
;; |
688 |
|
|
DOCUMENTATION) |
689 |
|
|
parseparams subdir |
690 |
|
|
case $subdir in |
691 |
|
|
*/html) |
692 |
|
|
add_to_list nvidia-html "%%doc %{pkgname}/$file" |
693 |
|
|
continue |
694 |
|
|
;; |
695 |
|
|
*/include/*) |
696 |
|
|
continue |
697 |
|
|
;; |
698 |
|
|
esac |
699 |
|
|
case $file in |
700 |
|
|
*XF86Config*|*nvidia-settings.png) |
701 |
|
|
continue;; |
702 |
|
|
esac |
703 |
|
|
add_to_list nvidia "%%doc %{pkgname}/$file" |
704 |
|
|
;; |
705 |
anssi |
412170 |
MANPAGE|NVIDIA_MODPROBE_MANPAGE) |
706 |
ahmad |
56864 |
parseparams subdir |
707 |
|
|
case "$file" in |
708 |
|
|
*nvidia-installer*) |
709 |
|
|
# not installed |
710 |
|
|
continue |
711 |
|
|
;; |
712 |
anssi |
412170 |
*nvidia-settings*|*nvidia-xconfig*|*nvidia-modprobe*|*nvidia-persistenced*) |
713 |
ahmad |
56864 |
%if !%simple |
714 |
|
|
# installed separately below |
715 |
|
|
continue |
716 |
|
|
%endif |
717 |
|
|
;; |
718 |
anssi |
412170 |
*nvidia-smi*|*nvidia-cuda-mps-control*) |
719 |
ahmad |
56864 |
# ok |
720 |
|
|
;; |
721 |
|
|
*) |
722 |
|
|
error_unhandled "skipped unknown man page $(basename $file)" |
723 |
|
|
continue |
724 |
|
|
esac |
725 |
|
|
install_file_only nvidia %{_mandir}/$subdir |
726 |
|
|
;; |
727 |
|
|
UTILITY_BINARY) |
728 |
|
|
case "$file" in |
729 |
anssi |
412170 |
*nvidia-settings|*nvidia-xconfig|*nvidia-persistenced) |
730 |
ahmad |
56864 |
%if !%simple |
731 |
|
|
# not installed, we install our own copy |
732 |
|
|
continue |
733 |
|
|
%endif |
734 |
|
|
;; |
735 |
anssi |
412170 |
*nvidia-smi|*nvidia-bug-report.sh|*nvidia-debugdump) |
736 |
ahmad |
56864 |
# ok |
737 |
|
|
;; |
738 |
anssi |
412170 |
*nvidia-cuda-mps-control|*nvidia-cuda-mps-server) |
739 |
|
|
# ok |
740 |
|
|
;; |
741 |
ahmad |
56864 |
*) |
742 |
|
|
error_unhandled "unknown binary $(basename $file) will be installed to %{nvidia_bindir}/$(basename $file)" |
743 |
|
|
;; |
744 |
|
|
esac |
745 |
|
|
install_file nvidia %{nvidia_bindir} |
746 |
|
|
;; |
747 |
|
|
UTILITY_BIN_SYMLINK) |
748 |
|
|
case $file in nvidia-uninstall) continue;; esac |
749 |
|
|
parseparams dest |
750 |
|
|
install_symlink nvidia %{nvidia_bindir} |
751 |
|
|
;; |
752 |
anssi |
412170 |
NVIDIA_MODPROBE) |
753 |
|
|
# A suid-root tool (GPLv2) used as fallback for loading the module and |
754 |
|
|
# creating the device nodes in case the driver component is running as |
755 |
|
|
# a non-root user (e.g. a CUDA application). While the module is automatically |
756 |
|
|
# loaded by udev rules, the device nodes are not automatically created |
757 |
|
|
# like with regular drivers and therefore this tool is installed on |
758 |
|
|
# Mageia as well, at least for now. |
759 |
|
|
|
760 |
|
|
# We install our self-compiled version in non-simple mode |
761 |
|
|
%if %simple |
762 |
|
|
install_file nvidia %{nvidia_bindir} |
763 |
|
|
%endif |
764 |
|
|
;; |
765 |
ahmad |
56864 |
INSTALLER_BINARY) |
766 |
|
|
# not installed |
767 |
|
|
;; |
768 |
tmb |
1000684 |
KERNEL_MODULE_SRC|DKMS_CONF) |
769 |
|
|
install_src_file nvidia-dkms %{_usrsrc}/%{drivername}-%{version}-%{release} |
770 |
ahmad |
56864 |
;; |
771 |
|
|
CUDA_ICD) |
772 |
|
|
# in theory this should go to the cuda subpackage, but it goes into the main package |
773 |
|
|
# as this avoids one broken symlink and it is small enough to not cause space issues |
774 |
|
|
install_file nvidia %{_sysconfdir}/%{drivername} |
775 |
|
|
;; |
776 |
anssi |
412170 |
APPLICATION_PROFILE) |
777 |
|
|
parseparams subdir |
778 |
anssi |
812247 |
install_file nvidia %{nvidia_datadir}/$subdir |
779 |
anssi |
412170 |
;; |
780 |
ahmad |
56864 |
DOT_DESKTOP) |
781 |
|
|
# we provide our own for now |
782 |
|
|
;; |
783 |
|
|
*) |
784 |
|
|
error_unhandled "file $(basename $file) of unknown type $type will be skipped" |
785 |
|
|
esac |
786 |
|
|
done |
787 |
|
|
|
788 |
anssi |
108523 |
[ -z "$warnings" ] || echo "Please inform Anssi Hannula <anssi@mageia.org> or http://bugs.mageia.org/ of the above warnings." >> warns.log |
789 |
ahmad |
56864 |
|
790 |
|
|
%if %simple |
791 |
|
|
find %{buildroot}%{_libdir} %{buildroot}%{_prefix}/lib -type d | while read dir; do |
792 |
|
|
dir=${dir#%{buildroot}} |
793 |
|
|
echo "$dir" | grep -q nvidia && echo "%%dir $dir" >> nvidia.files |
794 |
|
|
done |
795 |
|
|
[ -d %{buildroot}%{_includedir}/%{drivername} ] && echo "%{_includedir}/%{drivername}" >> nvidia-devel.files |
796 |
anssi |
412170 |
|
797 |
|
|
# for old releases in %%simple mode |
798 |
|
|
if ! [ -e %{buildroot}%{_usrsrc}/%{drivername}-%{version}-%{release}/dkms.conf ]; then |
799 |
|
|
install -m644 kernel/dkms.conf %{buildroot}%{_usrsrc}/%{drivername}-%{version}-%{release}/dkms.conf |
800 |
|
|
fi |
801 |
ahmad |
56864 |
%endif |
802 |
|
|
|
803 |
|
|
%if !%simple |
804 |
|
|
# confirm SONAME; if something else than libvdpau_nvidia.so or libvdpau_nvidia.so.1, adapt .spec as needed: |
805 |
|
|
[ "$(objdump -p %{buildroot}%{nvidia_libdir}/vdpau/libvdpau_nvidia.so.%{version} | grep SONAME | gawk '{ print $2 }')" = "libvdpau_nvidia.so.1" ] |
806 |
|
|
|
807 |
|
|
rm -f %{buildroot}%{nvidia_libdir}/vdpau/libvdpau_nvidia.so.1 |
808 |
|
|
rm -f %{buildroot}%{nvidia_libdir32}/vdpau/libvdpau_nvidia.so.1 |
809 |
|
|
%endif |
810 |
|
|
|
811 |
|
|
# vdpau alternative symlink |
812 |
|
|
install -d -m755 %{buildroot}%{_libdir}/vdpau |
813 |
|
|
touch %{buildroot}%{_libdir}/vdpau/libvdpau_nvidia.so.1 |
814 |
|
|
%ifarch %{biarches} |
815 |
|
|
install -d -m755 %{buildroot}%{_prefix}/lib/vdpau |
816 |
|
|
touch %{buildroot}%{_prefix}/lib/vdpau/libvdpau_nvidia.so.1 |
817 |
|
|
%endif |
818 |
|
|
|
819 |
|
|
%if !%simple |
820 |
|
|
# self-built binaries |
821 |
tmb |
282100 |
install -m755 ../nvidia-settings-%{version}/src/_out/*/nvidia-settings %{buildroot}%{nvidia_bindir} |
822 |
ahmad |
56864 |
install -m755 ../nvidia-xconfig-%{version}/_out/*/nvidia-xconfig %{buildroot}%{nvidia_bindir} |
823 |
anssi |
412170 |
install -m755 ../nvidia-persistenced-%{version}/_out/*/nvidia-persistenced %{buildroot}%{nvidia_bindir} |
824 |
|
|
install -m4755 ../nvidia-modprobe-%{version}/_out/*/nvidia-modprobe %{buildroot}%{nvidia_bindir} |
825 |
anssi |
812377 |
# nvidia-settings dlopens libnvidia-gtk*.so.VERSION |
826 |
|
|
for file in ../nvidia-settings-%{version}/src/_out/*/libnvidia-gtk*.so; do |
827 |
|
|
install -m755 ${file} %{buildroot}%{nvidia_libdir}/$(basename "$file").%{version} |
828 |
|
|
done |
829 |
ahmad |
56864 |
%endif |
830 |
|
|
# binary alternatives |
831 |
|
|
install -d -m755 %{buildroot}%{_bindir} |
832 |
anssi |
152893 |
touch %{buildroot}%{_bindir}/nvidia-debugdump |
833 |
ahmad |
56864 |
touch %{buildroot}%{_bindir}/nvidia-settings |
834 |
|
|
touch %{buildroot}%{_bindir}/nvidia-smi |
835 |
|
|
touch %{buildroot}%{_bindir}/nvidia-xconfig |
836 |
|
|
touch %{buildroot}%{_bindir}/nvidia-bug-report.sh |
837 |
anssi |
412170 |
touch %{buildroot}%{_bindir}/nvidia-modprobe |
838 |
|
|
touch %{buildroot}%{_bindir}/nvidia-persistenced |
839 |
|
|
touch %{buildroot}%{_bindir}/nvidia-cuda-mps-control |
840 |
|
|
touch %{buildroot}%{_bindir}/nvidia-cuda-mps-server |
841 |
ahmad |
56864 |
# rpmlint: |
842 |
|
|
chmod 0755 %{buildroot}%{_bindir}/* |
843 |
|
|
|
844 |
anssi |
812247 |
# datadir alternative |
845 |
|
|
mkdir -p %{buildroot}%{_datadir}/nvidia |
846 |
|
|
|
847 |
ahmad |
56864 |
%if !%simple |
848 |
anssi |
812247 |
# See posttrans script |
849 |
tmb |
837782 |
#for file in %{buildroot}%{nvidia_datadir}/pci.ids %{buildroot}%{nvidia_datadir}/monitoring.conf; do |
850 |
|
|
# ln -T "$file" "%{buildroot}%{_datadir}/%{drivername}/$(basename "$file").mga" |
851 |
|
|
#done |
852 |
anssi |
812247 |
|
853 |
ahmad |
56864 |
# install man pages |
854 |
anssi |
412170 |
install -m644 ../nvidia-settings-%{version}/doc/_out/*/nvidia-settings.1 %{buildroot}%{_mandir}/man1 |
855 |
|
|
install -m644 ../nvidia-xconfig-%{version}/_out/*/nvidia-xconfig.1 %{buildroot}%{_mandir}/man1 |
856 |
|
|
install -m644 ../nvidia-modprobe-%{version}/_out/*/nvidia-modprobe.1 %{buildroot}%{_mandir}/man1 |
857 |
|
|
install -m644 ../nvidia-persistenced-%{version}/_out/*/nvidia-persistenced.1 %{buildroot}%{_mandir}/man1 |
858 |
ahmad |
56864 |
%endif |
859 |
|
|
# bug #41638 - whatis entries of nvidia man pages appear wrong |
860 |
|
|
gunzip %{buildroot}%{_mandir}/man1/*.gz |
861 |
|
|
sed -r -i '/^nvidia\\-[a-z]+ \\- NVIDIA/s,^nvidia\\-,nvidia-,' %{buildroot}%{_mandir}/man1/*.1 |
862 |
|
|
cd %{buildroot}%{_mandir}/man1 |
863 |
|
|
rename nvidia alt-%{drivername} * |
864 |
|
|
cd - |
865 |
|
|
touch %{buildroot}%{_mandir}/man1/nvidia-xconfig.1%{_extension} |
866 |
|
|
touch %{buildroot}%{_mandir}/man1/nvidia-settings.1%{_extension} |
867 |
anssi |
412170 |
touch %{buildroot}%{_mandir}/man1/nvidia-modprobe.1%{_extension} |
868 |
|
|
touch %{buildroot}%{_mandir}/man1/nvidia-persistenced.1%{_extension} |
869 |
ahmad |
56864 |
touch %{buildroot}%{_mandir}/man1/nvidia-smi.1%{_extension} |
870 |
anssi |
412170 |
touch %{buildroot}%{_mandir}/man1/nvidia-cuda-mps-control.1%{_extension} |
871 |
ahmad |
56864 |
|
872 |
|
|
# cuda nvidia.icd |
873 |
|
|
install -d -m755 %{buildroot}%{_sysconfdir}/OpenCL/vendors |
874 |
|
|
touch %{buildroot}%{_sysconfdir}/OpenCL/vendors/nvidia.icd |
875 |
|
|
|
876 |
|
|
# ld.so.conf |
877 |
|
|
install -d -m755 %{buildroot}%{_sysconfdir}/%{drivername} |
878 |
|
|
echo "%{nvidia_libdir}" > %{buildroot}%{_sysconfdir}/%{drivername}/ld.so.conf |
879 |
|
|
%ifarch %{biarches} |
880 |
|
|
echo "%{nvidia_libdir32}" >> %{buildroot}%{_sysconfdir}/%{drivername}/ld.so.conf |
881 |
|
|
%endif |
882 |
|
|
install -d -m755 %{buildroot}%{_sysconfdir}/ld.so.conf.d |
883 |
|
|
touch %{buildroot}%{_sysconfdir}/ld.so.conf.d/GL.conf |
884 |
|
|
|
885 |
|
|
# modprobe.conf |
886 |
|
|
install -d -m755 %{buildroot}%{_sysconfdir}/modprobe.d |
887 |
ahmad |
66356 |
touch %{buildroot}%{_sysconfdir}/modprobe.d/display-driver.conf |
888 |
anssi |
87268 |
echo "install nvidia /sbin/modprobe %{modulename} \$CMDLINE_OPTS" > %{buildroot}%{_sysconfdir}/%{drivername}/modprobe.conf |
889 |
ahmad |
56864 |
|
890 |
|
|
# xinit script |
891 |
|
|
install -d -m755 %{buildroot}%{_sysconfdir}/%{drivername} |
892 |
|
|
cat > %{buildroot}%{_sysconfdir}/%{drivername}/nvidia-settings.xinit <<EOF |
893 |
|
|
# to be sourced |
894 |
|
|
# |
895 |
|
|
# Do not modify this file; the changes will be overwritten. |
896 |
|
|
# If you want to disable automatic configuration loading, create |
897 |
|
|
# /etc/sysconfig/nvidia-settings with this line: LOAD_NVIDIA_SETTINGS="no" |
898 |
|
|
# |
899 |
|
|
LOAD_NVIDIA_SETTINGS="yes" |
900 |
|
|
[ -f %{_sysconfdir}/sysconfig/nvidia-settings ] && . %{_sysconfdir}/sysconfig/nvidia-settings |
901 |
|
|
[ "\$LOAD_NVIDIA_SETTINGS" = "yes" ] && %{_bindir}/nvidia-settings --load-config-only |
902 |
|
|
EOF |
903 |
|
|
chmod 0755 %{buildroot}%{_sysconfdir}/%{drivername}/nvidia-settings.xinit |
904 |
|
|
install -d -m755 %{buildroot}%{_sysconfdir}/X11/xinit.d |
905 |
|
|
touch %{buildroot}%{_sysconfdir}/X11/xinit.d/nvidia-settings.xinit |
906 |
|
|
|
907 |
|
|
# install ldetect-lst pcitable files for backports |
908 |
|
|
# local version of merge2pcitable.pl:read_nvidia_readme: |
909 |
anssi |
412170 |
section="nothingyet" |
910 |
ahmad |
56864 |
set +x |
911 |
|
|
[ -e README.txt ] || cp -a usr/share/doc/README.txt . |
912 |
|
|
cat README.txt | while read line; do |
913 |
anssi |
412170 |
if [ "$section" = "nothingyet" ] || [ "$section" = "midspace" ]; then |
914 |
|
|
if echo "$line" | grep -Pq "^\s*NVIDIA GPU product\s+Device PCI ID"; then |
915 |
|
|
section="data" |
916 |
|
|
elif [ "$section" = "midspace" ] && echo "$line" | grep -Pq "legacy"; then |
917 |
|
|
break |
918 |
|
|
fi |
919 |
ahmad |
56864 |
continue |
920 |
|
|
fi |
921 |
anssi |
412170 |
|
922 |
|
|
if [ "$section" = "data" ] && echo "$line" | grep -Pq "^\s*$"; then |
923 |
|
|
section="midspace" |
924 |
ahmad |
56864 |
continue |
925 |
|
|
fi |
926 |
anssi |
412170 |
|
927 |
ahmad |
56864 |
echo "$line" | grep -Pq "^\s*-+[\s-]+$" && continue |
928 |
anssi |
812247 |
id=$(echo "$line" | sed -nre 's,^\s*.+?\s\s+(0x)?([0-9a-fA-F]{4}).*$,\2,p' | tr '[:upper:]' '[:lower:]') |
929 |
|
|
#id2=$(echo "$line" | sed -nre 's,^\s*.+?\s\s+0x(....)\s0x(....).*$,\2,p' | tr '[:upper:]' '[:lower:]') |
930 |
anssi |
412170 |
subsysid= |
931 |
|
|
# not useful as of 2013-05 -Anssi |
932 |
|
|
#[ -n "$id2" ] && subsysid=" 0x10de 0x$id2" |
933 |
|
|
echo "0x10de 0x$id$subsysid \"Card:%{ldetect_cards_name}\"" |
934 |
ahmad |
56864 |
done | sort -u > pcitable.nvidia.lst |
935 |
|
|
set -x |
936 |
|
|
[ $(wc -l pcitable.nvidia.lst | cut -f1 -d" ") -gt 200 ] |
937 |
|
|
%if "%{ldetect_cards_name}" != "" |
938 |
|
|
install -d -m755 %{buildroot}%{_datadir}/ldetect-lst/pcitable.d |
939 |
|
|
gzip -c pcitable.nvidia.lst > %{buildroot}%{_datadir}/ldetect-lst/pcitable.d/40%{drivername}.lst.gz |
940 |
|
|
%endif |
941 |
|
|
|
942 |
anssi |
812247 |
export EXCLUDE_FROM_STRIP="$(find %{buildroot} -type f \! -name nvidia-settings \! -name nvidia-xconfig \! -name nvidia-modprobe \! -name nvidia-persistenced \! -name 'libnvidia-gtk*.so')" |
943 |
ahmad |
56864 |
|
944 |
anssi |
812247 |
%pretrans -n %{driverpkgname} |
945 |
|
|
# Migrate old non-alternativeszificated datadir |
946 |
|
|
if ! [ -L %{_datadir}/nvidia ] && [ -d %{_datadir}/nvidia ]; then |
947 |
|
|
if ! [ -e %{nvidia_datadir} ]; then |
948 |
|
|
mv -T %{_datadir}/nvidia %{nvidia_datadir} |
949 |
|
|
else |
950 |
|
|
# should not really be encountered |
951 |
|
|
mv -T %{_datadir}/nvidia %{_datadir}/nvidia.${RANDOM} |
952 |
|
|
fi |
953 |
|
|
fi |
954 |
|
|
|
955 |
ahmad |
56864 |
%post -n %{driverpkgname} |
956 |
|
|
# XFdrake used to generate an nvidia.conf file |
957 |
|
|
[ -L %{_sysconfdir}/modprobe.d/nvidia.conf ] || rm -f %{_sysconfdir}/modprobe.d/nvidia.conf |
958 |
|
|
|
959 |
|
|
current_glconf="$(readlink -e %{_sysconfdir}/ld.so.conf.d/GL.conf)" |
960 |
|
|
|
961 |
|
|
# owned by libvdpau1, created in case libvdpau1 is installed only just after |
962 |
|
|
# this package |
963 |
|
|
mkdir -p %{_libdir}/vdpau |
964 |
|
|
|
965 |
|
|
%{_sbindir}/update-alternatives \ |
966 |
|
|
--install %{_sysconfdir}/ld.so.conf.d/GL.conf gl_conf %{_sysconfdir}/%{drivername}/ld.so.conf %{priority} \ |
967 |
|
|
--slave %{_mandir}/man1/nvidia-settings.1%{_extension} man_nvidiasettings%{_extension} %{_mandir}/man1/alt-%{drivername}-settings.1%{_extension} \ |
968 |
|
|
--slave %{_mandir}/man1/nvidia-xconfig.1%{_extension} man_nvidiaxconfig%{_extension} %{_mandir}/man1/alt-%{drivername}-xconfig.1%{_extension} \ |
969 |
|
|
--slave %{_mandir}/man1/nvidia-smi.1%{_extension} nvidia-smi.1%{_extension} %{_mandir}/man1/alt-%{drivername}-smi.1%{_extension} \ |
970 |
anssi |
412170 |
--slave %{_mandir}/man1/nvidia-cuda-mps-control.1%{_extension} nvidia-cuda-mps-control.1%{_extension} %{_mandir}/man1/alt-%{drivername}-cuda-mps-control.1%{_extension} \ |
971 |
ahmad |
56909 |
--slave %{_datadir}/applications/mageia-nvidia-settings.desktop nvidia_desktop %{_datadir}/%{drivername}/mageia-nvidia-settings.desktop \ |
972 |
ahmad |
56864 |
--slave %{_bindir}/nvidia-settings nvidia_settings %{nvidia_bindir}/nvidia-settings \ |
973 |
|
|
--slave %{_bindir}/nvidia-smi nvidia_smi %{nvidia_bindir}/nvidia-smi \ |
974 |
|
|
--slave %{_bindir}/nvidia-xconfig nvidia_xconfig %{nvidia_bindir}/nvidia-xconfig \ |
975 |
anssi |
152893 |
--slave %{_bindir}/nvidia-debugdump nvidia-debugdump %{nvidia_bindir}/nvidia-debugdump \ |
976 |
ahmad |
56864 |
--slave %{_bindir}/nvidia-bug-report.sh nvidia_bug_report %{nvidia_bindir}/nvidia-bug-report.sh \ |
977 |
anssi |
412170 |
--slave %{_bindir}/nvidia-cuda-mps-control nvidia-cuda-mps-control %{nvidia_bindir}/nvidia-cuda-mps-control \ |
978 |
|
|
--slave %{_bindir}/nvidia-cuda-mps-server nvidia-cuda-mps-server %{nvidia_bindir}/nvidia-cuda-mps-server \ |
979 |
|
|
--slave %{_bindir}/nvidia-modprobe nvidia-modprobe %{nvidia_bindir}/nvidia-modprobe \ |
980 |
|
|
--slave %{_bindir}/nvidia-persistenced nvidia-persistenced %{nvidia_bindir}/nvidia-persistenced \ |
981 |
ahmad |
56864 |
--slave %{_sysconfdir}/X11/xinit.d/nvidia-settings.xinit nvidia-settings.xinit %{_sysconfdir}/%{drivername}/nvidia-settings.xinit \ |
982 |
|
|
--slave %{_libdir}/vdpau/libvdpau_nvidia.so.1 %{_lib}vdpau_nvidia.so.1 %{nvidia_libdir}/vdpau/libvdpau_nvidia.so.%{version} \ |
983 |
anssi |
87344 |
--slave %{_sysconfdir}/modprobe.d/display-driver.conf display-driver.conf %{_sysconfdir}/%{drivername}/modprobe.conf \ |
984 |
ahmad |
56864 |
--slave %{_sysconfdir}/OpenCL/vendors/nvidia.icd nvidia.icd %{_sysconfdir}/%{drivername}/nvidia.icd \ |
985 |
|
|
%ifarch %{biarches} |
986 |
|
|
--slave %{_prefix}/lib/vdpau/libvdpau_nvidia.so.1 libvdpau_nvidia.so.1 %{nvidia_libdir32}/vdpau/libvdpau_nvidia.so.%{version} \ |
987 |
|
|
%endif |
988 |
|
|
--slave %{xorg_extra_modules} xorg_extra_modules %{nvidia_extensionsdir} \ |
989 |
anssi |
812247 |
--slave %{_datadir}/nvidia nvidia_datadir %{nvidia_datadir} \ |
990 |
ahmad |
56864 |
|
991 |
|
|
if [ "${current_glconf}" = "%{_sysconfdir}/nvidia97xx/ld.so.conf" ]; then |
992 |
|
|
# Adapt for the renaming of the driver. X.org config still has the old ModulePaths |
993 |
|
|
# but they do not matter as we are using alternatives for libglx.so now. |
994 |
|
|
%{_sbindir}/update-alternatives --set gl_conf %{_sysconfdir}/%{drivername}/ld.so.conf |
995 |
|
|
fi |
996 |
|
|
# explicit /sbin/ldconfig due to alternatives |
997 |
|
|
/sbin/ldconfig -X |
998 |
|
|
|
999 |
|
|
%if "%{ldetect_cards_name}" != "" |
1000 |
|
|
[ -x %{_sbindir}/update-ldetect-lst ] && %{_sbindir}/update-ldetect-lst || : |
1001 |
|
|
%endif |
1002 |
|
|
|
1003 |
anssi |
812247 |
%posttrans -n %{driverpkgname} |
1004 |
|
|
# When upgrading 340 => 346, the alternativeszification of /usr/share/nvidia may |
1005 |
|
|
# cause uninstallation of 340 (during upgrade) to remove these files through |
1006 |
|
|
# the /usr/share/nvidia symlink. Restore them. |
1007 |
|
|
for file in %{nvidia_datadir}/pci.ids %{nvidia_datadir}/monitoring.conf; do |
1008 |
|
|
backupfile="%{_datadir}/%{drivername}/$(basename "$file").mga" |
1009 |
|
|
if ! [ -e $file ] && [ -e "$backupfile" ]; then |
1010 |
|
|
ln -T "$backupfile" "$file" |
1011 |
|
|
fi |
1012 |
|
|
done |
1013 |
|
|
|
1014 |
ahmad |
56864 |
%postun -n %{driverpkgname} |
1015 |
|
|
if [ ! -f %{_sysconfdir}/%{drivername}/ld.so.conf ]; then |
1016 |
|
|
%{_sbindir}/update-alternatives --remove gl_conf %{_sysconfdir}/%{drivername}/ld.so.conf |
1017 |
|
|
fi |
1018 |
|
|
# explicit /sbin/ldconfig due to alternatives |
1019 |
|
|
/sbin/ldconfig -X |
1020 |
|
|
|
1021 |
|
|
%if "%{ldetect_cards_name}" != "" |
1022 |
|
|
[ -x %{_sbindir}/update-ldetect-lst ] && %{_sbindir}/update-ldetect-lst || : |
1023 |
|
|
%endif |
1024 |
|
|
|
1025 |
anssi |
174611 |
%post -n %{drivername}-cuda-opencl |
1026 |
|
|
# explicit /sbin/ldconfig due to a non-standard library directory |
1027 |
|
|
/sbin/ldconfig -X |
1028 |
ahmad |
56864 |
|
1029 |
tmb |
925016 |
%post -n %{drivername}-devel |
1030 |
|
|
# explicit /sbin/ldconfig due to a non-standard library directory (mga#14462) |
1031 |
|
|
/sbin/ldconfig -X |
1032 |
|
|
|
1033 |
ahmad |
56864 |
%post -n dkms-%{drivername} |
1034 |
|
|
/usr/sbin/dkms --rpm_safe_upgrade add -m %{drivername} -v %{version}-%{release} && |
1035 |
|
|
/usr/sbin/dkms --rpm_safe_upgrade build -m %{drivername} -v %{version}-%{release} && |
1036 |
|
|
/usr/sbin/dkms --rpm_safe_upgrade install -m %{drivername} -v %{version}-%{release} --force |
1037 |
|
|
|
1038 |
|
|
# rmmod any old driver if present and not in use (e.g. by X) |
1039 |
|
|
rmmod nvidia > /dev/null 2>&1 || true |
1040 |
|
|
|
1041 |
|
|
%preun -n dkms-%{drivername} |
1042 |
|
|
/usr/sbin/dkms --rpm_safe_upgrade remove -m %{drivername} -v %{version}-%{release} --all |
1043 |
|
|
|
1044 |
|
|
# rmmod any old driver if present and not in use (e.g. by X) |
1045 |
|
|
rmmod nvidia > /dev/null 2>&1 || true |
1046 |
|
|
|
1047 |
|
|
%clean |
1048 |
|
|
rm -rf %{buildroot} |
1049 |
|
|
|
1050 |
|
|
%files -n %{driverpkgname} -f %{pkgname}/nvidia.files |
1051 |
|
|
%defattr(-,root,root) |
1052 |
|
|
# other documentation files are listed in nvidia.files |
1053 |
|
|
%doc README.install.urpmi README.manual-setup |
1054 |
|
|
|
1055 |
|
|
%if "%{ldetect_cards_name}" != "" |
1056 |
|
|
%{_datadir}/ldetect-lst/pcitable.d/40%{drivername}.lst.gz |
1057 |
|
|
%endif |
1058 |
|
|
|
1059 |
anssi |
320407 |
# ld.so.conf, modprobe.conf, xinit |
1060 |
ahmad |
56864 |
%ghost %{_sysconfdir}/ld.so.conf.d/GL.conf |
1061 |
|
|
%ghost %{_sysconfdir}/X11/xinit.d/nvidia-settings.xinit |
1062 |
ahmad |
66356 |
%ghost %{_sysconfdir}/modprobe.d/display-driver.conf |
1063 |
ahmad |
56864 |
%dir %{_sysconfdir}/%{drivername} |
1064 |
|
|
%{_sysconfdir}/%{drivername}/modprobe.conf |
1065 |
|
|
%{_sysconfdir}/%{drivername}/ld.so.conf |
1066 |
|
|
%{_sysconfdir}/%{drivername}/nvidia-settings.xinit |
1067 |
tmb |
1021483 |
%{_sysconfdir}/vulkan/icd.d/nvidia_icd.json |
1068 |
anssi |
812247 |
%ghost %{_datadir}/nvidia |
1069 |
ahmad |
56864 |
%if !%simple |
1070 |
|
|
%{_sysconfdir}/%{drivername}/nvidia.icd |
1071 |
anssi |
812247 |
%dir %{nvidia_datadir} |
1072 |
|
|
%{nvidia_datadir}/nvidia-application-profiles-%{version}-rc |
1073 |
|
|
%{nvidia_datadir}/nvidia-application-profiles-%{version}-key-documentation |
1074 |
tmb |
837782 |
#{nvidia_datadir}/monitoring.conf |
1075 |
|
|
#{nvidia_datadir}/pci.ids |
1076 |
anssi |
812247 |
# backups, see posttrans |
1077 |
tmb |
837782 |
#{_datadir}/%{drivername}/monitoring.conf.mga |
1078 |
|
|
#{_datadir}/%{drivername}/pci.ids.mga |
1079 |
ahmad |
56864 |
%endif |
1080 |
|
|
|
1081 |
|
|
%dir %{_sysconfdir}/OpenCL |
1082 |
|
|
%dir %{_sysconfdir}/OpenCL/vendors |
1083 |
|
|
%ghost %{_sysconfdir}/OpenCL/vendors/nvidia.icd |
1084 |
|
|
|
1085 |
anssi |
152893 |
%ghost %{_bindir}/nvidia-debugdump |
1086 |
ahmad |
56864 |
%ghost %{_bindir}/nvidia-settings |
1087 |
|
|
%ghost %{_bindir}/nvidia-smi |
1088 |
|
|
%ghost %{_bindir}/nvidia-xconfig |
1089 |
anssi |
412170 |
%ghost %{_bindir}/nvidia-modprobe |
1090 |
|
|
%ghost %{_bindir}/nvidia-persistenced |
1091 |
ahmad |
56864 |
%ghost %{_bindir}/nvidia-bug-report.sh |
1092 |
anssi |
412170 |
%ghost %{_bindir}/nvidia-cuda-mps-control |
1093 |
|
|
%ghost %{_bindir}/nvidia-cuda-mps-server |
1094 |
ahmad |
56864 |
%if !%simple |
1095 |
|
|
%dir %{nvidia_bindir} |
1096 |
anssi |
152893 |
%{nvidia_bindir}/nvidia-debugdump |
1097 |
ahmad |
56864 |
%{nvidia_bindir}/nvidia-settings |
1098 |
|
|
%{nvidia_bindir}/nvidia-smi |
1099 |
|
|
%{nvidia_bindir}/nvidia-xconfig |
1100 |
anssi |
412170 |
%{nvidia_bindir}/nvidia-modprobe |
1101 |
|
|
%{nvidia_bindir}/nvidia-persistenced |
1102 |
ahmad |
56864 |
%{nvidia_bindir}/nvidia-bug-report.sh |
1103 |
anssi |
412170 |
%{nvidia_bindir}/nvidia-cuda-mps-control |
1104 |
|
|
%{nvidia_bindir}/nvidia-cuda-mps-server |
1105 |
ahmad |
56864 |
%endif |
1106 |
|
|
|
1107 |
|
|
%ghost %{_mandir}/man1/nvidia-xconfig.1%{_extension} |
1108 |
|
|
%ghost %{_mandir}/man1/nvidia-settings.1%{_extension} |
1109 |
anssi |
412170 |
%ghost %{_mandir}/man1/nvidia-modprobe.1%{_extension} |
1110 |
|
|
%ghost %{_mandir}/man1/nvidia-persistenced.1%{_extension} |
1111 |
ahmad |
56864 |
%ghost %{_mandir}/man1/nvidia-smi.1%{_extension} |
1112 |
anssi |
412170 |
%ghost %{_mandir}/man1/nvidia-cuda-mps-control.1%{_extension} |
1113 |
ahmad |
56864 |
%if !%simple |
1114 |
|
|
%{_mandir}/man1/alt-%{drivername}-xconfig.1* |
1115 |
|
|
%{_mandir}/man1/alt-%{drivername}-settings.1* |
1116 |
anssi |
412170 |
%{_mandir}/man1/alt-%{drivername}-modprobe.1* |
1117 |
|
|
%{_mandir}/man1/alt-%{drivername}-persistenced.1* |
1118 |
ahmad |
56864 |
%{_mandir}/man1/alt-%{drivername}-smi.1* |
1119 |
anssi |
412170 |
%{_mandir}/man1/alt-%{drivername}-cuda-mps-control.1* |
1120 |
ahmad |
56864 |
%else |
1121 |
|
|
%{_mandir}/man1/alt-%{drivername}-* |
1122 |
|
|
%endif |
1123 |
|
|
|
1124 |
ahmad |
56909 |
%ghost %{_datadir}/applications/mageia-nvidia-settings.desktop |
1125 |
ahmad |
56864 |
%dir %{_datadir}/%{drivername} |
1126 |
ahmad |
56909 |
%{_datadir}/%{drivername}/mageia-nvidia-settings.desktop |
1127 |
ahmad |
56864 |
|
1128 |
|
|
%if !%simple |
1129 |
|
|
%{_iconsdir}/hicolor/16x16/apps/%{drivername}-settings.png |
1130 |
|
|
%{_iconsdir}/hicolor/32x32/apps/%{drivername}-settings.png |
1131 |
|
|
%endif |
1132 |
|
|
%{_iconsdir}/hicolor/48x48/apps/%{drivername}-settings.png |
1133 |
|
|
|
1134 |
|
|
%if !%simple |
1135 |
|
|
%dir %{nvidia_libdir} |
1136 |
|
|
%dir %{nvidia_libdir}/tls |
1137 |
|
|
%dir %{nvidia_libdir}/vdpau |
1138 |
|
|
%{nvidia_libdir}/libGL.so.%{version} |
1139 |
tmb |
629397 |
%{nvidia_libdir}/libnvidia-cfg.so.%{version} |
1140 |
ahmad |
56864 |
%{nvidia_libdir}/libnvidia-glcore.so.%{version} |
1141 |
|
|
%{nvidia_libdir}/libnvidia-tls.so.%{version} |
1142 |
tmb |
629397 |
%{nvidia_libdir}/libEGL.so.1 |
1143 |
tmb |
1000684 |
%{nvidia_libdir}/libEGL_nvidia.so.0 |
1144 |
|
|
%{nvidia_libdir}/libEGL_nvidia.so.%{version} |
1145 |
ahmad |
56864 |
%{nvidia_libdir}/libGL.so.1 |
1146 |
tmb |
1000684 |
%{nvidia_libdir}/libGLdispatch.so.0 |
1147 |
tmb |
629397 |
%{nvidia_libdir}/libGLESv1_CM.so.1 |
1148 |
tmb |
1000684 |
%{nvidia_libdir}/libGLESv1_CM_nvidia.so.1 |
1149 |
|
|
%{nvidia_libdir}/libGLESv1_CM_nvidia.so.%{version} |
1150 |
tmb |
629397 |
%{nvidia_libdir}/libGLESv2.so.2 |
1151 |
tmb |
1000684 |
%{nvidia_libdir}/libGLESv2_nvidia.so.2 |
1152 |
|
|
%{nvidia_libdir}/libGLESv2_nvidia.so.%{version} |
1153 |
|
|
%{nvidia_libdir}/libGLX_indirect.so.0 |
1154 |
|
|
%{nvidia_libdir}/libGLX_nvidia.so.0 |
1155 |
|
|
%{nvidia_libdir}/libGLX_nvidia.so.%{version} |
1156 |
|
|
%{nvidia_libdir}/libOpenGL.so.0 |
1157 |
ahmad |
56864 |
%{nvidia_libdir}/libnvidia-cfg.so.1 |
1158 |
tmb |
629397 |
%{nvidia_libdir}/libnvidia-eglcore.so.%{version} |
1159 |
tmb |
1021483 |
%{nvidia_libdir}/libnvidia-egl-wayland.so.%{version} |
1160 |
tmb |
1000684 |
%{nvidia_libdir}/libnvidia-fatbinaryloader.so.%{version} |
1161 |
tmb |
550648 |
%{nvidia_libdir}/libnvidia-fbc.so.1 |
1162 |
|
|
%{nvidia_libdir}/libnvidia-fbc.so.%{version} |
1163 |
tmb |
629397 |
%{nvidia_libdir}/libnvidia-glsi.so.%{version} |
1164 |
anssi |
812377 |
%{nvidia_libdir}/libnvidia-gtk2.so.%{version} |
1165 |
|
|
%{nvidia_libdir}/libnvidia-gtk3.so.%{version} |
1166 |
tmb |
469114 |
%{nvidia_libdir}/libnvidia-ifr.so.1 |
1167 |
|
|
%{nvidia_libdir}/libnvidia-ifr.so.%{version} |
1168 |
tmb |
274692 |
%{nvidia_libdir}/libnvidia-ml.so.1 |
1169 |
|
|
%{nvidia_libdir}/libnvidia-ml.so.%{version} |
1170 |
tmb |
1000684 |
%{nvidia_libdir}/libnvidia-ptxjitcompiler.so.%{version} |
1171 |
ahmad |
56864 |
%{nvidia_libdir}/libvdpau_nvidia.so |
1172 |
|
|
%{nvidia_libdir}/tls/libnvidia-tls.so.%{version} |
1173 |
tmb |
629397 |
%{nvidia_libdir}/vdpau/libvdpau_nvidia.so.%{version} |
1174 |
|
|
%ifarch %{biarches} |
1175 |
|
|
%dir %{nvidia_libdir32} |
1176 |
|
|
%dir %{nvidia_libdir32}/tls |
1177 |
|
|
%dir %{nvidia_libdir32}/vdpau |
1178 |
tmb |
550648 |
%{nvidia_libdir32}/libEGL.so.1 |
1179 |
tmb |
1000684 |
%{nvidia_libdir32}/libEGL_nvidia.so.0 |
1180 |
|
|
%{nvidia_libdir32}/libEGL_nvidia.so.%{version} |
1181 |
tmb |
629397 |
%{nvidia_libdir32}/libGL.so.1 |
1182 |
|
|
%{nvidia_libdir32}/libGL.so.%{version} |
1183 |
tmb |
1000684 |
%{nvidia_libdir32}/libGLdispatch.so.0 |
1184 |
tmb |
550648 |
%{nvidia_libdir32}/libGLESv1_CM.so.1 |
1185 |
tmb |
1000684 |
%{nvidia_libdir32}/libGLESv1_CM_nvidia.so.1 |
1186 |
|
|
%{nvidia_libdir32}/libGLESv1_CM_nvidia.so.%{version} |
1187 |
tmb |
550648 |
%{nvidia_libdir32}/libGLESv2.so.2 |
1188 |
tmb |
1000684 |
%{nvidia_libdir32}/libGLESv2_nvidia.so.2 |
1189 |
|
|
%{nvidia_libdir32}/libGLESv2_nvidia.so.%{version} |
1190 |
|
|
%{nvidia_libdir32}/libGLX_indirect.so.0 |
1191 |
|
|
%{nvidia_libdir32}/libGLX_nvidia.so.0 |
1192 |
tmb |
1019468 |
%{nvidia_libdir32}/libGLX_nvidia.so.%{version} |
1193 |
tmb |
1000684 |
%{nvidia_libdir32}/libOpenGL.so.0 |
1194 |
tmb |
550648 |
%{nvidia_libdir32}/libnvidia-eglcore.so.%{version} |
1195 |
tmb |
1000684 |
%{nvidia_libdir32}/libnvidia-fatbinaryloader.so.%{version} |
1196 |
tmb |
618433 |
%{nvidia_libdir32}/libnvidia-fbc.so.1 |
1197 |
|
|
%{nvidia_libdir32}/libnvidia-fbc.so.%{version} |
1198 |
ahmad |
56864 |
%{nvidia_libdir32}/libnvidia-glcore.so.%{version} |
1199 |
tmb |
629397 |
%{nvidia_libdir32}/libnvidia-glsi.so.%{version} |
1200 |
tmb |
469114 |
%{nvidia_libdir32}/libnvidia-ifr.so.1 |
1201 |
|
|
%{nvidia_libdir32}/libnvidia-ifr.so.%{version} |
1202 |
tmb |
274692 |
%{nvidia_libdir32}/libnvidia-ml.so.1 |
1203 |
|
|
%{nvidia_libdir32}/libnvidia-ml.so.%{version} |
1204 |
ahmad |
56864 |
%{nvidia_libdir32}/libnvidia-tls.so.%{version} |
1205 |
tmb |
1000684 |
%{nvidia_libdir32}/libnvidia-ptxjitcompiler.so.%{version} |
1206 |
ahmad |
56864 |
%{nvidia_libdir32}/libvdpau_nvidia.so |
1207 |
tmb |
629397 |
%{nvidia_libdir32}/tls/libnvidia-tls.so.%{version} |
1208 |
ahmad |
56864 |
%{nvidia_libdir32}/vdpau/libvdpau_nvidia.so.%{version} |
1209 |
|
|
%endif |
1210 |
|
|
# %simple |
1211 |
|
|
%endif |
1212 |
|
|
|
1213 |
|
|
%ghost %{_libdir}/vdpau/libvdpau_nvidia.so.1 |
1214 |
|
|
%ifarch %{biarches} |
1215 |
|
|
# avoid unowned directory |
1216 |
|
|
%dir %{_prefix}/lib/vdpau |
1217 |
|
|
%ghost %{_prefix}/lib/vdpau/libvdpau_nvidia.so.1 |
1218 |
|
|
%endif |
1219 |
|
|
|
1220 |
ahmad |
56909 |
%if !%simple |
1221 |
ahmad |
56864 |
%dir %{nvidia_modulesdir} |
1222 |
|
|
%{nvidia_modulesdir}/libnvidia-wfb.so.1 |
1223 |
|
|
%endif |
1224 |
|
|
|
1225 |
|
|
%if !%simple |
1226 |
|
|
%{nvidia_modulesdir}/libnvidia-wfb.so.%{version} |
1227 |
|
|
%endif |
1228 |
|
|
|
1229 |
|
|
%if !%simple |
1230 |
|
|
%{nvidia_extensionsdir}/libglx.so.%{version} |
1231 |
|
|
%{nvidia_extensionsdir}/libglx.so |
1232 |
|
|
%endif |
1233 |
|
|
|
1234 |
|
|
%if !%simple |
1235 |
|
|
%{nvidia_driversdir}/nvidia_drv.so |
1236 |
|
|
%endif |
1237 |
|
|
|
1238 |
tmb |
904031 |
%if %simple |
1239 |
ahmad |
56864 |
%files -n %{drivername}-devel -f %pkgname/nvidia-devel.files |
1240 |
tmb |
904031 |
%else |
1241 |
|
|
%files -n %{drivername}-devel |
1242 |
ahmad |
56864 |
%defattr(-,root,root) |
1243 |
|
|
%{_includedir}/%{drivername} |
1244 |
tmb |
629397 |
%{nvidia_libdir}/libEGL.so |
1245 |
ahmad |
56864 |
%{nvidia_libdir}/libGL.so |
1246 |
tmb |
629397 |
%{nvidia_libdir}/libGLESv1_CM.so |
1247 |
|
|
%{nvidia_libdir}/libGLESv2.so |
1248 |
|
|
%{nvidia_libdir}/libOpenCL.so |
1249 |
tmb |
1000684 |
%{nvidia_libdir}/libOpenGL.so |
1250 |
ahmad |
56864 |
%{nvidia_libdir}/libcuda.so |
1251 |
|
|
%{nvidia_libdir}/libnvcuvid.so |
1252 |
|
|
%{nvidia_libdir}/libnvidia-cfg.so |
1253 |
tmb |
629397 |
%{nvidia_libdir}/libnvidia-encode.so |
1254 |
tmb |
550648 |
%{nvidia_libdir}/libnvidia-fbc.so |
1255 |
tmb |
469114 |
%{nvidia_libdir}/libnvidia-ifr.so |
1256 |
ahmad |
56909 |
%{nvidia_libdir}/libnvidia-ml.so |
1257 |
tmb |
629397 |
%ifarch %{biarches} |
1258 |
tmb |
551069 |
%{nvidia_libdir32}/libEGL.so |
1259 |
tmb |
629397 |
%{nvidia_libdir32}/libGL.so |
1260 |
tmb |
551069 |
%{nvidia_libdir32}/libGLESv1_CM.so |
1261 |
|
|
%{nvidia_libdir32}/libGLESv2.so |
1262 |
tmb |
629397 |
%{nvidia_libdir32}/libOpenCL.so |
1263 |
tmb |
1000684 |
%{nvidia_libdir32}/libOpenGL.so |
1264 |
ahmad |
56864 |
%{nvidia_libdir32}/libcuda.so |
1265 |
anssi |
320407 |
%{nvidia_libdir32}/libnvcuvid.so |
1266 |
tmb |
629397 |
%{nvidia_libdir32}/libnvidia-encode.so |
1267 |
|
|
%{nvidia_libdir32}/libnvidia-fbc.so |
1268 |
tmb |
469114 |
%{nvidia_libdir32}/libnvidia-ifr.so |
1269 |
tmb |
629397 |
%{nvidia_libdir32}/libnvidia-ml.so |
1270 |
ahmad |
56864 |
%endif |
1271 |
|
|
%endif |
1272 |
|
|
|
1273 |
|
|
%files -n dkms-%{drivername} |
1274 |
|
|
%defattr(-,root,root) |
1275 |
|
|
%doc %{pkgname}/LICENSE |
1276 |
|
|
%{_usrsrc}/%{drivername}-%{version}-%{release} |
1277 |
|
|
|
1278 |
|
|
%files -n %{drivername}-doc-html -f %pkgname/nvidia-html.files |
1279 |
|
|
%defattr(-,root,root) |
1280 |
|
|
|
1281 |
tmb |
904031 |
%if %simple |
1282 |
ahmad |
56864 |
%files -n %{drivername}-cuda-opencl -f %pkgname/nvidia-cuda.files |
1283 |
tmb |
904031 |
%else |
1284 |
|
|
%files -n %{drivername}-cuda-opencl |
1285 |
ahmad |
56864 |
%defattr(-,root,root) |
1286 |
anssi |
412170 |
# Do not preferably add any alternativeszificated binaries here, |
1287 |
|
|
# they cause broken symlinks. |
1288 |
ahmad |
56864 |
%{nvidia_libdir}/libOpenCL.so.1.0.0 |
1289 |
|
|
%{nvidia_libdir}/libOpenCL.so.1.0 |
1290 |
|
|
%{nvidia_libdir}/libOpenCL.so.1 |
1291 |
|
|
%{nvidia_libdir}/libnvcuvid.so.%{version} |
1292 |
|
|
%{nvidia_libdir}/libnvcuvid.so.1 |
1293 |
|
|
%{nvidia_libdir}/libnvidia-compiler.so.%{version} |
1294 |
anssi |
320407 |
%{nvidia_libdir}/libnvidia-encode.so.1 |
1295 |
|
|
%{nvidia_libdir}/libnvidia-encode.so.%{version} |
1296 |
tmb |
282100 |
%{nvidia_libdir}/libnvidia-opencl.so.1 |
1297 |
|
|
%{nvidia_libdir}/libnvidia-opencl.so.%{version} |
1298 |
ahmad |
56864 |
%{nvidia_libdir}/libcuda.so.%{version} |
1299 |
|
|
%{nvidia_libdir}/libcuda.so.1 |
1300 |
|
|
%ifarch %{biarches} |
1301 |
|
|
%{nvidia_libdir32}/libOpenCL.so.1.0.0 |
1302 |
|
|
%{nvidia_libdir32}/libOpenCL.so.1.0 |
1303 |
|
|
%{nvidia_libdir32}/libOpenCL.so.1 |
1304 |
anssi |
320407 |
%{nvidia_libdir32}/libnvcuvid.so.%{version} |
1305 |
|
|
%{nvidia_libdir32}/libnvcuvid.so.1 |
1306 |
ahmad |
56864 |
%{nvidia_libdir32}/libnvidia-compiler.so.%{version} |
1307 |
anssi |
320407 |
%{nvidia_libdir32}/libnvidia-encode.so.1 |
1308 |
|
|
%{nvidia_libdir32}/libnvidia-encode.so.%{version} |
1309 |
|
|
%{nvidia_libdir32}/libnvidia-opencl.so.1 |
1310 |
|
|
%{nvidia_libdir32}/libnvidia-opencl.so.%{version} |
1311 |
ahmad |
56864 |
%{nvidia_libdir32}/libcuda.so.%{version} |
1312 |
|
|
%{nvidia_libdir32}/libcuda.so.1 |
1313 |
|
|
%endif |
1314 |
|
|
%endif |