]> git.pld-linux.org Git - packages/xorg-driver-video-nvidia-legacy3.git/blob - xorg-driver-video-nvidia-legacy3.spec
- removed debian hackery, it's not needed anymore
[packages/xorg-driver-video-nvidia-legacy3.git] / xorg-driver-video-nvidia-legacy3.spec
1 # TODO
2 # - use name like: nvidia-71xx and nvidia-96xx, nvidia-173xx.
3 # - solve this (shouldn't there be some obsoletes?):
4 #   error: xorg-driver-video-nvidia-169.12-3.i686 (cnfl Mesa-libGL) conflicts with installed Mesa-libGL-7.0.3-2.i686
5 #   error: xorg-driver-video-nvidia-169.12-3.i686 (cnfl Mesa-libGL) conflicts with installed Mesa-libGL-7.0.3-2.i686
6 #
7 # Conditional build:
8 %bcond_without  dist_kernel     # without distribution kernel
9 %bcond_without  kernel          # without kernel packages
10 %bcond_without  userspace       # don't build userspace programs
11 %bcond_with     verbose         # verbose build (V=1)
12
13 %if %{without kernel}
14 %undefine       with_dist_kernel
15 %endif
16
17 # The goal here is to have main, userspace, package built once with
18 # simple release number, and only rebuild kernel packages with kernel
19 # version as part of release number, without the need to bump release
20 # with every kernel change.
21 %if 0%{?_pld_builder:1} && %{with kernel} && %{with userspace}
22 %{error:kernel and userspace cannot be built at the same time on PLD builders}
23 exit 1
24 %endif
25
26 %if "%{_alt_kernel}" != "%{nil}"
27 %if 0%{?build_kernels:1}
28 %{error:alt_kernel and build_kernels are mutually exclusive}
29 exit 1
30 %endif
31 %undefine       with_userspace
32 %global         _build_kernels          %{alt_kernel}
33 %else
34 %global         _build_kernels          %{?build_kernels:,%{?build_kernels}}
35 %endif
36
37 %if %{without userspace}
38 # nothing to be placed to debuginfo package
39 %define         _enable_debug_packages  0
40 %endif
41
42 %define         no_install_post_check_so        1
43
44 %define         kbrs    %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo "BuildRequires:kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2" ; done)
45 %define         kpkg    %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo %%kernel_pkg ; done)
46 %define         bkpkg   %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo %%build_kernel_pkg ; done)
47
48 %define         rel             3
49 %define         pname           xorg-driver-video-nvidia-legacy3
50 Summary:        Linux Drivers for nVidia GeForce/Quadro Chips (173.14.xx series)
51 Summary(hu.UTF-8):      Linux meghajtók nVidia GeForce/Quadro chipekhez
52 Summary(pl.UTF-8):      Sterowniki do kart graficznych nVidia GeForce/Quadro
53 Name:           %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
54 Version:        173.14.39
55 Release:        %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
56 License:        nVidia Binary
57 Group:          X11
58 Source0:        http://us.download.nvidia.com/XFree86/Linux-x86/%{version}/NVIDIA-Linux-x86-%{version}-pkg1.run
59 # Source0-md5:  bb98039d178cbfe6219c13993090017d
60 Source1:        http://us.download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x86_64-%{version}-pkg2.run
61 # Source1-md5:  d8a4aa520d0cc9e11cee8c4e94684fc6
62 Source2:        %{pname}-xinitrc.sh
63 Source3:        10-nvidia.conf
64 Source4:        10-nvidia-modules.conf
65 Source5:        patches.h
66 Source6:        conftest.h
67 Source7:        conftest.sh
68 Patch0:         X11-driver-nvidia-GL.patch
69 Patch1:         X11-driver-nvidia-legacy-desktop.patch
70 Patch2:         nvidia-blacklist-vga-pmu-registers-195.patch
71 URL:            http://www.nvidia.com/object/unix.html
72 BuildRequires:  rpmbuild(macros) >= 1.678
73 %{?with_dist_kernel:%{expand:%kbrs}}
74 BuildRequires:  sed >= 4.0
75 BuildConflicts: XFree86-nvidia
76 Requires:       %{pname}-libs = %{epoch}:%{version}-%{rel}
77 Requires:       xorg-xserver-server
78 Requires:       xorg-xserver-server(videodrv-abi) <= 15.0
79 Requires:       xorg-xserver-server(videodrv-abi) >= 2.0
80 Provides:       xorg-driver-video
81 Provides:       xorg-xserver-module(glx)
82 Obsoletes:      XFree86-driver-nvidia
83 Obsoletes:      XFree86-nvidia
84 Conflicts:      XFree86-OpenGL-devel <= 4.2.0-3
85 ExclusiveArch:  %{ix86} %{x8664}
86 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
87
88 %define         _noautoreqdep   libGL.so.1 libGLcore.so.1
89
90 %description
91 This driver set adds improved 2D functionality to the Xorg X server as
92 well as high performance OpenGL acceleration, AGP support, support for
93 most flat panels, and 2D multiple monitor support. Supported hardware:
94 modern NVIDIA GeForce (from GeForce2 MX) and Quadro (Quadro4 and up)
95 based graphics accelerators.
96
97 The older graphics chips are unsupported:
98 - NV1 and RIVA 128/128ZX chips are supported in the base Xorg install
99   (nv driver)
100 - TNT/TNT2/GeForce 256/GeForce2 Ultra/Quadro2 are suported by -legacy
101   drivers.
102
103 %description -l hu.UTF-8
104 Ez a meghajtó kibővíti az Xorg X szerver 2D működését OpenGL
105 gyorsítással, AGP támogatással és támogatja a több monitort.
106 Támogatott hardverek: modern NVIDIA GeForce (GeForce2 MX-től) és
107 Quadro (Quadro4 és újabbak) alapú grafikai gyorsítók.
108
109 A régekbbi grafikus chipek nem támogatottak:
110 - NV1 és RIVA 128/128ZX chipek az alap Xorg telepítéssel (nv meghajtó)
111 - TNT/TNT2/GeForce 256/GeForce2 Ultra/Quadro2 a -legacy driverekkel
112   támogatottak.
113
114 %description -l pl.UTF-8
115 Usprawnione sterowniki dla kart graficznych nVidia do serwera Xorg,
116 dające wysokowydajną akcelerację OpenGL, obsługę AGP i wielu monitorów
117 2D. Obsługują w miarę nowe karty NVIDIA GeForce (od wersji GeForce2
118 MX) oraz Quadro (od wersji Quadro4).
119
120 Starsze układy graficzne nie są obsługiwane przez ten pakiet:
121 - NV1 i RIVA 128/128ZX są obsługiwane przez sterownik nv z Xorg
122 - TNT/TNT2/GeForce 256/GeForce 2 Ultra/Quadro 2 są obsługiwane przez
123   sterowniki -legacy
124
125 %package libs
126 Summary:        OpenGL (GL and GLX) Nvidia libraries
127 Summary(pl.UTF-8):      Biblioteki OpenGL (GL i GLX) Nvidia
128 Group:          X11/Development/Libraries
129 #Requires:      %{pname} = %{epoch}:%{version}-%{rel}
130 Provides:       OpenGL = 2.1
131 Provides:       OpenGL-GLX = 1.4
132 Obsoletes:      X11-OpenGL-core < 1:7.0.0
133 Obsoletes:      X11-OpenGL-libGL < 1:7.0.0
134 Obsoletes:      XFree86-OpenGL-core < 1:7.0.0
135 Obsoletes:      XFree86-OpenGL-libGL < 1:7.0.0
136
137 %description libs
138 NVIDIA OpenGL (GL and GLX only) implementation libraries.
139
140 %description libs -l pl.UTF-8
141 Implementacja OpenGL (tylko GL i GLX) firmy NVIDIA.
142
143 %package devel
144 Summary:        OpenGL (GL and GLX) header files
145 Summary(hu.UTF-8):      OpenGL (GL és GLX) fejléc fájlok
146 Summary(pl.UTF-8):      Pliki nagłówkowe OpenGL (GL i GLX)
147 Group:          X11/Development/Libraries
148 Requires:       %{pname}-libs = %{epoch}:%{version}-%{rel}
149 Provides:       OpenGL-GLX-devel = 1.4
150 Provides:       OpenGL-devel = 2.1
151 Obsoletes:      X11-OpenGL-devel-base
152 Obsoletes:      XFree86-OpenGL-devel-base
153 Obsoletes:      XFree86-driver-nvidia-devel
154 Conflicts:      XFree86-OpenGL-devel < 4.3.99.902-0.3
155
156 %description devel
157 OpenGL header files (GL and GLX only) for NVIDIA OpenGL
158 implementation.
159
160 %description devel -l hu.UTF-8
161 OpenGL fejléc fájlok (csak GL és GLX) NVIDIA OpenGL implementációhoz.
162
163 %description devel -l pl.UTF-8
164 Pliki nagłówkowe OpenGL (tylko GL i GLX) dla implementacji OpenGL
165 firmy NVIDIA.
166
167 %package static
168 Summary:        Static XvMCNVIDIA library
169 Summary(hu.UTF-8):      Statikus XwMCNVIDIA könyvtár
170 Summary(pl.UTF-8):      Statyczna biblioteka XvMCNVIDIA
171 Group:          X11/Development/Libraries
172 Requires:       %{pname}-devel = %{epoch}:%{version}-%{rel}
173
174 %description static
175 Static XvMCNVIDIA library.
176
177 %description static -l hu.UTF-8
178 Statikus XwMCNVIDIA könyvtár.
179
180 %description static -l pl.UTF-8
181 Statyczna biblioteka XvMCNVIDIA.
182
183 %package doc
184 Summary:        Documentation for NVIDIA Graphics Driver
185 Group:          Documentation
186
187 %description doc
188 NVIDIA Accelerated Linux Graphics Driver README and Installation
189 Guide.
190
191 %package progs
192 Summary:        Tools for advanced control of nVidia graphic cards
193 Summary(hu.UTF-8):      Eszközök az nVidia grafikus kártyák beállításához
194 Summary(pl.UTF-8):      Narzędzia do zarządzania kartami graficznymi nVidia
195 Group:          Applications/System
196 Requires:       %{pname} = %{epoch}:%{version}
197 Suggests:       pkgconfig
198 Obsoletes:      XFree86-driver-nvidia-progs
199
200 %description progs
201 Tools for advanced control of nVidia graphic cards.
202
203 %description progs -l hu.UTF-8
204 Eszközök az nVidia grafikus kártyák beállításához.
205
206 %description progs -l pl.UTF-8
207 Narzędzia do zarządzania kartami graficznymi nVidia.
208
209 %define kernel_pkg()\
210 %package -n kernel%{_alt_kernel}-video-nvidia-legacy3\
211 Summary:        nVidia kernel module for nVidia Architecture support\
212 Summary(de.UTF-8):      Das nVidia-Kern-Modul für die nVidia-Architektur-Unterstützung\
213 Summary(hu.UTF-8):      nVidia Architektúra támogatás Linux kernelhez\
214 Summary(pl.UTF-8):      Moduł jądra dla obsługi kart graficznych nVidia\
215 Release:        %{rel}@%{_kernel_ver_str}\
216 Group:          Base/Kernel\
217 Requires(post,postun):  /sbin/depmod\
218 Requires:       dev >= 2.7.7-10\
219 %if %{with dist_kernel}\
220 %requires_releq_kernel\
221 Requires(postun):       %releq_kernel\
222 %endif\
223 Requires:       %{pname} = %{epoch}:%{version}\
224 Provides:       X11-driver-nvidia(kernel)\
225 Obsoletes:      XFree86-nvidia-kernel\
226 \
227 %description -n kernel%{_alt_kernel}-video-nvidia-legacy3\
228 nVidia Architecture support for Linux kernel.\
229 \
230 %description -n kernel%{_alt_kernel}-video-nvidia-legacy3 -l de.UTF-8\
231 Die nVidia-Architektur-Unterstützung für den Linux-Kern.\
232 \
233 %description -n kernel%{_alt_kernel}-video-nvidia-legacy3 -l hu.UTF-8\
234 nVidia Architektúra támogatás Linux kernelhez.\
235 \
236 %description -n kernel%{_alt_kernel}-video-nvidia-legacy3 -l pl.UTF-8\
237 Obsługa architektury nVidia dla jądra Linuksa. Pakiet wymagany przez\
238 sterownik nVidii dla Xorg/XFree86.\
239 \
240 %files -n kernel%{_alt_kernel}-video-nvidia-legacy3\
241 %defattr(644,root,root,755)\
242 /lib/modules/%{_kernel_ver}/misc/*.ko*\
243 \
244 %post   -n kernel%{_alt_kernel}-video-nvidia-legacy3\
245 %depmod %{_kernel_ver}\
246 \
247 %postun -n kernel%{_alt_kernel}-video-nvidia-legacy3\
248 %depmod %{_kernel_ver}\
249 %{nil}
250
251 %define build_kernel_pkg()\
252 cd usr/src/nv\
253 ln -sf Makefile.kbuild Makefile\
254 %{__make} SYSSRC=%{_kernelsrcdir} clean\
255 ln -sf Makefile.kbuild Makefile\
256 %{__make} SYSSRC=%{_kernelsrcdir} module\
257 cd ../../..\
258 %install_kernel_modules -D installed -m usr/src/nv/nvidia -d misc\
259 #cat >> Makefile <<'EOF'\
260 #\
261 #$(obj)/nv-kernel.o: $(src)/nv-kernel.o.bin\
262 #       cp $< $@\
263 #EOF\
264 #mv nv-kernel.o{,.bin}\
265 #build_kernel_modules -m nvidia\
266 %{nil}
267
268 %{?with_kernel:%{expand:%kpkg}}
269
270 %prep
271 cd %{_builddir}
272 rm -rf NVIDIA-Linux-x86*-%{version}-pkg*
273 %ifarch %{ix86}
274 /bin/sh %{SOURCE0} --extract-only
275 %setup -qDT -n NVIDIA-Linux-x86-%{version}-pkg1
276 %else
277 /bin/sh %{SOURCE1} --extract-only
278 %setup -qDT -n NVIDIA-Linux-x86_64-%{version}-pkg2
279 %endif
280 %patch0 -p1
281 %patch1 -p1
282 %patch2 -p1
283
284 %build
285 %{?with_kernel:%{expand:%bkpkg}}
286
287 %install
288 rm -rf $RPM_BUILD_ROOT
289
290 %if %{with userspace}
291 install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,extensions/nvidia} \
292         $RPM_BUILD_ROOT{%{_includedir}/GL,%{_libdir},%{_bindir},%{_mandir}/man1} \
293         $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/etc/X11/xinit/xinitrc.d}
294 install -d $RPM_BUILD_ROOT{%{_libdir}/nvidia,%{_sysconfdir}/ld.so.conf.d}
295 install -d $RPM_BUILD_ROOT/etc/X11/xorg.conf.d
296
297 install -p usr/bin/nvidia-{settings,xconfig,bug-report.sh} $RPM_BUILD_ROOT%{_bindir}
298 cp -p usr/share/man/man1/nvidia-{settings,xconfig}.* $RPM_BUILD_ROOT%{_mandir}/man1
299 cp -p usr/share/applications/nvidia-settings.desktop $RPM_BUILD_ROOT%{_desktopdir}
300 cp -p usr/share/pixmaps/nvidia-settings.png $RPM_BUILD_ROOT%{_pixmapsdir}
301 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d/nvidia-settings.sh
302
303 install %{SOURCE3} $RPM_BUILD_ROOT/etc/X11/xorg.conf.d
304 install %{SOURCE4} $RPM_BUILD_ROOT/etc/X11/xorg.conf.d
305 sed -i -e 's|@@LIBDIR@@|%{_libdir}|g' $RPM_BUILD_ROOT/etc/X11/xorg.conf.d/10-nvidia-modules.conf
306
307 for f in \
308         usr/lib/tls/libnvidia-tls.so.%{version}         \
309         usr/lib/libnvidia-cfg.so.%{version}             \
310         usr/lib/libGL{,core}.so.%{version}              \
311         usr/X11R6/lib/libXvMCNVIDIA.so.%{version}       \
312         usr/X11R6/lib/libXvMCNVIDIA.a                   \
313 ; do
314         install -p $f $RPM_BUILD_ROOT%{_libdir}/nvidia
315 done
316
317 install -p usr/X11R6/lib/modules/extensions/libglx.so.%{version} \
318         $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/nvidia
319 install -p usr/X11R6/lib/modules/drivers/nvidia_drv.so \
320         $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/nvidia_drv.so.%{version}
321 ln -s nvidia_drv.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers/nvidia_drv.so
322 install -p usr/X11R6/lib/modules/libnvidia-wfb.so.%{version} \
323         $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/nvidia
324
325 cp -p usr/include/GL/*.h $RPM_BUILD_ROOT%{_includedir}/GL
326
327 ln -sf libglx.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/nvidia/libglx.so
328 ln -sf libnvidia-wfb.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/nvidia/libnvidia-wfb.so
329
330 %ifarch %{x8664}
331 echo %{_libdir}/nvidia >$RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia64.conf
332 %else
333 echo %{_libdir}/nvidia >$RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia.conf
334 %endif
335
336 # OpenGL ABI for Linux compatibility
337 ln -sf libGL.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libGL.so.1
338 ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGL.so
339
340 ln -sf libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libXvMCNVIDIA.so
341 ln -sf libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libXvMCNVIDIA_dynamic.so.1
342
343 /sbin/ldconfig -n %{_libdir}/nvidia
344 /sbin/ldconfig -n %{_libdir}/xorg/modules/extensions/nvidia
345 %endif
346
347 %if %{with kernel}
348 install -d $RPM_BUILD_ROOT
349 cp -a installed/* $RPM_BUILD_ROOT
350 %endif
351
352 %clean
353 rm -rf $RPM_BUILD_ROOT
354
355 %post
356 cat << 'EOF'
357 NOTE: You must also install kernel module for this driver to work
358   kernel-video-nvidia-legacy3-%{version}
359
360 EOF
361
362 %post   libs -p /sbin/ldconfig
363 %postun libs -p /sbin/ldconfig
364
365 %if %{with userspace}
366 %files
367 %defattr(644,root,root,755)
368 %doc LICENSE
369 %doc usr/share/doc/{README.txt,NVIDIA_Changelog,XF86Config.sample}
370 %dir %{_libdir}/xorg/modules/extensions/nvidia
371 %attr(755,root,root) %{_libdir}/xorg/modules/extensions/nvidia/libglx.so.*
372 %attr(755,root,root) %{_libdir}/xorg/modules/extensions/nvidia/libglx.so
373 %attr(755,root,root) %{_libdir}/xorg/modules/extensions/nvidia/libnvidia-wfb.so.*.*
374 %attr(755,root,root) %{_libdir}/xorg/modules/extensions/nvidia/libnvidia-wfb.so
375 %attr(755,root,root) %{_libdir}/xorg/modules/drivers/nvidia_drv.so.*
376 %attr(755,root,root) %{_libdir}/xorg/modules/drivers/nvidia_drv.so
377 %{_sysconfdir}/X11/xorg.conf.d/10-nvidia.conf
378 %{_sysconfdir}/X11/xorg.conf.d/10-nvidia-modules.conf
379
380 %files libs
381 %defattr(644,root,root,755)
382 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ld.so.conf.d/nvidia*.conf
383 %dir %{_libdir}/nvidia
384 %attr(755,root,root) %{_libdir}/nvidia/libGL.so.*.*
385 %attr(755,root,root) %ghost %{_libdir}/nvidia/libGL.so.1
386 %attr(755,root,root) %{_libdir}/nvidia/libGLcore.so.*.*
387 %attr(755,root,root) %{_libdir}/nvidia/libXvMCNVIDIA.so.*.*
388 %attr(755,root,root) %{_libdir}/nvidia/libXvMCNVIDIA_dynamic.so.1
389 %attr(755,root,root) %{_libdir}/nvidia/libnvidia-cfg.so.*.*
390 %attr(755,root,root) %{_libdir}/nvidia/libnvidia-tls.so.*.*
391
392 %files devel
393 %defattr(644,root,root,755)
394 %attr(755,root,root) %{_libdir}/nvidia/libGL.so
395 %attr(755,root,root) %{_libdir}/nvidia/libXvMCNVIDIA.so
396 %dir %{_includedir}/GL
397 %{_includedir}/GL/gl.h
398 %{_includedir}/GL/glext.h
399 %{_includedir}/GL/glx.h
400 %{_includedir}/GL/glxext.h
401
402 %files static
403 %defattr(644,root,root,755)
404 %{_libdir}/nvidia/libXvMCNVIDIA.a
405
406 %files doc
407 %defattr(644,root,root,755)
408 %doc usr/share/doc/html/*
409
410 %files progs
411 %defattr(644,root,root,755)
412 %attr(755,root,root) %{_bindir}/nvidia-settings
413 %attr(755,root,root) %{_bindir}/nvidia-xconfig
414 %attr(755,root,root) %{_bindir}/nvidia-bug-report.sh
415 %attr(755,root,root) /etc/X11/xinit/xinitrc.d/*.sh
416 %{_desktopdir}/nvidia-settings.desktop
417 %{_mandir}/man1/nvidia-*
418 %{_pixmapsdir}/nvidia-settings.png
419 %endif
This page took 0.134834 seconds and 3 git commands to generate.