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