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