]>
Commit | Line | Data |
---|---|---|
28142503 PS |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without dist_kernel # without distribution kernel | |
bf683e7a | 4 | %bcond_without kernel # without kernel packages |
1820d34b | 5 | %bcond_without userspace # don't build userspace programs |
ffec07c8 | 6 | %bcond_with multigl # package libGL and libglx.so in a way allowing concurrent install with nvidia/fglrx drivers |
a14b5013 | 7 | %bcond_with verbose # verbose build (V=1) |
8 | ||
a14b5013 | 9 | %if "%{_alt_kernel}" != "%{nil}" |
10 | %undefine with_userspace | |
22d6cc34 | 11 | %endif |
c543fa7c ER |
12 | %if %{without userspace} |
13 | # nothing to be placed to debuginfo package | |
14 | %define _enable_debug_packages 0 | |
15 | %endif | |
c5bb5957 | 16 | |
a14b5013 | 17 | %define pname xorg-driver-video-nvidia |
1af86cd0 | 18 | %define rel 4 |
a14b5013 | 19 | |
974295b8 JB |
20 | Summary: Linux Drivers for nVidia GeForce/Quadro Chips |
21 | Summary(pl.UTF-8): Sterowniki do kart graficznych nVidia GeForce/Quadro | |
a14b5013 | 22 | Name: %{pname}%{_alt_kernel} |
1f51dfdb | 23 | Version: 169.12 |
c5bb5957 | 24 | Release: %{rel}%{?with_multigl:.mgl} |
28142503 | 25 | License: nVidia Binary |
4a185d32 | 26 | Group: X11 |
ba42daf3 | 27 | Source0: http://http.download.nvidia.com/XFree86/Linux-x86/%{version}/NVIDIA-Linux-x86-%{version}-pkg1.run |
1f51dfdb | 28 | # Source0-md5: c1d45a150a90e6a11da21623493a628e |
ba42daf3 | 29 | Source1: http://http.download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x86_64-%{version}-pkg2.run |
1f51dfdb | 30 | # Source1-md5: 8d29f4541f35e10ef06e566c57500cc1 |
a14b5013 | 31 | Source2: %{pname}-xinitrc.sh |
bcf69910 JB |
32 | Patch0: X11-driver-nvidia-GL.patch |
33 | Patch1: X11-driver-nvidia-desktop.patch | |
d35ce91f | 34 | Patch2: NVIDIA_kernel-169.12-2286310.diff |
f517f625 | 35 | URL: http://www.nvidia.com/object/unix.html |
82268c76 | 36 | %if %{with kernel} |
0e15e33b | 37 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2} |
82268c76 | 38 | %endif |
28142503 | 39 | BuildRequires: %{kgcc_package} |
d68f27fd | 40 | BuildRequires: rpmbuild(macros) >= 1.379 |
039c7221 | 41 | BuildRequires: sed >= 4.0 |
0ed6aeef | 42 | BuildConflicts: XFree86-nvidia |
8343d24d | 43 | Requires: xorg-xserver-server |
56b60abf | 44 | Requires: xorg-xserver-server(videodrv-abi) = 2.0 |
1b8b7646 | 45 | Provides: OpenGL = 2.1 |
63c6d4b1 | 46 | Provides: OpenGL-GLX = 1.4 |
60ec480a | 47 | Provides: xorg-xserver-libglx |
ffec07c8 | 48 | %if !%{with multigl} |
28142503 | 49 | Obsoletes: Mesa |
ffec07c8 | 50 | %endif |
fff74aa2 AM |
51 | Obsoletes: X11-OpenGL-core < 1:7.0.0 |
52 | Obsoletes: X11-OpenGL-libGL < 1:7.0.0 | |
53 | Obsoletes: XFree86-OpenGL-core < 1:7.0.0 | |
54 | Obsoletes: XFree86-OpenGL-libGL < 1:7.0.0 | |
2d490dca | 55 | Obsoletes: XFree86-driver-nvidia |
28142503 | 56 | Obsoletes: XFree86-nvidia |
4a61f89d PZ |
57 | %if !%{with multigl} |
58 | Conflicts: Mesa-libGL | |
59 | %endif | |
28142503 | 60 | Conflicts: XFree86-OpenGL-devel <= 4.2.0-3 |
1b927e61 | 61 | ExclusiveArch: %{ix86} %{x8664} |
28142503 PS |
62 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
63 | ||
03da6314 | 64 | %define _noautoreqdep libGL.so.1 libGLcore.so.1 |
28142503 PS |
65 | |
66 | %description | |
974295b8 JB |
67 | This driver set adds improved 2D functionality to the Xorg X server as |
68 | well as high performance OpenGL acceleration, AGP support, support for | |
69 | most flat panels, and 2D multiple monitor support. Supported hardware: | |
70 | modern NVIDIA GeForce (from GeForce2 MX) and Quadro (Quadro4 and up) | |
71 | based graphics accelerators. | |
28142503 | 72 | |
974295b8 JB |
73 | The older graphics chips are unsupported: |
74 | - NV1 and RIVA 128/128ZX chips are supported in the base Xorg install | |
75 | (nv driver) | |
76 | - TNT/TNT2/GeForce 256/GeForce2 Ultra/Quadro2 are suported by -legacy | |
77 | drivers. | |
28142503 | 78 | |
c311612f | 79 | %description -l pl.UTF-8 |
974295b8 JB |
80 | Usprawnione sterowniki dla kart graficznych nVidia do serwera Xorg, |
81 | dające wysokowydajną akcelerację OpenGL, obsługę AGP i wielu monitorów | |
82 | 2D. Obsługują w miarę nowe karty NVIDIA GeForce (od wersji GeForce2 | |
83 | MX) oraz Quadro (od wersji Quadro4). | |
28142503 | 84 | |
974295b8 JB |
85 | Starsze układy graficzne nie są obsługiwane przez ten pakiet: |
86 | - NV1 i RIVA 128/128ZX są obsługiwane przez sterownik nv z Xorg | |
87 | - TNT/TNT2/GeForce 256/GeForce 2 Ultra/Quadro 2 są obsługiwane przez | |
88 | sterowniki -legacy | |
28142503 PS |
89 | |
90 | %package devel | |
63c6d4b1 JB |
91 | Summary: OpenGL (GL and GLX) header files |
92 | Summary(pl.UTF-8): Pliki nagłówkowe OpenGL (GL i GLX) | |
28142503 | 93 | Group: X11/Development/Libraries |
2d490dca | 94 | Requires: %{name} = %{version}-%{release} |
63c6d4b1 | 95 | Provides: OpenGL-GLX-devel = 1.4 |
1b8b7646 | 96 | Provides: OpenGL-devel = 2.1 |
63c6d4b1 JB |
97 | Obsoletes: X11-OpenGL-devel-base |
98 | Obsoletes: XFree86-OpenGL-devel-base | |
2d490dca | 99 | Obsoletes: XFree86-driver-nvidia-devel |
28142503 PS |
100 | Conflicts: XFree86-OpenGL-devel < 4.3.99.902-0.3 |
101 | ||
102 | %description devel | |
63c6d4b1 JB |
103 | OpenGL header files (GL and GLX only) for NVIDIA OpenGL |
104 | implementation. | |
28142503 | 105 | |
c311612f | 106 | %description devel -l pl.UTF-8 |
63c6d4b1 JB |
107 | Pliki nagłówkowe OpenGL (tylko GL i GLX) dla implementacji OpenGL |
108 | firmy NVIDIA. | |
109 | ||
110 | %package static | |
111 | Summary: Static XvMCNVIDIA library | |
112 | Summary(pl.UTF-8): Statyczna biblioteka XvMCNVIDIA | |
113 | Group: X11/Development/Libraries | |
114 | Requires: %{name}-devel = %{version}-%{release} | |
115 | ||
116 | %description static | |
117 | Static XvMCNVIDIA library. | |
118 | ||
119 | %description static -l pl.UTF-8 | |
120 | Statyczna biblioteka XvMCNVIDIA. | |
28142503 PS |
121 | |
122 | %package progs | |
123 | Summary: Tools for advanced control of nVidia graphic cards | |
b37addd9 | 124 | Summary(pl.UTF-8): Narzędzia do zarządzania kartami graficznymi nVidia |
f12e8b24 | 125 | Group: Applications/System |
2d490dca | 126 | Requires: %{name} = %{version}-%{release} |
0ed6aeef | 127 | Obsoletes: XFree86-driver-nvidia-progs |
28142503 PS |
128 | |
129 | %description progs | |
130 | Tools for advanced control of nVidia graphic cards. | |
131 | ||
c311612f JR |
132 | %description progs -l pl.UTF-8 |
133 | Narzędzia do zarządzania kartami graficznymi nVidia. | |
28142503 | 134 | |
ccd3c14b | 135 | %if %{with kernel} |
00aee69a | 136 | %package -n kernel%{_alt_kernel}-video-nvidia |
28142503 | 137 | Summary: nVidia kernel module for nVidia Architecture support |
b37addd9 ER |
138 | Summary(de.UTF-8): Das nVidia-Kern-Modul für die nVidia-Architektur-Unterstützung |
139 | Summary(pl.UTF-8): Moduł jądra dla obsługi kart graficznych nVidia | |
a14b5013 | 140 | Version: %{version} |
c5bb5957 | 141 | Release: %{rel}@%{_kernel_ver_str} |
28142503 | 142 | Group: Base/Kernel |
28142503 PS |
143 | Requires(post,postun): /sbin/depmod |
144 | Requires: dev >= 2.7.7-10 | |
d68f27fd | 145 | %{?with_dist_kernel:%requires_releq_kernel} |
2d490dca | 146 | Provides: X11-driver-nvidia(kernel) |
28142503 PS |
147 | Obsoletes: XFree86-nvidia-kernel |
148 | ||
00aee69a | 149 | %description -n kernel%{_alt_kernel}-video-nvidia |
28142503 PS |
150 | nVidia Architecture support for Linux kernel. |
151 | ||
c311612f JR |
152 | %description -n kernel%{_alt_kernel}-video-nvidia -l de.UTF-8 |
153 | Die nVidia-Architektur-Unterstützung für den Linux-Kern. | |
28142503 | 154 | |
c311612f JR |
155 | %description -n kernel%{_alt_kernel}-video-nvidia -l pl.UTF-8 |
156 | Obsługa architektury nVidia dla jądra Linuksa. Pakiet wymagany przez | |
0ed6aeef | 157 | sterownik nVidii dla Xorg/XFree86. |
ccd3c14b | 158 | %endif |
28142503 | 159 | |
28142503 PS |
160 | %prep |
161 | cd %{_builddir} | |
a14b5013 | 162 | rm -rf NVIDIA-Linux-x86*-%{version}-pkg* |
039c7221 | 163 | %ifarch %{ix86} |
28142503 | 164 | /bin/sh %{SOURCE0} --extract-only |
a14b5013 | 165 | %setup -qDT -n NVIDIA-Linux-x86-%{version}-pkg1 |
039c7221 PS |
166 | %else |
167 | /bin/sh %{SOURCE1} --extract-only | |
a14b5013 | 168 | %setup -qDT -n NVIDIA-Linux-x86_64-%{version}-pkg2 |
039c7221 | 169 | %endif |
bcf69910 | 170 | %patch0 -p1 |
0029e8cc | 171 | %patch1 -p1 |
d35ce91f | 172 | %if "%{_kernel_ver}" >= "2.6.25" |
173 | %patch2 -p0 | |
174 | %endif | |
eb6ba6c9 | 175 | echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> usr/src/nv/Makefile.kbuild |
28142503 PS |
176 | |
177 | %build | |
2317af94 | 178 | %if %{with kernel} |
28142503 | 179 | cd usr/src/nv/ |
d4a34ce2 | 180 | ln -sf Makefile.kbuild Makefile |
94ef5e53 | 181 | cat >> Makefile <<'EOF' |
182 | ||
183 | $(obj)/nv-kernel.o: $(src)/nv-kernel.o.bin | |
184 | cp $< $@ | |
185 | EOF | |
186 | mv nv-kernel.o{,.bin} | |
12a94e85 | 187 | %build_kernel_modules -m nvidia |
2317af94 | 188 | %endif |
28142503 PS |
189 | |
190 | %install | |
191 | rm -rf $RPM_BUILD_ROOT | |
1820d34b ER |
192 | |
193 | %if %{with userspace} | |
eb6ba6c9 | 194 | install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,extensions} \ |
225cc701 | 195 | $RPM_BUILD_ROOT{%{_includedir}/GL,%{_libdir},%{_bindir},%{_mandir}/man1} \ |
2a45f872 | 196 | $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/etc/X11/xinit/xinitrc.d} |
ffec07c8 JR |
197 | %if %{with multigl} |
198 | install -d $RPM_BUILD_ROOT{%{_libdir}/nvidia,%{_sysconfdir}/ld.so.conf.d} | |
199 | %endif | |
28142503 | 200 | |
7a2ced2a | 201 | install usr/bin/nvidia-{settings,xconfig,bug-report.sh} $RPM_BUILD_ROOT%{_bindir} |
225cc701 | 202 | install usr/share/man/man1/nvidia-{settings,xconfig}.* $RPM_BUILD_ROOT%{_mandir}/man1 |
203 | install usr/share/applications/nvidia-settings.desktop $RPM_BUILD_ROOT%{_desktopdir} | |
7a2ced2a | 204 | install usr/share/pixmaps/nvidia-settings.png $RPM_BUILD_ROOT%{_pixmapsdir} |
2a45f872 | 205 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d/nvidia-settings.sh |
eb6ba6c9 PS |
206 | |
207 | for f in \ | |
208 | usr/lib/tls/libnvidia-tls.so.%{version} \ | |
069d2a12 | 209 | usr/lib/libnvidia-cfg.so.%{version} \ |
eb6ba6c9 PS |
210 | usr/lib/libGL{,core}.so.%{version} \ |
211 | usr/X11R6/lib/libXvMCNVIDIA.so.%{version} \ | |
ffec07c8 | 212 | %if !%{with multigl} |
eb6ba6c9 PS |
213 | usr/X11R6/lib/libXvMCNVIDIA.a \ |
214 | ; do | |
215 | install $f $RPM_BUILD_ROOT%{_libdir} | |
216 | done | |
ffec07c8 JR |
217 | %else |
218 | ; do | |
219 | install $f $RPM_BUILD_ROOT%{_libdir}/nvidia | |
220 | done | |
221 | install usr/X11R6/lib/libXvMCNVIDIA.a $RPM_BUILD_ROOT%{_libdir} | |
222 | %endif | |
eb6ba6c9 | 223 | |
d4a34ce2 | 224 | install usr/X11R6/lib/modules/extensions/libglx.so.%{version} \ |
eb6ba6c9 | 225 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions |
23ae74e1 | 226 | install usr/X11R6/lib/modules/drivers/nvidia_drv.so \ |
227 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers | |
069d2a12 | 228 | install usr/X11R6/lib/modules/libnvidia-wfb.so.%{version} \ |
229 | $RPM_BUILD_ROOT%{_libdir}/xorg/modules | |
28142503 | 230 | |
eb6ba6c9 | 231 | install usr/include/GL/*.h $RPM_BUILD_ROOT%{_includedir}/GL |
28142503 | 232 | |
eb6ba6c9 | 233 | ln -sf libglx.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/libglx.so |
ebb24c73 | 234 | ln -sf libnvidia-wfb.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/wfb.so |
28142503 | 235 | |
ffec07c8 JR |
236 | %if %{with multigl} |
237 | echo %{_libdir}/nvidia >$RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia.conf | |
238 | ||
239 | # OpenGL ABI for Linux compatibility | |
240 | ln -sf libGL.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libGL.so.1 | |
241 | ln -sf nvidia/libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so | |
242 | ||
243 | ln -sf nvidia/libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libXvMCNVIDIA.so | |
244 | ln -sf libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libXvMCNVIDIA_dynamic.so.1 | |
245 | %else | |
28142503 | 246 | # OpenGL ABI for Linux compatibility |
eb6ba6c9 PS |
247 | ln -sf libGL.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libGL.so.1 |
248 | ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so | |
ffec07c8 JR |
249 | |
250 | ln -sf libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libXvMCNVIDIA.so | |
251 | ln -sf libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libXvMCNVIDIA_dynamic.so.1 | |
252 | %endif | |
1820d34b | 253 | %endif |
28142503 | 254 | |
1fdf7dcc | 255 | %if %{with kernel} |
12a94e85 | 256 | %install_kernel_modules -m usr/src/nv/nvidia -d misc |
1fdf7dcc | 257 | %endif |
28142503 PS |
258 | |
259 | %clean | |
260 | rm -rf $RPM_BUILD_ROOT | |
261 | ||
a641155e | 262 | %post |
ffbb3439 | 263 | /sbin/ldconfig |
25b520ff | 264 | cat << EOF |
fef7210e JB |
265 | NOTE: You must install: |
266 | kernel-video-nvidia-%{version} | |
267 | for this driver to work | |
25b520ff | 268 | EOF |
504709c0 JR |
269 | %if %{with multigl} |
270 | if [ ! -e %{_libdir}/xorg/modules/extensions/libglx.so ]; then | |
271 | ln -sf libglx.so.%{version} %{_libdir}/xorg/modules/extensions/libglx.so | |
272 | fi | |
273 | %endif | |
25b520ff | 274 | |
ffbb3439 | 275 | %postun -p /sbin/ldconfig |
25b520ff | 276 | |
ccd3c14b | 277 | %if %{with kernel} |
00aee69a | 278 | %post -n kernel%{_alt_kernel}-video-nvidia |
28142503 PS |
279 | %depmod %{_kernel_ver} |
280 | ||
00aee69a | 281 | %postun -n kernel%{_alt_kernel}-video-nvidia |
28142503 | 282 | %depmod %{_kernel_ver} |
ccd3c14b | 283 | %endif |
28142503 | 284 | |
1820d34b | 285 | %if %{with userspace} |
28142503 PS |
286 | %files |
287 | %defattr(644,root,root,755) | |
288 | %doc LICENSE | |
225cc701 | 289 | %doc usr/share/doc/{README.txt,NVIDIA_Changelog,XF86Config.sample,html} |
ffec07c8 JR |
290 | %if %{with multigl} |
291 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ld.so.conf.d/nvidia.conf | |
292 | %dir %{_libdir}/nvidia | |
293 | %attr(755,root,root) %{_libdir}/nvidia/libGL.so.*.* | |
294 | %attr(755,root,root) %ghost %{_libdir}/nvidia/libGL.so.1 | |
295 | %attr(755,root,root) %{_libdir}/nvidia/libGLcore.so.*.* | |
296 | %attr(755,root,root) %{_libdir}/nvidia/libXvMCNVIDIA.so.*.* | |
297 | %attr(755,root,root) %{_libdir}/nvidia/libXvMCNVIDIA_dynamic.so.1 | |
c75f043c | 298 | %attr(755,root,root) %{_libdir}/nvidia/libnvidia-cfg.so.*.* |
299 | %attr(755,root,root) %{_libdir}/nvidia/libnvidia-tls.so.*.* | |
ffec07c8 JR |
300 | %attr(755,root,root) %{_libdir}/xorg/modules/extensions/libglx.so.* |
301 | %ghost %{_libdir}/xorg/modules/extensions/libglx.so | |
302 | %else | |
eb6ba6c9 | 303 | %attr(755,root,root) %{_libdir}/libGL.so.*.* |
63c6d4b1 JB |
304 | %attr(755,root,root) %ghost %{_libdir}/libGL.so.1 |
305 | # symlink for binary apps which fail to conform Linux OpenGL ABI | |
306 | # (and dlopen libGL.so instead of libGL.so.1) | |
307 | %attr(755,root,root) %{_libdir}/libGL.so | |
28142503 PS |
308 | %attr(755,root,root) %{_libdir}/libGLcore.so.*.* |
309 | %attr(755,root,root) %{_libdir}/libXvMCNVIDIA.so.*.* | |
eb6ba6c9 | 310 | %attr(755,root,root) %{_libdir}/libXvMCNVIDIA_dynamic.so.1 |
032cc98f | 311 | %attr(755,root,root) %{_libdir}/libnvidia-cfg.so.*.* |
312 | %attr(755,root,root) %{_libdir}/libnvidia-tls.so.*.* | |
ffec07c8 JR |
313 | %attr(755,root,root) %{_libdir}/xorg/modules/extensions/libglx.so* |
314 | %endif | |
032cc98f | 315 | %attr(755,root,root) %{_libdir}/xorg/modules/libnvidia-wfb.so.*.* |
ebb24c73 | 316 | %attr(755,root,root) %{_libdir}/xorg/modules/wfb.so |
23ae74e1 | 317 | %attr(755,root,root) %{_libdir}/xorg/modules/drivers/nvidia_drv.so |
28142503 | 318 | |
28142503 PS |
319 | %files devel |
320 | %defattr(644,root,root,755) | |
321 | %attr(755,root,root) %{_libdir}/libXvMCNVIDIA.so | |
73eb73e1 | 322 | %dir %{_includedir}/GL |
63c6d4b1 JB |
323 | %{_includedir}/GL/gl.h |
324 | %{_includedir}/GL/glext.h | |
325 | %{_includedir}/GL/glx.h | |
326 | %{_includedir}/GL/glxext.h | |
ffec07c8 JR |
327 | %if %{with multigl} |
328 | %attr(755,root,root) %{_libdir}/libGL.so | |
329 | %endif | |
63c6d4b1 JB |
330 | |
331 | %files static | |
332 | %defattr(644,root,root,755) | |
28142503 PS |
333 | %{_libdir}/libXvMCNVIDIA.a |
334 | ||
d4a34ce2 | 335 | %files progs |
01766b04 | 336 | %defattr(644,root,root,755) |
337 | %attr(755,root,root) %{_bindir}/nvidia-settings | |
225cc701 | 338 | %attr(755,root,root) %{_bindir}/nvidia-xconfig |
7a2ced2a | 339 | %attr(755,root,root) %{_bindir}/nvidia-bug-report.sh |
2a45f872 | 340 | %attr(755,root,root) /etc/X11/xinit/xinitrc.d/*.sh |
225cc701 | 341 | %{_desktopdir}/nvidia-settings.desktop |
342 | %{_mandir}/man1/nvidia-* | |
343 | %{_pixmapsdir}/nvidia-settings.png | |
1820d34b | 344 | %endif |
63c6d4b1 JB |
345 | |
346 | %if %{with kernel} | |
347 | %files -n kernel%{_alt_kernel}-video-nvidia | |
348 | %defattr(644,root,root,755) | |
349 | /lib/modules/%{_kernel_ver}/misc/*.ko* | |
350 | %endif |