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