- converted to UTF-8
[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
16020600 4%bcond_without up # without up packages
28142503 5%bcond_without smp # without smp packages
bf683e7a 6%bcond_without kernel # without kernel packages
22d6cc34 7%bcond_without incall # include all tarballs
1820d34b 8%bcond_without userspace # don't build userspace programs
28142503 9%bcond_with verbose # verbose build (V=1)
28142503 10#
225cc701 11%define no_install_post_strip 1
12#
28142503 13%define _nv_ver 1.0
069d2a12 14%define _nv_rel 9746
85d12cdd 15%define _min_x11 6.7.0
069d2a12 16%define _rel 1
28142503 17#
22d6cc34 18%define need_x86 0
19%define need_x8664 0
20%if %{with incall}
21%define need_x86 1
22%define need_x8664 1
23%else
24%ifarch %{ix86}
25%define need_x86 1
26%endif
27%ifarch %{x8664}
28%define need_x8664 1
29%endif
30%endif
31#
28142503 32Summary: Linux Drivers for nVidia TNT/TNT2/GeForce/Quadro Chips
c311612f 33Summary(pl.UTF-8): Sterowniki do kart graficznych nVidia TNT/TNT2/GeForce/Quadro
eb6ba6c9 34Name: xorg-driver-video-nvidia
28142503 35Version: %{_nv_ver}.%{_nv_rel}
28142503
PS
36Release: %{_rel}
37License: nVidia Binary
4a185d32 38Group: X11
22d6cc34 39%if %{need_x86}
069d2a12 40Source0: http://us.download.nvidia.com/XFree86/Linux-x86/%{_nv_ver}-%{_nv_rel}/NVIDIA-Linux-x86-%{_nv_ver}-%{_nv_rel}-pkg1.run
41# Source0-md5: cf0cdbd9099a6df028de429044e7f4da
22d6cc34 42%endif
43%if %{need_x8664}
510dffed 44Source1: http://us.download.nvidia.com/XFree86/Linux-x86_64/%{_nv_ver}-%{_nv_rel}/NVIDIA-Linux-x86_64-%{_nv_ver}-%{_nv_rel}-pkg2.run
069d2a12 45# Source1-md5: c0afc66e1c21a9a54ba6719b8edd3166
22d6cc34 46%endif
8550b6ec 47Source2: %{name}-xinitrc.sh
bcf69910
JB
48Patch0: X11-driver-nvidia-GL.patch
49Patch1: X11-driver-nvidia-desktop.patch
28142503 50URL: http://www.nvidia.com/object/linux.html
82268c76 51%if %{with kernel}
00aee69a 52%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.7}
82268c76 53%endif
28142503 54BuildRequires: %{kgcc_package}
6d259251 55BuildRequires: rpmbuild(macros) >= 1.330
039c7221 56BuildRequires: sed >= 4.0
0ed6aeef 57BuildConflicts: XFree86-nvidia
8343d24d 58Requires: xorg-xserver-server
368e84d9
ER
59Provides: OpenGL = 1.5
60Provides: OpenGL-GLX
624bfcce 61Provides: xorg-xserver-modules-libglx
28142503 62Obsoletes: Mesa
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
0ed6aeef 76This driver set adds improved 2D functionality to the Xorg/XFree86 X
28142503
PS
77server as well as high performance OpenGL acceleration, AGP support,
78support for most flat panels, and 2D multiple monitor support.
79
80Hardware: nVidia TNT, TNT2, GeForce, or Quadro based graphics
81accelerator. The nVidia NV1 and RIVA 128/128ZX chips are supported in
0ed6aeef
JB
82the base Xorg/XFree86 install and are not supported by this driver
83set.
28142503 84
c311612f 85%description -l pl.UTF-8
0ed6aeef 86Usprawnione sterowniki dla kart graficznych nVidia do serwera
c311612f
JR
87Xorg/XFree86, dające wysokowydajną akcelerację OpenGL, obsługę AGP i
88wielu monitorów 2D.
28142503 89
c311612f
JR
90Obsługują karty nVidia TNT/TNT2/GeForce/Quadro do serwera
91Xorg/XFree86; Karty nVidia NV1 i Riva 128/128ZX są obsługiwane przez
92sterownik nv z pakietów Xorg/XFree8 - NIE są obsługiwane przez ten
0ed6aeef 93pakiet.
28142503
PS
94
95%package devel
96Summary: OpenGL for X11R6 development (only gl?.h)
c311612f 97Summary(pl.UTF-8): Pliki nagłówkowe OpenGL dla systemu X11R6 (tylko gl?.h)
28142503 98Group: X11/Development/Libraries
2d490dca 99Requires: %{name} = %{version}-%{release}
624bfcce 100Provides: OpenGL-GLX-devel
368e84d9
ER
101Provides: OpenGL-devel = 1.5
102Provides: OpenGL-devel-base
28142503 103Obsoletes: OpenGL-devel-base
2d490dca 104Obsoletes: XFree86-driver-nvidia-devel
28142503
PS
105Conflicts: XFree86-OpenGL-devel < 4.3.99.902-0.3
106
107%description devel
108Base headers (only gl?.h) for OpenGL for X11R6 for nvidia drivers.
109
c311612f
JR
110%description devel -l pl.UTF-8
111Podstawowe pliki nagłówkowe (tylko gl?.h) OpenGL dla systemu X11R6 dla
112sterowników nvidii.
28142503
PS
113
114%package progs
115Summary: Tools for advanced control of nVidia graphic cards
c311612f 116Summary(pl.UTF-8): Narzędzia do zarządzania kartami graficznymi nVidia
f12e8b24 117Group: Applications/System
2d490dca 118Requires: %{name} = %{version}-%{release}
0ed6aeef 119Obsoletes: XFree86-driver-nvidia-progs
28142503
PS
120
121%description progs
122Tools for advanced control of nVidia graphic cards.
123
c311612f
JR
124%description progs -l pl.UTF-8
125Narzędzia do zarządzania kartami graficznymi nVidia.
28142503 126
00aee69a 127%package -n kernel%{_alt_kernel}-video-nvidia
28142503 128Summary: nVidia kernel module for nVidia Architecture support
c311612f
JR
129Summary(de.UTF-8): Das nVidia-Kern-Modul für die nVidia-Architektur-Unterstützung
130Summary(pl.UTF-8): Moduł jądra dla obsługi kart graficznych nVidia
28142503
PS
131Version: %{_nv_ver}.%{_nv_rel}
132Release: %{_rel}@%{_kernel_ver_str}
133Group: Base/Kernel
28142503
PS
134Requires(post,postun): /sbin/depmod
135Requires: dev >= 2.7.7-10
136%{?with_dist_kernel:%requires_releq_kernel_up}
2d490dca 137Provides: X11-driver-nvidia(kernel)
28142503
PS
138Obsoletes: XFree86-nvidia-kernel
139
00aee69a 140%description -n kernel%{_alt_kernel}-video-nvidia
28142503
PS
141nVidia Architecture support for Linux kernel.
142
c311612f
JR
143%description -n kernel%{_alt_kernel}-video-nvidia -l de.UTF-8
144Die nVidia-Architektur-Unterstützung für den Linux-Kern.
28142503 145
c311612f
JR
146%description -n kernel%{_alt_kernel}-video-nvidia -l pl.UTF-8
147Obsługa architektury nVidia dla jądra Linuksa. Pakiet wymagany przez
0ed6aeef 148sterownik nVidii dla Xorg/XFree86.
28142503 149
00aee69a 150%package -n kernel%{_alt_kernel}-smp-video-nvidia
28142503 151Summary: nVidia kernel module for nVidia Architecture support
c311612f
JR
152Summary(de.UTF-8): Das nVidia-Kern-Modul für die nVidia-Architektur-Unterstützung
153Summary(pl.UTF-8): Moduł jądra dla obsługi kart graficznych nVidia
28142503
PS
154Release: %{_rel}@%{_kernel_ver_str}
155Group: Base/Kernel
28142503
PS
156Requires(post,postun): /sbin/depmod
157Requires: dev >= 2.7.7-10
158%{?with_dist_kernel:%requires_releq_kernel_smp}
2d490dca 159Provides: X11-driver-nvidia(kernel)
28142503
PS
160Obsoletes: XFree86-nvidia-kernel
161
00aee69a 162%description -n kernel%{_alt_kernel}-smp-video-nvidia
28142503
PS
163nVidia Architecture support for Linux kernel SMP.
164
c311612f
JR
165%description -n kernel%{_alt_kernel}-smp-video-nvidia -l de.UTF-8
166Die nVidia-Architektur-Unterstützung für den Linux-Kern SMP.
28142503 167
c311612f
JR
168%description -n kernel%{_alt_kernel}-smp-video-nvidia -l pl.UTF-8
169Obsługa architektury nVidia dla jądra Linuksa SMP. Pakiet wymagany
0ed6aeef 170przez sterownik nVidii dla Xorg/XFree86.
28142503
PS
171
172%prep
173cd %{_builddir}
039c7221
PS
174rm -rf NVIDIA-Linux-x86*-%{_nv_ver}-%{_nv_rel}-pkg*
175%ifarch %{ix86}
28142503 176/bin/sh %{SOURCE0} --extract-only
069d2a12 177%setup -qDT -n NVIDIA-Linux-x86-%{_nv_ver}-%{_nv_rel}-pkg1
039c7221
PS
178%else
179/bin/sh %{SOURCE1} --extract-only
bcf69910 180%setup -qDT -n NVIDIA-Linux-x86_64-%{_nv_ver}-%{_nv_rel}-pkg2
039c7221 181%endif
bcf69910 182%patch0 -p1
0029e8cc 183%patch1 -p1
eb6ba6c9 184echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> usr/src/nv/Makefile.kbuild
28142503
PS
185
186%build
2317af94 187%if %{with kernel}
28142503 188cd usr/src/nv/
d4a34ce2 189ln -sf Makefile.kbuild Makefile
94ef5e53 190cat >> Makefile <<'EOF'
191
192$(obj)/nv-kernel.o: $(src)/nv-kernel.o.bin
193 cp $< $@
194EOF
195mv nv-kernel.o{,.bin}
12a94e85 196%build_kernel_modules -m nvidia
2317af94 197%endif
28142503
PS
198
199%install
200rm -rf $RPM_BUILD_ROOT
1820d34b
ER
201
202%if %{with userspace}
eb6ba6c9 203install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,extensions} \
225cc701 204 $RPM_BUILD_ROOT{%{_includedir}/GL,%{_libdir},%{_bindir},%{_mandir}/man1} \
2a45f872 205 $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/etc/X11/xinit/xinitrc.d}
28142503 206
7a2ced2a 207install usr/bin/nvidia-{settings,xconfig,bug-report.sh} $RPM_BUILD_ROOT%{_bindir}
225cc701 208install usr/share/man/man1/nvidia-{settings,xconfig}.* $RPM_BUILD_ROOT%{_mandir}/man1
209install usr/share/applications/nvidia-settings.desktop $RPM_BUILD_ROOT%{_desktopdir}
7a2ced2a 210install usr/share/pixmaps/nvidia-settings.png $RPM_BUILD_ROOT%{_pixmapsdir}
2a45f872 211install %{SOURCE2} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d/nvidia-settings.sh
eb6ba6c9
PS
212
213for f in \
214 usr/lib/tls/libnvidia-tls.so.%{version} \
069d2a12 215 usr/lib/libnvidia-cfg.so.%{version} \
eb6ba6c9
PS
216 usr/lib/libGL{,core}.so.%{version} \
217 usr/X11R6/lib/libXvMCNVIDIA.so.%{version} \
218 usr/X11R6/lib/libXvMCNVIDIA.a \
219; do
220 install $f $RPM_BUILD_ROOT%{_libdir}
221done
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
28142503 233ln -sf libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libXvMCNVIDIA.so
eb6ba6c9 234ln -sf libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libXvMCNVIDIA_dynamic.so.1
ebb24c73 235ln -sf libnvidia-wfb.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/wfb.so
28142503
PS
236
237# OpenGL ABI for Linux compatibility
eb6ba6c9
PS
238ln -sf libGL.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libGL.so.1
239ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
1820d34b 240%endif
28142503 241
1fdf7dcc 242%if %{with kernel}
12a94e85 243%install_kernel_modules -m usr/src/nv/nvidia -d misc
1fdf7dcc 244%endif
28142503
PS
245
246%clean
247rm -rf $RPM_BUILD_ROOT
248
a641155e 249%post
ffbb3439 250/sbin/ldconfig
25b520ff 251cat << EOF
252
253 *******************************************************
254 * *
255 * NOTE: *
256 * You must install: *
a641155e
TP
257 * kernel(24)(-smp)-video-nvidia-%{version} *
258 * for this driver to work *
f46b4781 259 * *
25b520ff 260 *******************************************************
261
262EOF
263
ffbb3439 264%postun -p /sbin/ldconfig
25b520ff 265
00aee69a 266%post -n kernel%{_alt_kernel}-video-nvidia
28142503
PS
267%depmod %{_kernel_ver}
268
00aee69a 269%postun -n kernel%{_alt_kernel}-video-nvidia
28142503
PS
270%depmod %{_kernel_ver}
271
00aee69a 272%post -n kernel%{_alt_kernel}-smp-video-nvidia
28142503
PS
273%depmod %{_kernel_ver}smp
274
00aee69a 275%postun -n kernel%{_alt_kernel}-smp-video-nvidia
28142503
PS
276%depmod %{_kernel_ver}smp
277
1820d34b 278%if %{with userspace}
28142503
PS
279%files
280%defattr(644,root,root,755)
281%doc LICENSE
225cc701 282%doc usr/share/doc/{README.txt,NVIDIA_Changelog,XF86Config.sample,html}
eb6ba6c9 283# OpenGL ABI for Linux compatibility
28142503 284%attr(755,root,root) %{_libdir}/libGL.so
eb6ba6c9
PS
285%attr(755,root,root) %{_libdir}/libGL.so.1
286#
287%attr(755,root,root) %{_libdir}/libGL.so.*.*
28142503
PS
288%attr(755,root,root) %{_libdir}/libGLcore.so.*.*
289%attr(755,root,root) %{_libdir}/libXvMCNVIDIA.so.*.*
eb6ba6c9 290%attr(755,root,root) %{_libdir}/libXvMCNVIDIA_dynamic.so.1
069d2a12 291%attr(755,root,root) %{_libdir}/libnvidia-cfg.so.*.*.*
eb6ba6c9 292%attr(755,root,root) %{_libdir}/libnvidia-tls.so.*.*.*
069d2a12 293%attr(755,root,root) %{_libdir}/xorg/modules/libnvidia-wfb.so.*.*.*
ebb24c73 294%attr(755,root,root) %{_libdir}/xorg/modules/wfb.so
23ae74e1 295%attr(755,root,root) %{_libdir}/xorg/modules/drivers/nvidia_drv.so
069d2a12 296%attr(755,root,root) %{_libdir}/xorg/modules/extensions/libglx.so*
1820d34b 297%endif
28142503 298
bf683e7a 299%if %{with kernel}
65876230 300%if %{with up} || %{without dist_kernel}
00aee69a 301%files -n kernel%{_alt_kernel}-video-nvidia
28142503
PS
302%defattr(644,root,root,755)
303/lib/modules/%{_kernel_ver}/misc/*.ko*
65876230 304%endif
28142503
PS
305
306%if %{with smp} && %{with dist_kernel}
00aee69a 307%files -n kernel%{_alt_kernel}-smp-video-nvidia
28142503
PS
308%defattr(644,root,root,755)
309/lib/modules/%{_kernel_ver}smp/misc/*.ko*
310%endif
bf683e7a 311%endif
28142503 312
1820d34b 313%if %{with userspace}
28142503
PS
314%files devel
315%defattr(644,root,root,755)
316%attr(755,root,root) %{_libdir}/libXvMCNVIDIA.so
0c248c5a 317%{_includedir}/GL/*.h
28142503
PS
318# -static
319%{_libdir}/libXvMCNVIDIA.a
320
d4a34ce2 321%files progs
01766b04 322%defattr(644,root,root,755)
323%attr(755,root,root) %{_bindir}/nvidia-settings
225cc701 324%attr(755,root,root) %{_bindir}/nvidia-xconfig
7a2ced2a 325%attr(755,root,root) %{_bindir}/nvidia-bug-report.sh
2a45f872 326%attr(755,root,root) /etc/X11/xinit/xinitrc.d/*.sh
225cc701 327%{_desktopdir}/nvidia-settings.desktop
328%{_mandir}/man1/nvidia-*
329%{_pixmapsdir}/nvidia-settings.png
1820d34b 330%endif
This page took 0.256672 seconds and 4 git commands to generate.