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