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