]>
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 | |
f517f625 | 30 | URL: http://www.nvidia.com/object/unix.html |
82268c76 | 31 | %if %{with kernel} |
0e15e33b | 32 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2} |
82268c76 | 33 | %endif |
28142503 | 34 | BuildRequires: %{kgcc_package} |
d68f27fd | 35 | BuildRequires: rpmbuild(macros) >= 1.379 |
039c7221 | 36 | BuildRequires: sed >= 4.0 |
0ed6aeef | 37 | BuildConflicts: XFree86-nvidia |
8343d24d | 38 | Requires: xorg-xserver-server |
56b60abf | 39 | Requires: xorg-xserver-server(videodrv-abi) = 2.0 |
1b8b7646 | 40 | Provides: OpenGL = 2.1 |
63c6d4b1 | 41 | Provides: OpenGL-GLX = 1.4 |
60ec480a | 42 | Provides: xorg-xserver-libglx |
ffec07c8 | 43 | %if !%{with multigl} |
28142503 | 44 | Obsoletes: Mesa |
ffec07c8 | 45 | %endif |
fff74aa2 AM |
46 | Obsoletes: X11-OpenGL-core < 1:7.0.0 |
47 | Obsoletes: X11-OpenGL-libGL < 1:7.0.0 | |
48 | Obsoletes: XFree86-OpenGL-core < 1:7.0.0 | |
49 | Obsoletes: XFree86-OpenGL-libGL < 1:7.0.0 | |
2d490dca | 50 | Obsoletes: XFree86-driver-nvidia |
28142503 | 51 | Obsoletes: XFree86-nvidia |
4a61f89d PZ |
52 | %if !%{with multigl} |
53 | Conflicts: Mesa-libGL | |
54 | %endif | |
28142503 | 55 | Conflicts: XFree86-OpenGL-devel <= 4.2.0-3 |
1b927e61 | 56 | ExclusiveArch: %{ix86} %{x8664} |
28142503 PS |
57 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
58 | ||
03da6314 | 59 | %define _noautoreqdep libGL.so.1 libGLcore.so.1 |
28142503 PS |
60 | |
61 | %description | |
974295b8 JB |
62 | This driver set adds improved 2D functionality to the Xorg X server as |
63 | well as high performance OpenGL acceleration, AGP support, support for | |
64 | most flat panels, and 2D multiple monitor support. Supported hardware: | |
65 | modern NVIDIA GeForce (from GeForce2 MX) and Quadro (Quadro4 and up) | |
66 | based graphics accelerators. | |
28142503 | 67 | |
974295b8 JB |
68 | The older graphics chips are unsupported: |
69 | - NV1 and RIVA 128/128ZX chips are supported in the base Xorg install | |
70 | (nv driver) | |
71 | - TNT/TNT2/GeForce 256/GeForce2 Ultra/Quadro2 are suported by -legacy | |
72 | drivers. | |
28142503 | 73 | |
c311612f | 74 | %description -l pl.UTF-8 |
974295b8 JB |
75 | Usprawnione sterowniki dla kart graficznych nVidia do serwera Xorg, |
76 | dające wysokowydajną akcelerację OpenGL, obsługę AGP i wielu monitorów | |
77 | 2D. Obsługują w miarę nowe karty NVIDIA GeForce (od wersji GeForce2 | |
78 | MX) oraz Quadro (od wersji Quadro4). | |
28142503 | 79 | |
974295b8 JB |
80 | Starsze układy graficzne nie są obsługiwane przez ten pakiet: |
81 | - NV1 i RIVA 128/128ZX są obsługiwane przez sterownik nv z Xorg | |
82 | - TNT/TNT2/GeForce 256/GeForce 2 Ultra/Quadro 2 są obsługiwane przez | |
83 | sterowniki -legacy | |
28142503 PS |
84 | |
85 | %package devel | |
63c6d4b1 JB |
86 | Summary: OpenGL (GL and GLX) header files |
87 | Summary(pl.UTF-8): Pliki nagłówkowe OpenGL (GL i GLX) | |
28142503 | 88 | Group: X11/Development/Libraries |
2d490dca | 89 | Requires: %{name} = %{version}-%{release} |
63c6d4b1 | 90 | Provides: OpenGL-GLX-devel = 1.4 |
1b8b7646 | 91 | Provides: OpenGL-devel = 2.1 |
63c6d4b1 JB |
92 | Obsoletes: X11-OpenGL-devel-base |
93 | Obsoletes: XFree86-OpenGL-devel-base | |
2d490dca | 94 | Obsoletes: XFree86-driver-nvidia-devel |
28142503 PS |
95 | Conflicts: XFree86-OpenGL-devel < 4.3.99.902-0.3 |
96 | ||
97 | %description devel | |
63c6d4b1 JB |
98 | OpenGL header files (GL and GLX only) for NVIDIA OpenGL |
99 | implementation. | |
28142503 | 100 | |
c311612f | 101 | %description devel -l pl.UTF-8 |
63c6d4b1 JB |
102 | Pliki nagłówkowe OpenGL (tylko GL i GLX) dla implementacji OpenGL |
103 | firmy NVIDIA. | |
104 | ||
105 | %package static | |
106 | Summary: Static XvMCNVIDIA library | |
107 | Summary(pl.UTF-8): Statyczna biblioteka XvMCNVIDIA | |
108 | Group: X11/Development/Libraries | |
109 | Requires: %{name}-devel = %{version}-%{release} | |
110 | ||
111 | %description static | |
112 | Static XvMCNVIDIA library. | |
113 | ||
114 | %description static -l pl.UTF-8 | |
115 | Statyczna biblioteka XvMCNVIDIA. | |
28142503 PS |
116 | |
117 | %package progs | |
118 | Summary: Tools for advanced control of nVidia graphic cards | |
b37addd9 | 119 | Summary(pl.UTF-8): Narzędzia do zarządzania kartami graficznymi nVidia |
f12e8b24 | 120 | Group: Applications/System |
2d490dca | 121 | Requires: %{name} = %{version}-%{release} |
0ed6aeef | 122 | Obsoletes: XFree86-driver-nvidia-progs |
28142503 PS |
123 | |
124 | %description progs | |
125 | Tools for advanced control of nVidia graphic cards. | |
126 | ||
c311612f JR |
127 | %description progs -l pl.UTF-8 |
128 | Narzędzia do zarządzania kartami graficznymi nVidia. | |
28142503 | 129 | |
ccd3c14b | 130 | %if %{with kernel} |
00aee69a | 131 | %package -n kernel%{_alt_kernel}-video-nvidia |
28142503 | 132 | Summary: nVidia kernel module for nVidia Architecture support |
b37addd9 ER |
133 | Summary(de.UTF-8): Das nVidia-Kern-Modul für die nVidia-Architektur-Unterstützung |
134 | Summary(pl.UTF-8): Moduł jądra dla obsługi kart graficznych nVidia | |
a14b5013 | 135 | Version: %{version} |
c5bb5957 | 136 | Release: %{rel}@%{_kernel_ver_str} |
28142503 | 137 | Group: Base/Kernel |
28142503 PS |
138 | Requires(post,postun): /sbin/depmod |
139 | Requires: dev >= 2.7.7-10 | |
d68f27fd | 140 | %{?with_dist_kernel:%requires_releq_kernel} |
2d490dca | 141 | Provides: X11-driver-nvidia(kernel) |
28142503 PS |
142 | Obsoletes: XFree86-nvidia-kernel |
143 | ||
00aee69a | 144 | %description -n kernel%{_alt_kernel}-video-nvidia |
28142503 PS |
145 | nVidia Architecture support for Linux kernel. |
146 | ||
c311612f JR |
147 | %description -n kernel%{_alt_kernel}-video-nvidia -l de.UTF-8 |
148 | Die nVidia-Architektur-Unterstützung für den Linux-Kern. | |
28142503 | 149 | |
c311612f JR |
150 | %description -n kernel%{_alt_kernel}-video-nvidia -l pl.UTF-8 |
151 | Obsługa architektury nVidia dla jądra Linuksa. Pakiet wymagany przez | |
0ed6aeef | 152 | sterownik nVidii dla Xorg/XFree86. |
ccd3c14b | 153 | %endif |
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 | |
ccd3c14b | 269 | %if %{with kernel} |
00aee69a | 270 | %post -n kernel%{_alt_kernel}-video-nvidia |
28142503 PS |
271 | %depmod %{_kernel_ver} |
272 | ||
00aee69a | 273 | %postun -n kernel%{_alt_kernel}-video-nvidia |
28142503 | 274 | %depmod %{_kernel_ver} |
ccd3c14b | 275 | %endif |
28142503 | 276 | |
1820d34b | 277 | %if %{with userspace} |
28142503 PS |
278 | %files |
279 | %defattr(644,root,root,755) | |
280 | %doc LICENSE | |
225cc701 | 281 | %doc usr/share/doc/{README.txt,NVIDIA_Changelog,XF86Config.sample,html} |
ffec07c8 JR |
282 | %if %{with multigl} |
283 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ld.so.conf.d/nvidia.conf | |
284 | %dir %{_libdir}/nvidia | |
285 | %attr(755,root,root) %{_libdir}/nvidia/libGL.so.*.* | |
286 | %attr(755,root,root) %ghost %{_libdir}/nvidia/libGL.so.1 | |
287 | %attr(755,root,root) %{_libdir}/nvidia/libGLcore.so.*.* | |
288 | %attr(755,root,root) %{_libdir}/nvidia/libXvMCNVIDIA.so.*.* | |
289 | %attr(755,root,root) %{_libdir}/nvidia/libXvMCNVIDIA_dynamic.so.1 | |
c75f043c | 290 | %attr(755,root,root) %{_libdir}/nvidia/libnvidia-cfg.so.*.* |
291 | %attr(755,root,root) %{_libdir}/nvidia/libnvidia-tls.so.*.* | |
ffec07c8 JR |
292 | %attr(755,root,root) %{_libdir}/xorg/modules/extensions/libglx.so.* |
293 | %ghost %{_libdir}/xorg/modules/extensions/libglx.so | |
294 | %else | |
eb6ba6c9 | 295 | %attr(755,root,root) %{_libdir}/libGL.so.*.* |
63c6d4b1 JB |
296 | %attr(755,root,root) %ghost %{_libdir}/libGL.so.1 |
297 | # symlink for binary apps which fail to conform Linux OpenGL ABI | |
298 | # (and dlopen libGL.so instead of libGL.so.1) | |
299 | %attr(755,root,root) %{_libdir}/libGL.so | |
28142503 PS |
300 | %attr(755,root,root) %{_libdir}/libGLcore.so.*.* |
301 | %attr(755,root,root) %{_libdir}/libXvMCNVIDIA.so.*.* | |
eb6ba6c9 | 302 | %attr(755,root,root) %{_libdir}/libXvMCNVIDIA_dynamic.so.1 |
032cc98f | 303 | %attr(755,root,root) %{_libdir}/libnvidia-cfg.so.*.* |
304 | %attr(755,root,root) %{_libdir}/libnvidia-tls.so.*.* | |
ffec07c8 JR |
305 | %attr(755,root,root) %{_libdir}/xorg/modules/extensions/libglx.so* |
306 | %endif | |
032cc98f | 307 | %attr(755,root,root) %{_libdir}/xorg/modules/libnvidia-wfb.so.*.* |
ebb24c73 | 308 | %attr(755,root,root) %{_libdir}/xorg/modules/wfb.so |
23ae74e1 | 309 | %attr(755,root,root) %{_libdir}/xorg/modules/drivers/nvidia_drv.so |
28142503 | 310 | |
28142503 PS |
311 | %files devel |
312 | %defattr(644,root,root,755) | |
313 | %attr(755,root,root) %{_libdir}/libXvMCNVIDIA.so | |
73eb73e1 | 314 | %dir %{_includedir}/GL |
63c6d4b1 JB |
315 | %{_includedir}/GL/gl.h |
316 | %{_includedir}/GL/glext.h | |
317 | %{_includedir}/GL/glx.h | |
318 | %{_includedir}/GL/glxext.h | |
ffec07c8 JR |
319 | %if %{with multigl} |
320 | %attr(755,root,root) %{_libdir}/libGL.so | |
321 | %endif | |
63c6d4b1 JB |
322 | |
323 | %files static | |
324 | %defattr(644,root,root,755) | |
28142503 PS |
325 | %{_libdir}/libXvMCNVIDIA.a |
326 | ||
d4a34ce2 | 327 | %files progs |
01766b04 | 328 | %defattr(644,root,root,755) |
329 | %attr(755,root,root) %{_bindir}/nvidia-settings | |
225cc701 | 330 | %attr(755,root,root) %{_bindir}/nvidia-xconfig |
7a2ced2a | 331 | %attr(755,root,root) %{_bindir}/nvidia-bug-report.sh |
2a45f872 | 332 | %attr(755,root,root) /etc/X11/xinit/xinitrc.d/*.sh |
225cc701 | 333 | %{_desktopdir}/nvidia-settings.desktop |
334 | %{_mandir}/man1/nvidia-* | |
335 | %{_pixmapsdir}/nvidia-settings.png | |
1820d34b | 336 | %endif |
63c6d4b1 JB |
337 | |
338 | %if %{with kernel} | |
339 | %files -n kernel%{_alt_kernel}-video-nvidia | |
340 | %defattr(644,root,root,755) | |
341 | /lib/modules/%{_kernel_ver}/misc/*.ko* | |
342 | %endif |