- release 5
[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
f7b0b12a 22%define rel 5
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}
13d95184 27Version: 173.14.09
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
32# Source0-md5: 02bc9536ad2800855c66684f4c981a74
33Source1: http://us.download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x86_64-%{version}-pkg2.run
34# Source1-md5: 5f174d4fa50d774df8667c1c063adfb2
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
56b60abf 47Requires: xorg-xserver-server(videodrv-abi) = 2.0
1b8b7646 48Provides: OpenGL = 2.1
63c6d4b1 49Provides: OpenGL-GLX = 1.4
60ec480a 50Provides: xorg-xserver-libglx
2b14e59b 51%if %{without multigl}
28142503 52Obsoletes: Mesa
ffec07c8 53%endif
fff74aa2
AM
54Obsoletes: X11-OpenGL-core < 1:7.0.0
55Obsoletes: X11-OpenGL-libGL < 1:7.0.0
56Obsoletes: XFree86-OpenGL-core < 1:7.0.0
57Obsoletes: XFree86-OpenGL-libGL < 1:7.0.0
2d490dca 58Obsoletes: XFree86-driver-nvidia
28142503 59Obsoletes: XFree86-nvidia
2b14e59b 60%if %{without multigl}
4a61f89d
PZ
61Conflicts: Mesa-libGL
62%endif
28142503 63Conflicts: XFree86-OpenGL-devel <= 4.2.0-3
1b927e61 64ExclusiveArch: %{ix86} %{x8664}
28142503
PS
65BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
66
03da6314 67%define _noautoreqdep libGL.so.1 libGLcore.so.1
28142503
PS
68
69%description
974295b8
JB
70This driver set adds improved 2D functionality to the Xorg X server as
71well as high performance OpenGL acceleration, AGP support, support for
72most flat panels, and 2D multiple monitor support. Supported hardware:
73modern NVIDIA GeForce (from GeForce2 MX) and Quadro (Quadro4 and up)
74based graphics accelerators.
28142503 75
974295b8
JB
76The older graphics chips are unsupported:
77- NV1 and RIVA 128/128ZX chips are supported in the base Xorg install
78 (nv driver)
79- TNT/TNT2/GeForce 256/GeForce2 Ultra/Quadro2 are suported by -legacy
80 drivers.
28142503 81
c311612f 82%description -l pl.UTF-8
974295b8
JB
83Usprawnione sterowniki dla kart graficznych nVidia do serwera Xorg,
84dające wysokowydajną akcelerację OpenGL, obsługę AGP i wielu monitorów
852D. Obsługują w miarę nowe karty NVIDIA GeForce (od wersji GeForce2
86MX) oraz Quadro (od wersji Quadro4).
28142503 87
974295b8
JB
88Starsze układy graficzne nie są obsługiwane przez ten pakiet:
89- NV1 i RIVA 128/128ZX są obsługiwane przez sterownik nv z Xorg
90- TNT/TNT2/GeForce 256/GeForce 2 Ultra/Quadro 2 są obsługiwane przez
91 sterowniki -legacy
28142503
PS
92
93%package devel
63c6d4b1
JB
94Summary: OpenGL (GL and GLX) header files
95Summary(pl.UTF-8): Pliki nagłówkowe OpenGL (GL i GLX)
28142503 96Group: X11/Development/Libraries
2d490dca 97Requires: %{name} = %{version}-%{release}
63c6d4b1 98Provides: OpenGL-GLX-devel = 1.4
1b8b7646 99Provides: OpenGL-devel = 2.1
63c6d4b1
JB
100Obsoletes: X11-OpenGL-devel-base
101Obsoletes: XFree86-OpenGL-devel-base
2d490dca 102Obsoletes: XFree86-driver-nvidia-devel
28142503
PS
103Conflicts: XFree86-OpenGL-devel < 4.3.99.902-0.3
104
105%description devel
63c6d4b1
JB
106OpenGL header files (GL and GLX only) for NVIDIA OpenGL
107implementation.
28142503 108
c311612f 109%description devel -l pl.UTF-8
63c6d4b1
JB
110Pliki nagłówkowe OpenGL (tylko GL i GLX) dla implementacji OpenGL
111firmy NVIDIA.
112
113%package static
114Summary: Static XvMCNVIDIA library
115Summary(pl.UTF-8): Statyczna biblioteka XvMCNVIDIA
116Group: X11/Development/Libraries
117Requires: %{name}-devel = %{version}-%{release}
118
119%description static
120Static XvMCNVIDIA library.
121
122%description static -l pl.UTF-8
123Statyczna biblioteka XvMCNVIDIA.
28142503
PS
124
125%package progs
126Summary: Tools for advanced control of nVidia graphic cards
b37addd9 127Summary(pl.UTF-8): Narzędzia do zarządzania kartami graficznymi nVidia
f12e8b24 128Group: Applications/System
2d490dca 129Requires: %{name} = %{version}-%{release}
0ed6aeef 130Obsoletes: XFree86-driver-nvidia-progs
28142503
PS
131
132%description progs
133Tools for advanced control of nVidia graphic cards.
134
c311612f
JR
135%description progs -l pl.UTF-8
136Narzędzia do zarządzania kartami graficznymi nVidia.
28142503 137
ccd3c14b 138%if %{with kernel}
00aee69a 139%package -n kernel%{_alt_kernel}-video-nvidia
28142503 140Summary: nVidia kernel module for nVidia Architecture support
b37addd9
ER
141Summary(de.UTF-8): Das nVidia-Kern-Modul für die nVidia-Architektur-Unterstützung
142Summary(pl.UTF-8): Moduł jądra dla obsługi kart graficznych nVidia
a14b5013 143Version: %{version}
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}
2d490dca 149Provides: X11-driver-nvidia(kernel)
28142503
PS
150Obsoletes: XFree86-nvidia-kernel
151
00aee69a 152%description -n kernel%{_alt_kernel}-video-nvidia
28142503
PS
153nVidia Architecture support for Linux kernel.
154
c311612f
JR
155%description -n kernel%{_alt_kernel}-video-nvidia -l de.UTF-8
156Die nVidia-Architektur-Unterstützung für den Linux-Kern.
28142503 157
c311612f
JR
158%description -n kernel%{_alt_kernel}-video-nvidia -l pl.UTF-8
159Obsługa architektury nVidia dla jądra Linuksa. Pakiet wymagany przez
0ed6aeef 160sterownik nVidii dla Xorg/XFree86.
ccd3c14b 161%endif
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}
28142503 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
ebb24c73 234ln -sf libnvidia-wfb.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/wfb.so
28142503 235
ffec07c8
JR
236%if %{with multigl}
237echo %{_libdir}/nvidia >$RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia.conf
238
239# OpenGL ABI for Linux compatibility
240ln -sf libGL.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libGL.so.1
241ln -sf nvidia/libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
242
243ln -sf nvidia/libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libXvMCNVIDIA.so
244ln -sf libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libXvMCNVIDIA_dynamic.so.1
245%else
28142503 246# OpenGL ABI for Linux compatibility
eb6ba6c9
PS
247ln -sf libGL.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libGL.so.1
248ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
ffec07c8
JR
249
250ln -sf libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libXvMCNVIDIA.so
251ln -sf libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libXvMCNVIDIA_dynamic.so.1
252%endif
1820d34b 253%endif
28142503 254
1fdf7dcc 255%if %{with kernel}
12a94e85 256%install_kernel_modules -m usr/src/nv/nvidia -d misc
1fdf7dcc 257%endif
28142503
PS
258
259%clean
260rm -rf $RPM_BUILD_ROOT
261
a641155e 262%post
ffbb3439 263/sbin/ldconfig
2b14e59b
ER
264cat << 'EOF'
265NOTE: You must also install kernel module for this driver to work
266 kernel-video-nvidia-%{version}
267 kernel-laptop-video-nvidia-%{version}
268 kernel-desktop-video-nvidia-%{version}
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
ccd3c14b 281%if %{with kernel}
00aee69a 282%post -n kernel%{_alt_kernel}-video-nvidia
28142503
PS
283%depmod %{_kernel_ver}
284
00aee69a 285%postun -n kernel%{_alt_kernel}-video-nvidia
28142503 286%depmod %{_kernel_ver}
ccd3c14b 287%endif
28142503 288
1820d34b 289%if %{with userspace}
28142503
PS
290%files
291%defattr(644,root,root,755)
292%doc LICENSE
225cc701 293%doc usr/share/doc/{README.txt,NVIDIA_Changelog,XF86Config.sample,html}
ffec07c8
JR
294%if %{with multigl}
295%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ld.so.conf.d/nvidia.conf
296%dir %{_libdir}/nvidia
297%attr(755,root,root) %{_libdir}/nvidia/libGL.so.*.*
298%attr(755,root,root) %ghost %{_libdir}/nvidia/libGL.so.1
299%attr(755,root,root) %{_libdir}/nvidia/libGLcore.so.*.*
300%attr(755,root,root) %{_libdir}/nvidia/libXvMCNVIDIA.so.*.*
301%attr(755,root,root) %{_libdir}/nvidia/libXvMCNVIDIA_dynamic.so.1
c75f043c 302%attr(755,root,root) %{_libdir}/nvidia/libnvidia-cfg.so.*.*
303%attr(755,root,root) %{_libdir}/nvidia/libnvidia-tls.so.*.*
ffec07c8
JR
304%attr(755,root,root) %{_libdir}/xorg/modules/extensions/libglx.so.*
305%ghost %{_libdir}/xorg/modules/extensions/libglx.so
306%else
eb6ba6c9 307%attr(755,root,root) %{_libdir}/libGL.so.*.*
63c6d4b1
JB
308%attr(755,root,root) %ghost %{_libdir}/libGL.so.1
309# symlink for binary apps which fail to conform Linux OpenGL ABI
310# (and dlopen libGL.so instead of libGL.so.1)
311%attr(755,root,root) %{_libdir}/libGL.so
28142503
PS
312%attr(755,root,root) %{_libdir}/libGLcore.so.*.*
313%attr(755,root,root) %{_libdir}/libXvMCNVIDIA.so.*.*
eb6ba6c9 314%attr(755,root,root) %{_libdir}/libXvMCNVIDIA_dynamic.so.1
032cc98f 315%attr(755,root,root) %{_libdir}/libnvidia-cfg.so.*.*
316%attr(755,root,root) %{_libdir}/libnvidia-tls.so.*.*
ffec07c8
JR
317%attr(755,root,root) %{_libdir}/xorg/modules/extensions/libglx.so*
318%endif
032cc98f 319%attr(755,root,root) %{_libdir}/xorg/modules/libnvidia-wfb.so.*.*
ebb24c73 320%attr(755,root,root) %{_libdir}/xorg/modules/wfb.so
23ae74e1 321%attr(755,root,root) %{_libdir}/xorg/modules/drivers/nvidia_drv.so
28142503 322
28142503
PS
323%files devel
324%defattr(644,root,root,755)
325%attr(755,root,root) %{_libdir}/libXvMCNVIDIA.so
73eb73e1 326%dir %{_includedir}/GL
63c6d4b1
JB
327%{_includedir}/GL/gl.h
328%{_includedir}/GL/glext.h
329%{_includedir}/GL/glx.h
330%{_includedir}/GL/glxext.h
ffec07c8
JR
331%if %{with multigl}
332%attr(755,root,root) %{_libdir}/libGL.so
333%endif
63c6d4b1
JB
334
335%files static
336%defattr(644,root,root,755)
28142503
PS
337%{_libdir}/libXvMCNVIDIA.a
338
d4a34ce2 339%files progs
01766b04 340%defattr(644,root,root,755)
341%attr(755,root,root) %{_bindir}/nvidia-settings
225cc701 342%attr(755,root,root) %{_bindir}/nvidia-xconfig
7a2ced2a 343%attr(755,root,root) %{_bindir}/nvidia-bug-report.sh
2a45f872 344%attr(755,root,root) /etc/X11/xinit/xinitrc.d/*.sh
225cc701 345%{_desktopdir}/nvidia-settings.desktop
346%{_mandir}/man1/nvidia-*
347%{_pixmapsdir}/nvidia-settings.png
1820d34b 348%endif
63c6d4b1
JB
349
350%if %{with kernel}
351%files -n kernel%{_alt_kernel}-video-nvidia
352%defattr(644,root,root,755)
353/lib/modules/%{_kernel_ver}/misc/*.ko*
354%endif
This page took 0.355838 seconds and 4 git commands to generate.