- fix libglx provides
[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
b37addd9 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
60ec480a 61Provides: xorg-xserver-libglx
28142503 62Obsoletes: Mesa
9333041e 63Obsoletes: Mesa-libGL
fff74aa2
AM
64Obsoletes: X11-OpenGL-core < 1:7.0.0
65Obsoletes: X11-OpenGL-libGL < 1:7.0.0
66Obsoletes: XFree86-OpenGL-core < 1:7.0.0
67Obsoletes: XFree86-OpenGL-libGL < 1:7.0.0
2d490dca 68Obsoletes: XFree86-driver-nvidia
28142503
PS
69Obsoletes: XFree86-nvidia
70Conflicts: XFree86-OpenGL-devel <= 4.2.0-3
1b927e61 71ExclusiveArch: %{ix86} %{x8664}
28142503
PS
72BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
73
03da6314 74%define _noautoreqdep libGL.so.1 libGLcore.so.1
28142503
PS
75
76%description
0ed6aeef 77This driver set adds improved 2D functionality to the Xorg/XFree86 X
28142503
PS
78server as well as high performance OpenGL acceleration, AGP support,
79support for most flat panels, and 2D multiple monitor support.
80
81Hardware: nVidia TNT, TNT2, GeForce, or Quadro based graphics
82accelerator. The nVidia NV1 and RIVA 128/128ZX chips are supported in
0ed6aeef
JB
83the base Xorg/XFree86 install and are not supported by this driver
84set.
28142503 85
c311612f 86%description -l pl.UTF-8
0ed6aeef 87Usprawnione sterowniki dla kart graficznych nVidia do serwera
c311612f
JR
88Xorg/XFree86, dające wysokowydajną akcelerację OpenGL, obsługę AGP i
89wielu monitorów 2D.
28142503 90
c311612f
JR
91Obsługują karty nVidia TNT/TNT2/GeForce/Quadro do serwera
92Xorg/XFree86; Karty nVidia NV1 i Riva 128/128ZX są obsługiwane przez
93sterownik nv z pakietów Xorg/XFree8 - NIE są obsługiwane przez ten
0ed6aeef 94pakiet.
28142503
PS
95
96%package devel
97Summary: OpenGL for X11R6 development (only gl?.h)
b37addd9 98Summary(pl.UTF-8): Pliki nagłówkowe OpenGL dla systemu X11R6 (tylko gl?.h)
28142503 99Group: X11/Development/Libraries
2d490dca 100Requires: %{name} = %{version}-%{release}
624bfcce 101Provides: OpenGL-GLX-devel
368e84d9
ER
102Provides: OpenGL-devel = 1.5
103Provides: OpenGL-devel-base
28142503 104Obsoletes: OpenGL-devel-base
2d490dca 105Obsoletes: XFree86-driver-nvidia-devel
28142503
PS
106Conflicts: XFree86-OpenGL-devel < 4.3.99.902-0.3
107
108%description devel
109Base headers (only gl?.h) for OpenGL for X11R6 for nvidia drivers.
110
c311612f
JR
111%description devel -l pl.UTF-8
112Podstawowe pliki nagłówkowe (tylko gl?.h) OpenGL dla systemu X11R6 dla
113sterowników nvidii.
28142503
PS
114
115%package progs
116Summary: Tools for advanced control of nVidia graphic cards
b37addd9 117Summary(pl.UTF-8): Narzędzia do zarządzania kartami graficznymi nVidia
f12e8b24 118Group: Applications/System
2d490dca 119Requires: %{name} = %{version}-%{release}
0ed6aeef 120Obsoletes: XFree86-driver-nvidia-progs
28142503
PS
121
122%description progs
123Tools for advanced control of nVidia graphic cards.
124
c311612f
JR
125%description progs -l pl.UTF-8
126Narzędzia do zarządzania kartami graficznymi nVidia.
28142503 127
00aee69a 128%package -n kernel%{_alt_kernel}-video-nvidia
28142503 129Summary: nVidia kernel module for nVidia Architecture support
b37addd9
ER
130Summary(de.UTF-8): Das nVidia-Kern-Modul für die nVidia-Architektur-Unterstützung
131Summary(pl.UTF-8): Moduł jądra dla obsługi kart graficznych nVidia
28142503
PS
132Version: %{_nv_ver}.%{_nv_rel}
133Release: %{_rel}@%{_kernel_ver_str}
134Group: Base/Kernel
28142503
PS
135Requires(post,postun): /sbin/depmod
136Requires: dev >= 2.7.7-10
137%{?with_dist_kernel:%requires_releq_kernel_up}
2d490dca 138Provides: X11-driver-nvidia(kernel)
28142503
PS
139Obsoletes: XFree86-nvidia-kernel
140
00aee69a 141%description -n kernel%{_alt_kernel}-video-nvidia
28142503
PS
142nVidia Architecture support for Linux kernel.
143
c311612f
JR
144%description -n kernel%{_alt_kernel}-video-nvidia -l de.UTF-8
145Die nVidia-Architektur-Unterstützung für den Linux-Kern.
28142503 146
c311612f
JR
147%description -n kernel%{_alt_kernel}-video-nvidia -l pl.UTF-8
148Obsługa architektury nVidia dla jądra Linuksa. Pakiet wymagany przez
0ed6aeef 149sterownik nVidii dla Xorg/XFree86.
28142503 150
00aee69a 151%package -n kernel%{_alt_kernel}-smp-video-nvidia
28142503 152Summary: nVidia kernel module for nVidia Architecture support
b37addd9
ER
153Summary(de.UTF-8): Das nVidia-Kern-Modul für die nVidia-Architektur-Unterstützung
154Summary(pl.UTF-8): Moduł jądra dla obsługi kart graficznych nVidia
28142503
PS
155Release: %{_rel}@%{_kernel_ver_str}
156Group: Base/Kernel
28142503
PS
157Requires(post,postun): /sbin/depmod
158Requires: dev >= 2.7.7-10
159%{?with_dist_kernel:%requires_releq_kernel_smp}
2d490dca 160Provides: X11-driver-nvidia(kernel)
28142503
PS
161Obsoletes: XFree86-nvidia-kernel
162
00aee69a 163%description -n kernel%{_alt_kernel}-smp-video-nvidia
28142503
PS
164nVidia Architecture support for Linux kernel SMP.
165
c311612f
JR
166%description -n kernel%{_alt_kernel}-smp-video-nvidia -l de.UTF-8
167Die nVidia-Architektur-Unterstützung für den Linux-Kern SMP.
28142503 168
c311612f
JR
169%description -n kernel%{_alt_kernel}-smp-video-nvidia -l pl.UTF-8
170Obsługa architektury nVidia dla jądra Linuksa SMP. Pakiet wymagany
0ed6aeef 171przez sterownik nVidii dla Xorg/XFree86.
28142503
PS
172
173%prep
174cd %{_builddir}
039c7221
PS
175rm -rf NVIDIA-Linux-x86*-%{_nv_ver}-%{_nv_rel}-pkg*
176%ifarch %{ix86}
28142503 177/bin/sh %{SOURCE0} --extract-only
069d2a12 178%setup -qDT -n NVIDIA-Linux-x86-%{_nv_ver}-%{_nv_rel}-pkg1
039c7221
PS
179%else
180/bin/sh %{SOURCE1} --extract-only
bcf69910 181%setup -qDT -n NVIDIA-Linux-x86_64-%{_nv_ver}-%{_nv_rel}-pkg2
039c7221 182%endif
bcf69910 183%patch0 -p1
0029e8cc 184%patch1 -p1
eb6ba6c9 185echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> usr/src/nv/Makefile.kbuild
28142503
PS
186
187%build
2317af94 188%if %{with kernel}
28142503 189cd usr/src/nv/
d4a34ce2 190ln -sf Makefile.kbuild Makefile
94ef5e53 191cat >> Makefile <<'EOF'
192
193$(obj)/nv-kernel.o: $(src)/nv-kernel.o.bin
194 cp $< $@
195EOF
196mv nv-kernel.o{,.bin}
12a94e85 197%build_kernel_modules -m nvidia
2317af94 198%endif
28142503
PS
199
200%install
201rm -rf $RPM_BUILD_ROOT
1820d34b
ER
202
203%if %{with userspace}
eb6ba6c9 204install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,extensions} \
225cc701 205 $RPM_BUILD_ROOT{%{_includedir}/GL,%{_libdir},%{_bindir},%{_mandir}/man1} \
2a45f872 206 $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/etc/X11/xinit/xinitrc.d}
28142503 207
7a2ced2a 208install usr/bin/nvidia-{settings,xconfig,bug-report.sh} $RPM_BUILD_ROOT%{_bindir}
225cc701 209install usr/share/man/man1/nvidia-{settings,xconfig}.* $RPM_BUILD_ROOT%{_mandir}/man1
210install usr/share/applications/nvidia-settings.desktop $RPM_BUILD_ROOT%{_desktopdir}
7a2ced2a 211install usr/share/pixmaps/nvidia-settings.png $RPM_BUILD_ROOT%{_pixmapsdir}
2a45f872 212install %{SOURCE2} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d/nvidia-settings.sh
eb6ba6c9
PS
213
214for f in \
215 usr/lib/tls/libnvidia-tls.so.%{version} \
069d2a12 216 usr/lib/libnvidia-cfg.so.%{version} \
eb6ba6c9
PS
217 usr/lib/libGL{,core}.so.%{version} \
218 usr/X11R6/lib/libXvMCNVIDIA.so.%{version} \
219 usr/X11R6/lib/libXvMCNVIDIA.a \
220; do
221 install $f $RPM_BUILD_ROOT%{_libdir}
222done
223
d4a34ce2 224install usr/X11R6/lib/modules/extensions/libglx.so.%{version} \
eb6ba6c9 225 $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions
23ae74e1 226install usr/X11R6/lib/modules/drivers/nvidia_drv.so \
227 $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers
069d2a12 228install usr/X11R6/lib/modules/libnvidia-wfb.so.%{version} \
229 $RPM_BUILD_ROOT%{_libdir}/xorg/modules
28142503 230
eb6ba6c9 231install usr/include/GL/*.h $RPM_BUILD_ROOT%{_includedir}/GL
28142503 232
eb6ba6c9 233ln -sf libglx.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/libglx.so
28142503 234ln -sf libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libXvMCNVIDIA.so
eb6ba6c9 235ln -sf libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libXvMCNVIDIA_dynamic.so.1
ebb24c73 236ln -sf libnvidia-wfb.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/wfb.so
28142503
PS
237
238# OpenGL ABI for Linux compatibility
eb6ba6c9
PS
239ln -sf libGL.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libGL.so.1
240ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
1820d34b 241%endif
28142503 242
1fdf7dcc 243%if %{with kernel}
12a94e85 244%install_kernel_modules -m usr/src/nv/nvidia -d misc
1fdf7dcc 245%endif
28142503
PS
246
247%clean
248rm -rf $RPM_BUILD_ROOT
249
a641155e 250%post
ffbb3439 251/sbin/ldconfig
25b520ff 252cat << EOF
253
254 *******************************************************
255 * *
256 * NOTE: *
257 * You must install: *
a641155e
TP
258 * kernel(24)(-smp)-video-nvidia-%{version} *
259 * for this driver to work *
f46b4781 260 * *
25b520ff 261 *******************************************************
262
263EOF
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
00aee69a 273%post -n kernel%{_alt_kernel}-smp-video-nvidia
28142503
PS
274%depmod %{_kernel_ver}smp
275
00aee69a 276%postun -n kernel%{_alt_kernel}-smp-video-nvidia
28142503
PS
277%depmod %{_kernel_ver}smp
278
1820d34b 279%if %{with userspace}
28142503
PS
280%files
281%defattr(644,root,root,755)
282%doc LICENSE
225cc701 283%doc usr/share/doc/{README.txt,NVIDIA_Changelog,XF86Config.sample,html}
eb6ba6c9 284# OpenGL ABI for Linux compatibility
28142503 285%attr(755,root,root) %{_libdir}/libGL.so
eb6ba6c9
PS
286%attr(755,root,root) %{_libdir}/libGL.so.1
287#
288%attr(755,root,root) %{_libdir}/libGL.so.*.*
28142503
PS
289%attr(755,root,root) %{_libdir}/libGLcore.so.*.*
290%attr(755,root,root) %{_libdir}/libXvMCNVIDIA.so.*.*
eb6ba6c9 291%attr(755,root,root) %{_libdir}/libXvMCNVIDIA_dynamic.so.1
069d2a12 292%attr(755,root,root) %{_libdir}/libnvidia-cfg.so.*.*.*
eb6ba6c9 293%attr(755,root,root) %{_libdir}/libnvidia-tls.so.*.*.*
069d2a12 294%attr(755,root,root) %{_libdir}/xorg/modules/libnvidia-wfb.so.*.*.*
ebb24c73 295%attr(755,root,root) %{_libdir}/xorg/modules/wfb.so
23ae74e1 296%attr(755,root,root) %{_libdir}/xorg/modules/drivers/nvidia_drv.so
069d2a12 297%attr(755,root,root) %{_libdir}/xorg/modules/extensions/libglx.so*
1820d34b 298%endif
28142503 299
bf683e7a 300%if %{with kernel}
65876230 301%if %{with up} || %{without dist_kernel}
00aee69a 302%files -n kernel%{_alt_kernel}-video-nvidia
28142503
PS
303%defattr(644,root,root,755)
304/lib/modules/%{_kernel_ver}/misc/*.ko*
65876230 305%endif
28142503
PS
306
307%if %{with smp} && %{with dist_kernel}
00aee69a 308%files -n kernel%{_alt_kernel}-smp-video-nvidia
28142503
PS
309%defattr(644,root,root,755)
310/lib/modules/%{_kernel_ver}smp/misc/*.ko*
311%endif
bf683e7a 312%endif
28142503 313
1820d34b 314%if %{with userspace}
28142503
PS
315%files devel
316%defattr(644,root,root,755)
317%attr(755,root,root) %{_libdir}/libXvMCNVIDIA.so
0c248c5a 318%{_includedir}/GL/*.h
28142503
PS
319# -static
320%{_libdir}/libXvMCNVIDIA.a
321
d4a34ce2 322%files progs
01766b04 323%defattr(644,root,root,755)
324%attr(755,root,root) %{_bindir}/nvidia-settings
225cc701 325%attr(755,root,root) %{_bindir}/nvidia-xconfig
7a2ced2a 326%attr(755,root,root) %{_bindir}/nvidia-bug-report.sh
2a45f872 327%attr(755,root,root) /etc/X11/xinit/xinitrc.d/*.sh
225cc701 328%{_desktopdir}/nvidia-settings.desktop
329%{_mandir}/man1/nvidia-*
330%{_pixmapsdir}/nvidia-settings.png
1820d34b 331%endif
This page took 0.159085 seconds and 4 git commands to generate.