- 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
12917d55 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}
b744dff6 27Version: 173.14.12
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
b744dff6 32# Source0-md5: c099b6e15ef34187571403fb017d58a1
13d95184 33Source1: http://us.download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x86_64-%{version}-pkg2.run
b744dff6 34# Source1-md5: 220b8dbe64d976e0045ee875cfa33c03
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}
c29343e3 130Suggests: pkgconfig
c064a147 131Obsoletes: XFree86-driver-nvidia-progs
28142503
PS
132
133%description progs
134Tools for advanced control of nVidia graphic cards.
135
c311612f
JR
136%description progs -l pl.UTF-8
137Narzędzia do zarządzania kartami graficznymi nVidia.
28142503 138
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
c5bb5957 143Release: %{rel}@%{_kernel_ver_str}
28142503 144Group: Base/Kernel
28142503
PS
145Requires(post,postun): /sbin/depmod
146Requires: dev >= 2.7.7-10
d68f27fd 147%{?with_dist_kernel:%requires_releq_kernel}
ffdea5a6 148Requires: %{pname} = %{version}-%{rel}
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.
28142503 161
28142503
PS
162%prep
163cd %{_builddir}
a14b5013 164rm -rf NVIDIA-Linux-x86*-%{version}-pkg*
039c7221 165%ifarch %{ix86}
28142503 166/bin/sh %{SOURCE0} --extract-only
a14b5013 167%setup -qDT -n NVIDIA-Linux-x86-%{version}-pkg1
039c7221
PS
168%else
169/bin/sh %{SOURCE1} --extract-only
a14b5013 170%setup -qDT -n NVIDIA-Linux-x86_64-%{version}-pkg2
039c7221 171%endif
bcf69910 172%patch0 -p1
0029e8cc 173%patch1 -p1
eb6ba6c9 174echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> usr/src/nv/Makefile.kbuild
28142503
PS
175
176%build
2317af94 177%if %{with kernel}
19777214 178cd usr/src/nv
d4a34ce2 179ln -sf Makefile.kbuild Makefile
94ef5e53 180cat >> Makefile <<'EOF'
181
182$(obj)/nv-kernel.o: $(src)/nv-kernel.o.bin
183 cp $< $@
184EOF
185mv nv-kernel.o{,.bin}
12a94e85 186%build_kernel_modules -m nvidia
2317af94 187%endif
28142503
PS
188
189%install
190rm -rf $RPM_BUILD_ROOT
1820d34b
ER
191
192%if %{with userspace}
eb6ba6c9 193install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,extensions} \
225cc701 194 $RPM_BUILD_ROOT{%{_includedir}/GL,%{_libdir},%{_bindir},%{_mandir}/man1} \
2a45f872 195 $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/etc/X11/xinit/xinitrc.d}
ffec07c8
JR
196%if %{with multigl}
197install -d $RPM_BUILD_ROOT{%{_libdir}/nvidia,%{_sysconfdir}/ld.so.conf.d}
198%endif
28142503 199
7a2ced2a 200install usr/bin/nvidia-{settings,xconfig,bug-report.sh} $RPM_BUILD_ROOT%{_bindir}
225cc701 201install usr/share/man/man1/nvidia-{settings,xconfig}.* $RPM_BUILD_ROOT%{_mandir}/man1
202install usr/share/applications/nvidia-settings.desktop $RPM_BUILD_ROOT%{_desktopdir}
7a2ced2a 203install usr/share/pixmaps/nvidia-settings.png $RPM_BUILD_ROOT%{_pixmapsdir}
2a45f872 204install %{SOURCE2} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d/nvidia-settings.sh
eb6ba6c9
PS
205
206for f in \
207 usr/lib/tls/libnvidia-tls.so.%{version} \
069d2a12 208 usr/lib/libnvidia-cfg.so.%{version} \
eb6ba6c9
PS
209 usr/lib/libGL{,core}.so.%{version} \
210 usr/X11R6/lib/libXvMCNVIDIA.so.%{version} \
2b14e59b 211%if %{without multigl}
eb6ba6c9
PS
212 usr/X11R6/lib/libXvMCNVIDIA.a \
213; do
214 install $f $RPM_BUILD_ROOT%{_libdir}
215done
ffec07c8
JR
216%else
217; do
218 install $f $RPM_BUILD_ROOT%{_libdir}/nvidia
219done
220install usr/X11R6/lib/libXvMCNVIDIA.a $RPM_BUILD_ROOT%{_libdir}
221%endif
eb6ba6c9 222
d4a34ce2 223install usr/X11R6/lib/modules/extensions/libglx.so.%{version} \
eb6ba6c9 224 $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions
23ae74e1 225install usr/X11R6/lib/modules/drivers/nvidia_drv.so \
226 $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers
069d2a12 227install usr/X11R6/lib/modules/libnvidia-wfb.so.%{version} \
228 $RPM_BUILD_ROOT%{_libdir}/xorg/modules
28142503 229
eb6ba6c9 230install usr/include/GL/*.h $RPM_BUILD_ROOT%{_includedir}/GL
28142503 231
eb6ba6c9 232ln -sf libglx.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/libglx.so
ebb24c73 233ln -sf libnvidia-wfb.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/wfb.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.*.*
ebb24c73 318%attr(755,root,root) %{_libdir}/xorg/modules/wfb.so
23ae74e1 319%attr(755,root,root) %{_libdir}/xorg/modules/drivers/nvidia_drv.so
28142503 320
28142503
PS
321%files devel
322%defattr(644,root,root,755)
323%attr(755,root,root) %{_libdir}/libXvMCNVIDIA.so
73eb73e1 324%dir %{_includedir}/GL
63c6d4b1
JB
325%{_includedir}/GL/gl.h
326%{_includedir}/GL/glext.h
327%{_includedir}/GL/glx.h
328%{_includedir}/GL/glxext.h
ffec07c8
JR
329%if %{with multigl}
330%attr(755,root,root) %{_libdir}/libGL.so
331%endif
63c6d4b1
JB
332
333%files static
334%defattr(644,root,root,755)
28142503
PS
335%{_libdir}/libXvMCNVIDIA.a
336
d4a34ce2 337%files progs
01766b04 338%defattr(644,root,root,755)
339%attr(755,root,root) %{_bindir}/nvidia-settings
225cc701 340%attr(755,root,root) %{_bindir}/nvidia-xconfig
7a2ced2a 341%attr(755,root,root) %{_bindir}/nvidia-bug-report.sh
2a45f872 342%attr(755,root,root) /etc/X11/xinit/xinitrc.d/*.sh
225cc701 343%{_desktopdir}/nvidia-settings.desktop
344%{_mandir}/man1/nvidia-*
345%{_pixmapsdir}/nvidia-settings.png
1820d34b 346%endif
63c6d4b1
JB
347
348%if %{with kernel}
349%files -n kernel%{_alt_kernel}-video-nvidia
350%defattr(644,root,root,755)
351/lib/modules/%{_kernel_ver}/misc/*.ko*
352%endif
This page took 0.285279 seconds and 4 git commands to generate.