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