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