]> git.pld-linux.org Git - packages/xorg-driver-video-nvidia.git/blob - xorg-driver-video-nvidia.spec
- rel 2
[packages/xorg-driver-video-nvidia.git] / xorg-driver-video-nvidia.spec
1 #
2 # Conditional build:
3 %bcond_without  dist_kernel     # without distribution kernel
4 %bcond_without  kernel          # without kernel packages
5 %bcond_without  incall          # include all tarballs
6 %bcond_without  userspace       # don't build userspace programs
7 %bcond_with     verbose         # verbose build (V=1)
8 #
9 %define         no_install_post_strip 1
10 #
11 %define         _nv_ver         100
12 %define         _nv_rel         14.09
13 %define         _min_x11        6.7.0
14 %define         _rel            2
15 #
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 #
30 Summary:        Linux Drivers for nVidia GeForce/Quadro Chips
31 Summary(pl.UTF-8):      Sterowniki do kart graficznych nVidia GeForce/Quadro
32 Name:           xorg-driver-video-nvidia
33 Version:        %{_nv_ver}.%{_nv_rel}
34 Release:        %{_rel}
35 License:        nVidia Binary
36 Group:          X11
37 %if %{need_x86}
38 Source0:        http://us.download.nvidia.com/XFree86/Linux-x86/%{_nv_ver}.%{_nv_rel}/NVIDIA-Linux-x86-%{_nv_ver}.%{_nv_rel}-pkg1.run
39 # Source0-md5:  7b021b460ce1b1c533d97a51f2dde133
40 %endif
41 %if %{need_x8664}
42 Source1:        http://us.download.nvidia.com/XFree86/Linux-x86_64/%{_nv_ver}.%{_nv_rel}/NVIDIA-Linux-x86_64-%{_nv_ver}.%{_nv_rel}-pkg2.run
43 # Source1-md5:  0717c0468378647f1e4468c12c1ed72a
44 %endif
45 Source2:        %{name}-xinitrc.sh
46 Patch0:         X11-driver-nvidia-GL.patch
47 Patch1:         X11-driver-nvidia-desktop.patch
48 URL:            http://www.nvidia.com/object/linux.html
49 %if %{with kernel}
50 %{?with_dist_kernel:BuildRequires:      kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
51 %endif
52 BuildRequires:  %{kgcc_package}
53 BuildRequires:  rpmbuild(macros) >= 1.379
54 BuildRequires:  sed >= 4.0
55 BuildConflicts: XFree86-nvidia
56 Requires:       xorg-xserver-server
57 Provides:       OpenGL = 1.5
58 Provides:       OpenGL-GLX
59 Provides:       xorg-xserver-libglx
60 Obsoletes:      Mesa
61 Obsoletes:      Mesa-libGL
62 Obsoletes:      X11-OpenGL-core < 1:7.0.0
63 Obsoletes:      X11-OpenGL-libGL < 1:7.0.0
64 Obsoletes:      XFree86-OpenGL-core < 1:7.0.0
65 Obsoletes:      XFree86-OpenGL-libGL < 1:7.0.0
66 Obsoletes:      XFree86-driver-nvidia
67 Obsoletes:      XFree86-nvidia
68 Conflicts:      XFree86-OpenGL-devel <= 4.2.0-3
69 ExclusiveArch:  %{ix86} %{x8664}
70 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
71
72 %define         _noautoreqdep   libGL.so.1 libGLcore.so.1
73
74 %description
75 This driver set adds improved 2D functionality to the Xorg X server as
76 well as high performance OpenGL acceleration, AGP support, support for
77 most flat panels, and 2D multiple monitor support. Supported hardware:
78 modern NVIDIA GeForce (from GeForce2 MX) and Quadro (Quadro4 and up)
79 based graphics accelerators.
80
81 The 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.
86
87 %description -l pl.UTF-8
88 Usprawnione sterowniki dla kart graficznych nVidia do serwera Xorg,
89 dające wysokowydajną akcelerację OpenGL, obsługę AGP i wielu monitorów
90 2D. Obsługują w miarę nowe karty NVIDIA GeForce (od wersji GeForce2
91 MX) oraz Quadro (od wersji Quadro4).
92
93 Starsze 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
97
98 %package devel
99 Summary:        OpenGL for X11R6 development (only gl?.h)
100 Summary(pl.UTF-8):      Pliki nagłówkowe OpenGL dla systemu X11R6 (tylko gl?.h)
101 Group:          X11/Development/Libraries
102 Requires:       %{name} = %{version}-%{release}
103 Provides:       OpenGL-GLX-devel
104 Provides:       OpenGL-devel = 1.5
105 Provides:       OpenGL-devel-base
106 Obsoletes:      OpenGL-devel-base
107 Obsoletes:      XFree86-driver-nvidia-devel
108 Conflicts:      XFree86-OpenGL-devel < 4.3.99.902-0.3
109
110 %description devel
111 Base headers (only gl?.h) for OpenGL for X11R6 for nvidia drivers.
112
113 %description devel -l pl.UTF-8
114 Podstawowe pliki nagłówkowe (tylko gl?.h) OpenGL dla systemu X11R6 dla
115 sterowników nvidii.
116
117 %package progs
118 Summary:        Tools for advanced control of nVidia graphic cards
119 Summary(pl.UTF-8):      Narzędzia do zarządzania kartami graficznymi nVidia
120 Group:          Applications/System
121 Requires:       %{name} = %{version}-%{release}
122 Obsoletes:      XFree86-driver-nvidia-progs
123
124 %description progs
125 Tools for advanced control of nVidia graphic cards.
126
127 %description progs -l pl.UTF-8
128 Narzędzia do zarządzania kartami graficznymi nVidia.
129
130 %package -n kernel%{_alt_kernel}-video-nvidia
131 Summary:        nVidia kernel module for nVidia Architecture support
132 Summary(de.UTF-8):      Das nVidia-Kern-Modul für die nVidia-Architektur-Unterstützung
133 Summary(pl.UTF-8):      Moduł jądra dla obsługi kart graficznych nVidia
134 Version:        %{_nv_ver}.%{_nv_rel}
135 Release:        %{_rel}@%{_kernel_ver_str}
136 Group:          Base/Kernel
137 Requires(post,postun):  /sbin/depmod
138 Requires:       dev >= 2.7.7-10
139 %{?with_dist_kernel:%requires_releq_kernel}
140 Provides:       X11-driver-nvidia(kernel)
141 Obsoletes:      XFree86-nvidia-kernel
142
143 %description -n kernel%{_alt_kernel}-video-nvidia
144 nVidia Architecture support for Linux kernel.
145
146 %description -n kernel%{_alt_kernel}-video-nvidia -l de.UTF-8
147 Die nVidia-Architektur-Unterstützung für den Linux-Kern.
148
149 %description -n kernel%{_alt_kernel}-video-nvidia -l pl.UTF-8
150 Obsługa architektury nVidia dla jądra Linuksa. Pakiet wymagany przez
151 sterownik nVidii dla Xorg/XFree86.
152
153 %prep
154 cd %{_builddir}
155 rm -rf NVIDIA-Linux-x86*-%{_nv_ver}.%{_nv_rel}-pkg*
156 %ifarch %{ix86}
157 /bin/sh %{SOURCE0} --extract-only
158 %setup -qDT -n NVIDIA-Linux-x86-%{_nv_ver}.%{_nv_rel}-pkg1
159 %else
160 /bin/sh %{SOURCE1} --extract-only
161 %setup -qDT -n NVIDIA-Linux-x86_64-%{_nv_ver}.%{_nv_rel}-pkg2
162 %endif
163 %patch0 -p1
164 %patch1 -p1
165 echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> usr/src/nv/Makefile.kbuild
166
167 %build
168 %if %{with kernel}
169 cd usr/src/nv/
170 ln -sf Makefile.kbuild Makefile
171 cat >> Makefile <<'EOF'
172
173 $(obj)/nv-kernel.o: $(src)/nv-kernel.o.bin
174         cp $< $@
175 EOF
176 mv nv-kernel.o{,.bin}
177 %build_kernel_modules -m nvidia
178 %endif
179
180 %install
181 rm -rf $RPM_BUILD_ROOT
182
183 %if %{with userspace}
184 install -d $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,extensions} \
185         $RPM_BUILD_ROOT{%{_includedir}/GL,%{_libdir},%{_bindir},%{_mandir}/man1} \
186         $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/etc/X11/xinit/xinitrc.d}
187
188 install usr/bin/nvidia-{settings,xconfig,bug-report.sh} $RPM_BUILD_ROOT%{_bindir}
189 install usr/share/man/man1/nvidia-{settings,xconfig}.* $RPM_BUILD_ROOT%{_mandir}/man1
190 install usr/share/applications/nvidia-settings.desktop $RPM_BUILD_ROOT%{_desktopdir}
191 install usr/share/pixmaps/nvidia-settings.png $RPM_BUILD_ROOT%{_pixmapsdir}
192 install %{SOURCE2} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d/nvidia-settings.sh
193
194 for f in \
195         usr/lib/tls/libnvidia-tls.so.%{version}         \
196         usr/lib/libnvidia-cfg.so.%{version}             \
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}
202 done
203
204 install usr/X11R6/lib/modules/extensions/libglx.so.%{version} \
205         $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions
206 install usr/X11R6/lib/modules/drivers/nvidia_drv.so \
207         $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers
208 install usr/X11R6/lib/modules/libnvidia-wfb.so.%{version} \
209         $RPM_BUILD_ROOT%{_libdir}/xorg/modules
210
211 install usr/include/GL/*.h $RPM_BUILD_ROOT%{_includedir}/GL
212
213 ln -sf libglx.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/libglx.so
214 ln -sf libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libXvMCNVIDIA.so
215 ln -sf libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libXvMCNVIDIA_dynamic.so.1
216 ln -sf libnvidia-wfb.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/wfb.so
217
218 # OpenGL ABI for Linux compatibility
219 ln -sf libGL.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libGL.so.1
220 ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
221 %endif
222
223 %if %{with kernel}
224 %install_kernel_modules -m usr/src/nv/nvidia -d misc
225 %endif
226
227 %clean
228 rm -rf $RPM_BUILD_ROOT
229
230 %post
231 /sbin/ldconfig
232 cat << EOF
233
234  *******************************************************
235  *                                                     *
236  *  NOTE:                                              *
237  *  You must install:                                  *
238  *  kernel(24)-video-nvidia-%{version}             *
239  *  for this driver to work                            *
240  *                                                     *
241  *******************************************************
242
243 EOF
244
245 %postun -p /sbin/ldconfig
246
247 %post   -n kernel%{_alt_kernel}-video-nvidia
248 %depmod %{_kernel_ver}
249
250 %postun -n kernel%{_alt_kernel}-video-nvidia
251 %depmod %{_kernel_ver}
252
253 %if %{with userspace}
254 %files
255 %defattr(644,root,root,755)
256 %doc LICENSE
257 %doc usr/share/doc/{README.txt,NVIDIA_Changelog,XF86Config.sample,html}
258 # OpenGL ABI for Linux compatibility
259 %attr(755,root,root) %{_libdir}/libGL.so
260 %attr(755,root,root) %{_libdir}/libGL.so.1
261 #
262 %attr(755,root,root) %{_libdir}/libGL.so.*.*
263 %attr(755,root,root) %{_libdir}/libGLcore.so.*.*
264 %attr(755,root,root) %{_libdir}/libXvMCNVIDIA.so.*.*
265 %attr(755,root,root) %{_libdir}/libXvMCNVIDIA_dynamic.so.1
266 %attr(755,root,root) %{_libdir}/libnvidia-cfg.so.*.*.*
267 %attr(755,root,root) %{_libdir}/libnvidia-tls.so.*.*.*
268 %attr(755,root,root) %{_libdir}/xorg/modules/libnvidia-wfb.so.*.*.*
269 %attr(755,root,root) %{_libdir}/xorg/modules/wfb.so
270 %attr(755,root,root) %{_libdir}/xorg/modules/drivers/nvidia_drv.so
271 %attr(755,root,root) %{_libdir}/xorg/modules/extensions/libglx.so*
272 %endif
273
274 %if %{with kernel}
275 %files -n kernel%{_alt_kernel}-video-nvidia
276 %defattr(644,root,root,755)
277 /lib/modules/%{_kernel_ver}/misc/*.ko*
278 %endif
279
280 %if %{with userspace}
281 %files devel
282 %defattr(644,root,root,755)
283 %attr(755,root,root) %{_libdir}/libXvMCNVIDIA.so
284 %{_includedir}/GL/*.h
285 # -static
286 %{_libdir}/libXvMCNVIDIA.a
287
288 %files progs
289 %defattr(644,root,root,755)
290 %attr(755,root,root) %{_bindir}/nvidia-settings
291 %attr(755,root,root) %{_bindir}/nvidia-xconfig
292 %attr(755,root,root) %{_bindir}/nvidia-bug-report.sh
293 %attr(755,root,root) /etc/X11/xinit/xinitrc.d/*.sh
294 %{_desktopdir}/nvidia-settings.desktop
295 %{_mandir}/man1/nvidia-*
296 %{_pixmapsdir}/nvidia-settings.png
297 %endif
This page took 0.129943 seconds and 4 git commands to generate.