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