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