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