- cleanup
[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
6cd6e57a 12%define _nv_rel 14.19
6cd6e57a 13%define _rel 1
28142503 14#
22d6cc34 15%define need_x86 0
16%define need_x8664 0
17%if %{with incall}
18%define need_x86 1
19%define need_x8664 1
20%else
21%ifarch %{ix86}
22%define need_x86 1
23%endif
24%ifarch %{x8664}
25%define need_x8664 1
26%endif
27%endif
28#
974295b8
JB
29Summary: Linux Drivers for nVidia GeForce/Quadro Chips
30Summary(pl.UTF-8): Sterowniki do kart graficznych nVidia GeForce/Quadro
eb6ba6c9 31Name: xorg-driver-video-nvidia
28142503 32Version: %{_nv_ver}.%{_nv_rel}
28142503
PS
33Release: %{_rel}
34License: nVidia Binary
4a185d32 35Group: X11
22d6cc34 36%if %{need_x86}
931d085f 37Source0: http://us.download.nvidia.com/XFree86/Linux-x86/%{_nv_ver}.%{_nv_rel}/NVIDIA-Linux-x86-%{_nv_ver}.%{_nv_rel}-pkg1.run
6cd6e57a 38# Source0-md5: d2f89f60cef8f9a0cc0ce228b46eeb8b
22d6cc34 39%endif
40%if %{need_x8664}
931d085f 41Source1: http://us.download.nvidia.com/XFree86/Linux-x86_64/%{_nv_ver}.%{_nv_rel}/NVIDIA-Linux-x86_64-%{_nv_ver}.%{_nv_rel}-pkg2.run
6cd6e57a 42# Source1-md5: 2afec320e9495444bc1582bf358e5237
22d6cc34 43%endif
8550b6ec 44Source2: %{name}-xinitrc.sh
bcf69910
JB
45Patch0: X11-driver-nvidia-GL.patch
46Patch1: X11-driver-nvidia-desktop.patch
28142503 47URL: http://www.nvidia.com/object/linux.html
82268c76 48%if %{with kernel}
0e15e33b 49%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
82268c76 50%endif
28142503 51BuildRequires: %{kgcc_package}
d68f27fd 52BuildRequires: rpmbuild(macros) >= 1.379
039c7221 53BuildRequires: sed >= 4.0
0ed6aeef 54BuildConflicts: XFree86-nvidia
8343d24d 55Requires: xorg-xserver-server
56b60abf 56Requires: xorg-xserver-server(videodrv-abi) = 2.0
1b8b7646 57Provides: OpenGL = 2.1
63c6d4b1 58Provides: OpenGL-GLX = 1.4
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
63c6d4b1
JB
99Summary: OpenGL (GL and GLX) header files
100Summary(pl.UTF-8): Pliki nagłówkowe OpenGL (GL i GLX)
28142503 101Group: X11/Development/Libraries
2d490dca 102Requires: %{name} = %{version}-%{release}
63c6d4b1 103Provides: OpenGL-GLX-devel = 1.4
1b8b7646 104Provides: OpenGL-devel = 2.1
63c6d4b1
JB
105Obsoletes: X11-OpenGL-devel-base
106Obsoletes: XFree86-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
63c6d4b1
JB
111OpenGL header files (GL and GLX only) for NVIDIA OpenGL
112implementation.
28142503 113
c311612f 114%description devel -l pl.UTF-8
63c6d4b1
JB
115Pliki nagłówkowe OpenGL (tylko GL i GLX) dla implementacji OpenGL
116firmy NVIDIA.
117
118%package static
119Summary: Static XvMCNVIDIA library
120Summary(pl.UTF-8): Statyczna biblioteka XvMCNVIDIA
121Group: X11/Development/Libraries
122Requires: %{name}-devel = %{version}-%{release}
123
124%description static
125Static XvMCNVIDIA library.
126
127%description static -l pl.UTF-8
128Statyczna biblioteka XvMCNVIDIA.
28142503
PS
129
130%package progs
131Summary: Tools for advanced control of nVidia graphic cards
b37addd9 132Summary(pl.UTF-8): Narzędzia do zarządzania kartami graficznymi nVidia
f12e8b24 133Group: Applications/System
2d490dca 134Requires: %{name} = %{version}-%{release}
0ed6aeef 135Obsoletes: XFree86-driver-nvidia-progs
28142503
PS
136
137%description progs
138Tools for advanced control of nVidia graphic cards.
139
c311612f
JR
140%description progs -l pl.UTF-8
141Narzędzia do zarządzania kartami graficznymi nVidia.
28142503 142
00aee69a 143%package -n kernel%{_alt_kernel}-video-nvidia
28142503 144Summary: nVidia kernel module for nVidia Architecture support
b37addd9
ER
145Summary(de.UTF-8): Das nVidia-Kern-Modul für die nVidia-Architektur-Unterstützung
146Summary(pl.UTF-8): Moduł jądra dla obsługi kart graficznych nVidia
28142503
PS
147Version: %{_nv_ver}.%{_nv_rel}
148Release: %{_rel}@%{_kernel_ver_str}
149Group: Base/Kernel
28142503
PS
150Requires(post,postun): /sbin/depmod
151Requires: dev >= 2.7.7-10
d68f27fd 152%{?with_dist_kernel:%requires_releq_kernel}
2d490dca 153Provides: X11-driver-nvidia(kernel)
28142503
PS
154Obsoletes: XFree86-nvidia-kernel
155
00aee69a 156%description -n kernel%{_alt_kernel}-video-nvidia
28142503
PS
157nVidia Architecture support for Linux kernel.
158
c311612f
JR
159%description -n kernel%{_alt_kernel}-video-nvidia -l de.UTF-8
160Die nVidia-Architektur-Unterstützung für den Linux-Kern.
28142503 161
c311612f
JR
162%description -n kernel%{_alt_kernel}-video-nvidia -l pl.UTF-8
163Obsługa architektury nVidia dla jądra Linuksa. Pakiet wymagany przez
0ed6aeef 164sterownik nVidii dla Xorg/XFree86.
28142503 165
28142503
PS
166%prep
167cd %{_builddir}
931d085f 168rm -rf NVIDIA-Linux-x86*-%{_nv_ver}.%{_nv_rel}-pkg*
039c7221 169%ifarch %{ix86}
28142503 170/bin/sh %{SOURCE0} --extract-only
931d085f 171%setup -qDT -n NVIDIA-Linux-x86-%{_nv_ver}.%{_nv_rel}-pkg1
039c7221
PS
172%else
173/bin/sh %{SOURCE1} --extract-only
931d085f 174%setup -qDT -n NVIDIA-Linux-x86_64-%{_nv_ver}.%{_nv_rel}-pkg2
039c7221 175%endif
bcf69910 176%patch0 -p1
0029e8cc 177%patch1 -p1
eb6ba6c9 178echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> usr/src/nv/Makefile.kbuild
28142503
PS
179
180%build
2317af94 181%if %{with kernel}
28142503 182cd usr/src/nv/
d4a34ce2 183ln -sf Makefile.kbuild Makefile
94ef5e53 184cat >> Makefile <<'EOF'
185
186$(obj)/nv-kernel.o: $(src)/nv-kernel.o.bin
187 cp $< $@
188EOF
189mv nv-kernel.o{,.bin}
12a94e85 190%build_kernel_modules -m nvidia
2317af94 191%endif
28142503
PS
192
193%install
194rm -rf $RPM_BUILD_ROOT
1820d34b
ER
195
196%if %{with userspace}
eb6ba6c9 197install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,extensions} \
225cc701 198 $RPM_BUILD_ROOT{%{_includedir}/GL,%{_libdir},%{_bindir},%{_mandir}/man1} \
2a45f872 199 $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/etc/X11/xinit/xinitrc.d}
28142503 200
7a2ced2a 201install usr/bin/nvidia-{settings,xconfig,bug-report.sh} $RPM_BUILD_ROOT%{_bindir}
225cc701 202install usr/share/man/man1/nvidia-{settings,xconfig}.* $RPM_BUILD_ROOT%{_mandir}/man1
203install usr/share/applications/nvidia-settings.desktop $RPM_BUILD_ROOT%{_desktopdir}
7a2ced2a 204install usr/share/pixmaps/nvidia-settings.png $RPM_BUILD_ROOT%{_pixmapsdir}
2a45f872 205install %{SOURCE2} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d/nvidia-settings.sh
eb6ba6c9
PS
206
207for f in \
208 usr/lib/tls/libnvidia-tls.so.%{version} \
069d2a12 209 usr/lib/libnvidia-cfg.so.%{version} \
eb6ba6c9
PS
210 usr/lib/libGL{,core}.so.%{version} \
211 usr/X11R6/lib/libXvMCNVIDIA.so.%{version} \
212 usr/X11R6/lib/libXvMCNVIDIA.a \
213; do
214 install $f $RPM_BUILD_ROOT%{_libdir}
215done
216
d4a34ce2 217install usr/X11R6/lib/modules/extensions/libglx.so.%{version} \
eb6ba6c9 218 $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions
23ae74e1 219install usr/X11R6/lib/modules/drivers/nvidia_drv.so \
220 $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers
069d2a12 221install usr/X11R6/lib/modules/libnvidia-wfb.so.%{version} \
222 $RPM_BUILD_ROOT%{_libdir}/xorg/modules
28142503 223
eb6ba6c9 224install usr/include/GL/*.h $RPM_BUILD_ROOT%{_includedir}/GL
28142503 225
eb6ba6c9 226ln -sf libglx.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/libglx.so
28142503 227ln -sf libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libXvMCNVIDIA.so
eb6ba6c9 228ln -sf libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libXvMCNVIDIA_dynamic.so.1
ebb24c73 229ln -sf libnvidia-wfb.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/wfb.so
28142503
PS
230
231# OpenGL ABI for Linux compatibility
eb6ba6c9
PS
232ln -sf libGL.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libGL.so.1
233ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
1820d34b 234%endif
28142503 235
1fdf7dcc 236%if %{with kernel}
12a94e85 237%install_kernel_modules -m usr/src/nv/nvidia -d misc
1fdf7dcc 238%endif
28142503
PS
239
240%clean
241rm -rf $RPM_BUILD_ROOT
242
a641155e 243%post
ffbb3439 244/sbin/ldconfig
25b520ff 245cat << EOF
fef7210e
JB
246NOTE: You must install:
247kernel-video-nvidia-%{version}
248for this driver to work
25b520ff 249EOF
250
ffbb3439 251%postun -p /sbin/ldconfig
25b520ff 252
00aee69a 253%post -n kernel%{_alt_kernel}-video-nvidia
28142503
PS
254%depmod %{_kernel_ver}
255
00aee69a 256%postun -n kernel%{_alt_kernel}-video-nvidia
28142503
PS
257%depmod %{_kernel_ver}
258
1820d34b 259%if %{with userspace}
28142503
PS
260%files
261%defattr(644,root,root,755)
262%doc LICENSE
225cc701 263%doc usr/share/doc/{README.txt,NVIDIA_Changelog,XF86Config.sample,html}
eb6ba6c9 264%attr(755,root,root) %{_libdir}/libGL.so.*.*
63c6d4b1
JB
265%attr(755,root,root) %ghost %{_libdir}/libGL.so.1
266# symlink for binary apps which fail to conform Linux OpenGL ABI
267# (and dlopen libGL.so instead of libGL.so.1)
268%attr(755,root,root) %{_libdir}/libGL.so
28142503
PS
269%attr(755,root,root) %{_libdir}/libGLcore.so.*.*
270%attr(755,root,root) %{_libdir}/libXvMCNVIDIA.so.*.*
eb6ba6c9 271%attr(755,root,root) %{_libdir}/libXvMCNVIDIA_dynamic.so.1
069d2a12 272%attr(755,root,root) %{_libdir}/libnvidia-cfg.so.*.*.*
eb6ba6c9 273%attr(755,root,root) %{_libdir}/libnvidia-tls.so.*.*.*
069d2a12 274%attr(755,root,root) %{_libdir}/xorg/modules/libnvidia-wfb.so.*.*.*
ebb24c73 275%attr(755,root,root) %{_libdir}/xorg/modules/wfb.so
23ae74e1 276%attr(755,root,root) %{_libdir}/xorg/modules/drivers/nvidia_drv.so
069d2a12 277%attr(755,root,root) %{_libdir}/xorg/modules/extensions/libglx.so*
28142503 278
28142503
PS
279%files devel
280%defattr(644,root,root,755)
281%attr(755,root,root) %{_libdir}/libXvMCNVIDIA.so
73eb73e1 282%dir %{_includedir}/GL
63c6d4b1
JB
283%{_includedir}/GL/gl.h
284%{_includedir}/GL/glext.h
285%{_includedir}/GL/glx.h
286%{_includedir}/GL/glxext.h
287
288%files static
289%defattr(644,root,root,755)
28142503
PS
290%{_libdir}/libXvMCNVIDIA.a
291
d4a34ce2 292%files progs
01766b04 293%defattr(644,root,root,755)
294%attr(755,root,root) %{_bindir}/nvidia-settings
225cc701 295%attr(755,root,root) %{_bindir}/nvidia-xconfig
7a2ced2a 296%attr(755,root,root) %{_bindir}/nvidia-bug-report.sh
2a45f872 297%attr(755,root,root) /etc/X11/xinit/xinitrc.d/*.sh
225cc701 298%{_desktopdir}/nvidia-settings.desktop
299%{_mandir}/man1/nvidia-*
300%{_pixmapsdir}/nvidia-settings.png
1820d34b 301%endif
63c6d4b1
JB
302
303%if %{with kernel}
304%files -n kernel%{_alt_kernel}-video-nvidia
305%defattr(644,root,root,755)
306/lib/modules/%{_kernel_ver}/misc/*.ko*
307%endif
This page took 0.166284 seconds and 4 git commands to generate.