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