- updated to 180.22 (includes optimization for KDE4)
[packages/xorg-driver-video-nvidia.git] / xorg-driver-video-nvidia.spec
CommitLineData
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
9be432a2 22%define rel 1
a14b5013 23
974295b8
JB
24Summary: Linux Drivers for nVidia GeForce/Quadro Chips
25Summary(pl.UTF-8): Sterowniki do kart graficznych nVidia GeForce/Quadro
a14b5013 26Name: %{pname}%{_alt_kernel}
9be432a2 27Version: 180.22
c5bb5957 28Release: %{rel}%{?with_multigl:.mgl}
28142503 29License: nVidia Binary
4a185d32 30Group: X11
13d95184 31Source0: http://us.download.nvidia.com/XFree86/Linux-x86/%{version}/NVIDIA-Linux-x86-%{version}-pkg1.run
9be432a2 32# Source0-md5: bf6c44f82123a315244e04a5aede11ab
13d95184 33Source1: http://us.download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x86_64-%{version}-pkg2.run
9be432a2 34# Source1-md5: 6839441e92c2605327073d586c3077d9
a14b5013 35Source2: %{pname}-xinitrc.sh
bcf69910
JB
36Patch0: X11-driver-nvidia-GL.patch
37Patch1: X11-driver-nvidia-desktop.patch
f517f625 38URL: 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 42BuildRequires: %{kgcc_package}
d68f27fd 43BuildRequires: rpmbuild(macros) >= 1.379
039c7221 44BuildRequires: sed >= 4.0
0ed6aeef 45BuildConflicts: XFree86-nvidia
8343d24d 46Requires: xorg-xserver-server
53f1c2ec
PZ
47Requires: xorg-xserver-server(videodrv-abi) >= 2.0
48Requires: xorg-xserver-server(videodrv-abi) <= 4.1
1b8b7646 49Provides: OpenGL = 2.1
63c6d4b1 50Provides: OpenGL-GLX = 1.4
4e3e8de1 51Provides: xorg-xserver-module(glx)
2b14e59b 52%if %{without multigl}
28142503 53Obsoletes: Mesa
ffec07c8 54%endif
fff74aa2
AM
55Obsoletes: X11-OpenGL-core < 1:7.0.0
56Obsoletes: X11-OpenGL-libGL < 1:7.0.0
57Obsoletes: XFree86-OpenGL-core < 1:7.0.0
58Obsoletes: XFree86-OpenGL-libGL < 1:7.0.0
2d490dca 59Obsoletes: XFree86-driver-nvidia
28142503 60Obsoletes: XFree86-nvidia
2b14e59b 61%if %{without multigl}
4a61f89d
PZ
62Conflicts: Mesa-libGL
63%endif
28142503 64Conflicts: XFree86-OpenGL-devel <= 4.2.0-3
1b927e61 65ExclusiveArch: %{ix86} %{x8664}
28142503
PS
66BuildRoot: %{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
71This driver set adds improved 2D functionality to the Xorg X server as
72well as high performance OpenGL acceleration, AGP support, support for
73most flat panels, and 2D multiple monitor support. Supported hardware:
74modern NVIDIA GeForce (from GeForce2 MX) and Quadro (Quadro4 and up)
75based graphics accelerators.
28142503 76
974295b8
JB
77The 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
84Usprawnione sterowniki dla kart graficznych nVidia do serwera Xorg,
85dające wysokowydajną akcelerację OpenGL, obsługę AGP i wielu monitorów
862D. Obsługują w miarę nowe karty NVIDIA GeForce (od wersji GeForce2
87MX) oraz Quadro (od wersji Quadro4).
28142503 88
974295b8
JB
89Starsze 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
95Summary: OpenGL (GL and GLX) header files
96Summary(pl.UTF-8): Pliki nagłówkowe OpenGL (GL i GLX)
28142503 97Group: X11/Development/Libraries
2d490dca 98Requires: %{name} = %{version}-%{release}
63c6d4b1 99Provides: OpenGL-GLX-devel = 1.4
1b8b7646 100Provides: OpenGL-devel = 2.1
63c6d4b1
JB
101Obsoletes: X11-OpenGL-devel-base
102Obsoletes: XFree86-OpenGL-devel-base
2d490dca 103Obsoletes: XFree86-driver-nvidia-devel
28142503
PS
104Conflicts: XFree86-OpenGL-devel < 4.3.99.902-0.3
105
106%description devel
63c6d4b1
JB
107OpenGL header files (GL and GLX only) for NVIDIA OpenGL
108implementation.
28142503 109
c311612f 110%description devel -l pl.UTF-8
63c6d4b1
JB
111Pliki nagłówkowe OpenGL (tylko GL i GLX) dla implementacji OpenGL
112firmy NVIDIA.
113
114%package static
115Summary: Static XvMCNVIDIA library
116Summary(pl.UTF-8): Statyczna biblioteka XvMCNVIDIA
117Group: X11/Development/Libraries
118Requires: %{name}-devel = %{version}-%{release}
119
120%description static
121Static XvMCNVIDIA library.
122
123%description static -l pl.UTF-8
124Statyczna biblioteka XvMCNVIDIA.
28142503
PS
125
126%package progs
127Summary: Tools for advanced control of nVidia graphic cards
b37addd9 128Summary(pl.UTF-8): Narzędzia do zarządzania kartami graficznymi nVidia
f12e8b24 129Group: Applications/System
2d490dca 130Requires: %{name} = %{version}-%{release}
c29343e3 131Suggests: pkgconfig
c064a147 132Obsoletes: XFree86-driver-nvidia-progs
28142503
PS
133
134%description progs
135Tools for advanced control of nVidia graphic cards.
136
c311612f
JR
137%description progs -l pl.UTF-8
138Narzędzia do zarządzania kartami graficznymi nVidia.
28142503 139
00aee69a 140%package -n kernel%{_alt_kernel}-video-nvidia
28142503 141Summary: nVidia kernel module for nVidia Architecture support
b37addd9
ER
142Summary(de.UTF-8): Das nVidia-Kern-Modul für die nVidia-Architektur-Unterstützung
143Summary(pl.UTF-8): Moduł jądra dla obsługi kart graficznych nVidia
c5bb5957 144Release: %{rel}@%{_kernel_ver_str}
28142503 145Group: Base/Kernel
28142503
PS
146Requires(post,postun): /sbin/depmod
147Requires: dev >= 2.7.7-10
d68f27fd 148%{?with_dist_kernel:%requires_releq_kernel}
ffdea5a6 149Requires: %{pname} = %{version}-%{rel}
2d490dca 150Provides: X11-driver-nvidia(kernel)
28142503
PS
151Obsoletes: XFree86-nvidia-kernel
152
00aee69a 153%description -n kernel%{_alt_kernel}-video-nvidia
28142503
PS
154nVidia Architecture support for Linux kernel.
155
c311612f
JR
156%description -n kernel%{_alt_kernel}-video-nvidia -l de.UTF-8
157Die 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
160Obsługa architektury nVidia dla jądra Linuksa. Pakiet wymagany przez
0ed6aeef 161sterownik nVidii dla Xorg/XFree86.
28142503 162
28142503
PS
163%prep
164cd %{_builddir}
a14b5013 165rm -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 175echo '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 179cd usr/src/nv
d4a34ce2 180ln -sf Makefile.kbuild Makefile
94ef5e53 181cat >> Makefile <<'EOF'
182
183$(obj)/nv-kernel.o: $(src)/nv-kernel.o.bin
184 cp $< $@
185EOF
186mv nv-kernel.o{,.bin}
12a94e85 187%build_kernel_modules -m nvidia
2317af94 188%endif
28142503
PS
189
190%install
191rm -rf $RPM_BUILD_ROOT
1820d34b
ER
192
193%if %{with userspace}
eb6ba6c9 194install -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}
198install -d $RPM_BUILD_ROOT{%{_libdir}/nvidia,%{_sysconfdir}/ld.so.conf.d}
199%endif
28142503 200
7a2ced2a 201install usr/bin/nvidia-{settings,xconfig,bug-report.sh} $RPM_BUILD_ROOT%{_bindir}
225cc701 202install usr/share/man/man1/nvidia-{settings,xconfig}.* $RPM_BUILD_ROOT%{_mandir}/man1
203install usr/share/applications/nvidia-settings.desktop $RPM_BUILD_ROOT%{_desktopdir}
7a2ced2a 204install usr/share/pixmaps/nvidia-settings.png $RPM_BUILD_ROOT%{_pixmapsdir}
2a45f872 205install %{SOURCE2} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d/nvidia-settings.sh
eb6ba6c9
PS
206
207for 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}
216done
ffec07c8
JR
217%else
218; do
219 install $f $RPM_BUILD_ROOT%{_libdir}/nvidia
220done
221install usr/X11R6/lib/libXvMCNVIDIA.a $RPM_BUILD_ROOT%{_libdir}
222%endif
eb6ba6c9 223
d4a34ce2 224install usr/X11R6/lib/modules/extensions/libglx.so.%{version} \
eb6ba6c9 225 $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions
23ae74e1 226install usr/X11R6/lib/modules/drivers/nvidia_drv.so \
227 $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers
069d2a12 228install usr/X11R6/lib/modules/libnvidia-wfb.so.%{version} \
229 $RPM_BUILD_ROOT%{_libdir}/xorg/modules
28142503 230
eb6ba6c9 231install usr/include/GL/*.h $RPM_BUILD_ROOT%{_includedir}/GL
28142503 232
eb6ba6c9 233ln -sf libglx.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/libglx.so
28142503 234
ffec07c8
JR
235%if %{with multigl}
236echo %{_libdir}/nvidia >$RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia.conf
237
238# OpenGL ABI for Linux compatibility
239ln -sf libGL.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libGL.so.1
240ln -sf nvidia/libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
241
242ln -sf nvidia/libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libXvMCNVIDIA.so
243ln -sf libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libXvMCNVIDIA_dynamic.so.1
244%else
28142503 245# OpenGL ABI for Linux compatibility
eb6ba6c9
PS
246ln -sf libGL.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libGL.so.1
247ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
ffec07c8
JR
248
249ln -sf libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libXvMCNVIDIA.so
250ln -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
259rm -rf $RPM_BUILD_ROOT
260
a641155e 261%post
ffbb3439 262/sbin/ldconfig
2b14e59b
ER
263cat << 'EOF'
264NOTE: 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
270Depending on which kernel brand you use.
271
25b520ff 272EOF
504709c0
JR
273%if %{with multigl}
274if [ ! -e %{_libdir}/xorg/modules/extensions/libglx.so ]; then
275 ln -sf libglx.so.%{version} %{_libdir}/xorg/modules/extensions/libglx.so
276fi
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
This page took 0.141911 seconds and 4 git commands to generate.