]> git.pld-linux.org Git - packages/X11-driver-firegl.git/blob - X11-driver-firegl.spec
- rel 4
[packages/X11-driver-firegl.git] / X11-driver-firegl.spec
1 #
2 # Conditional build:
3 %bcond_without  dist_kernel     # without distribution kernel
4 %bcond_without  kernel          # don't build kernel modules
5 %bcond_without  smp             # don't build SMP module
6 %bcond_without  userspace       # don't build userspace tools
7 %bcond_with     verbose         # verbose build (V=1)
8 %bcond_without  incall          # include all sources in srpm
9
10 %define         _min_eq_x11     1:6.9.0
11 %define         _max_x11        1:7.0.0
12 %define         x11ver          x690
13
14 %if %{without kernel}
15 %undefine with_dist_kernel
16 %endif
17
18 %ifarch %{ix86}
19 %define         need_x86        1
20 %else
21 %define         need_x86        0%{?with_incall:1}
22 %endif
23 %ifarch %{x8664}
24 %define         need_amd64      1
25 %define         arch_sufix      _64a
26 %else
27 %define         need_amd64      0%{?with_incall:1}
28 %define         arch_sufix      ""
29 %endif
30
31 Summary:        Linux Drivers for ATI graphics accelerators
32 Summary(pl):    Sterowniki do akceleratorów graficznych ATI
33 Name:           X11-driver-firegl
34 Version:        8.20.8
35 %define         _rel    4
36 Release:        %{_rel}
37 License:        ATI Binary (parts are GPL)
38 Vendor:         ATI
39 Group:          X11
40 %if %{need_x86}
41 Source0:        http://dlmdownloads.ati.com/drivers/linux/ati-driver-installer-%{version}-i386.run
42 # Source0-md5:  d3cd0788936d57c2b6734449c66987f8
43 %endif
44 %if %{need_amd64}
45 Source1:        http://dlmdownloads.ati.com/drivers/linux/64bit/ati-driver-installer-%{version}-x86_64.run
46 # Source1-md5:  1ffc8dfe93db24fa18f3dd387e20bbcd
47 %endif
48 Source2:        %{name}-fglrx_pp_proto.h
49 Patch0:         firegl-panel.patch
50 Patch1:         firegl-panel-ugliness.patch
51 Patch2:         %{name}-kh.patch
52 Patch3:         %{name}-viak8t.patch
53 URL:            http://www.ati.com/support/drivers/linux/radeon-linux.html
54 #BuildRequires: X11-devel >= %{_min_eq_x11}     # disabled for now
55 BuildRequires:  cpio
56 %{?with_dist_kernel:BuildRequires:      kernel-module-build >= 2.6.14}
57 %{?with_userspace:BuildRequires:        qt-devel}
58 BuildRequires:  rpmbuild(macros) >= 1.213
59 Requires:       X11-OpenGL-core >= %{_min_eq_x11}
60 Requires:       X11-Xserver
61 %{?with_kernel:Requires:        X11-driver-firegl(kernel)}
62 Requires:       X11-libs < %{_max_x11}
63 Requires:       X11-libs >= %{_min_eq_x11}
64 Requires:       X11-modules < %{_max_x11}
65 Requires:       X11-modules >= %{_min_eq_x11}
66 Provides:       X11-OpenGL-libGL
67 Provides:       XFree86-OpenGL-libGL
68 Obsoletes:      Mesa
69 Obsoletes:      X11-OpenGL-libGL
70 Obsoletes:      XFree86-OpenGL-libGL
71 Obsoletes:      XFree86-driver-firegl
72 ExclusiveArch:  i586 i686 athlon pentium3 pentium4 %{x8664}
73 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
74
75 %define         _noautoreqdep   libGL.so.1
76
77 %define         _prefix         /usr/X11R6
78 %define         _mandir         %{_prefix}/man
79
80 %description
81 Display driver files for the ATI Radeon 8500, 9700, Mobility M9 and
82 the FireGL 8700/8800, E1, Z1/X1 graphics accelerators. This package
83 provides 2D display drivers and hardware accelerated OpenGL.
84
85 %description -l pl
86 Sterowniki do kart graficznych ATI Radeon 8500, 9700, Mobility M9 oraz
87 graficznych akceleratorów FireGL 8700/8800, E1, Z1/X1. Pakiet
88 dostarcza sterowniki obs³uguj±ce wy¶wietlanie 2D oraz sprzêtowo
89 akcelerowany OpenGL.
90
91 %package -n kernel-video-firegl
92 Summary:        ATI kernel module for FireGL support
93 Summary(pl):    Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
94 Release:        %{_rel}@%{_kernel_ver_str}
95 License:        ATI
96 Vendor:         ATI
97 Group:          Base/Kernel
98 %{?with_dist_kernel:%requires_releq_kernel_up}
99 Requires(post,postun):  /sbin/depmod
100 Provides:       X11-driver-firegl(kernel)
101
102 %description -n kernel-video-firegl
103 ATI kernel module for FireGL support.
104
105 %description -n kernel-video-firegl -l pl
106 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
107
108 %package -n kernel-smp-video-firegl
109 Summary:        ATI kernel module for FireGL support
110 Summary(pl):    Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
111 Release:        %{_rel}@%{_kernel_ver_str}
112 License:        ATI
113 Vendor:         ATI
114 Group:          Base/Kernel
115 %{?with_dist_kernel:%requires_releq_kernel_smp}
116 Requires(post,postun):  /sbin/depmod
117 Provides:       X11-driver-firegl(kernel)
118
119 %description -n kernel-smp-video-firegl
120 ATI kernel module for FireGL support.
121
122 %description -n kernel-smp-video-firegl -l pl
123 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
124
125 %prep
126 %setup -q -c -T
127
128 %ifarch %{x8664}
129 sh %{SOURCE1} --extract .
130 %else
131 sh %{SOURCE0} --extract .
132 %endif
133
134 cp %{x11ver}%{arch_sufix}/lib/modules/fglrx/build_mod/* common/lib/modules/fglrx/build_mod
135
136 install -d panel_src
137 tar -xzf common/usr/src/ATI/fglrx_panel_sources.tgz -C panel_src
138 cp %{SOURCE2} panel_src/fglrx_pp_proto.h
139 %patch0 -p1
140 %patch1 -p1
141 cd common
142 %{?with_dist_kernel:%patch2 -p1}
143 %patch3 -p1
144 cd -
145
146 install -d common%{_prefix}/{%{_lib},bin}
147 cp -r %{x11ver}%{arch_sufix}%{_prefix}/%{_lib}/* common%{_prefix}/%{_lib}
148 cp -r %{x11ver}%{arch_sufix}%{_bindir}/* common%{_bindir}
149
150 %build
151 %if %{with kernel}
152 cd common/lib/modules/fglrx/build_mod
153 cp -f 2.6.x/Makefile .
154 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
155         if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
156                 exit 1
157         fi
158         rm -rf include
159         install -d include/{linux,config}
160         ln -sf %{_kernelsrcdir}/config-$cfg .config
161         ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
162         ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
163         ln -sf %{_kernelsrcdir}/Module.symvers-$cfg Module.symvers
164 %if %{without dist_kernel}
165         ln -sf %{_kernelsrcdir}/scripts
166 %endif
167         touch include/config/MARKER
168         %{__make} -C %{_kernelsrcdir} clean \
169                 RCS_FIND_IGNORE="-name '*.ko' -o" \
170                 M=$PWD O=$PWD \
171                 %{?with_verbose:V=1}
172         %{__make} -C %{_kernelsrcdir} modules \
173                 M=$PWD O=$PWD \
174                 %{?with_verbose:V=1}
175         mv fglrx{,-$cfg}.ko
176 done
177 cd -
178 %endif
179
180 %if %{with userspace}
181 %{__make} -C panel_src \
182         C="%{__cc}" \
183         CC="%{__cxx}" \
184         CCFLAGS="%{rpmcflags} -DFGLRX_USE_XEXTENSIONS" \
185         MK_QTDIR=/usr \
186         LIBQT_DYN=qt-mt
187 %endif
188
189 %install
190 rm -rf $RPM_BUILD_ROOT
191
192 %if %{with kernel}
193 cd common/lib/modules/fglrx/build_mod
194 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
195
196 install fglrx-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
197         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/fglrx.ko
198 %if %{with smp} && %{with dist_kernel}
199 install fglrx-smp.ko \
200         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/fglrx.ko
201 %endif
202 cd -
203 %endif
204
205 %if %{with userspace}
206 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/X11/extensions} \
207         $RPM_BUILD_ROOT/usr/{%{_lib},include/GL}
208
209 install common%{_bindir}/{fgl_glxgears,fglrxconfig,fglrxinfo,aticonfig} \
210         $RPM_BUILD_ROOT%{_bindir}
211 install panel_src/fireglcontrol.qt3.gcc%(gcc -dumpversion) \
212         $RPM_BUILD_ROOT%{_bindir}/fireglcontrol
213 cp -r common%{_prefix}/%{_lib}/* $RPM_BUILD_ROOT%{_libdir}
214
215 ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
216
217 # OpenGL ABI for Linux compatibility
218 ln -sf %{_libdir}/libGL.so.1 $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so.1
219 ln -sf %{_libdir}/libGL.so $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so
220
221 install common/usr/include/GL/*.h $RPM_BUILD_ROOT/usr/include/GL
222 install common%{_includedir}/X11/extensions/*.h $RPM_BUILD_ROOT%{_includedir}/X11/extensions
223 %endif
224
225 %clean
226 rm -rf $RPM_BUILD_ROOT
227
228 %post   -p /sbin/ldconfig
229 %postun -p /sbin/ldconfig
230
231 %post   -n kernel-video-firegl
232 %depmod %{_kernel_ver}
233
234 %postun -n kernel-video-firegl
235 %depmod %{_kernel_ver}
236
237 %post   -n kernel-smp-video-firegl
238 %depmod %{_kernel_ver}smp
239
240 %postun -n kernel-smp-video-firegl
241 %depmod %{_kernel_ver}smp
242
243 %if %{with userspace}
244 %files
245 %defattr(644,root,root,755)
246 %attr(755,root,root) %{_bindir}/*
247 %attr(755,root,root) %{_libdir}/libGL.so.*.*
248 %attr(755,root,root) %{_libdir}/libGL.so
249 %attr(755,root,root) %{_libdir}/libfglrx_gamma.so.*.*
250 %attr(755,root,root) %{_libdir}/libfglrx_pp.so.*.*
251 # Linux OpenGL ABI compatibility symlinks
252 %attr(755,root,root) /usr/%{_lib}/libGL.so.1
253 %attr(755,root,root) /usr/%{_lib}/libGL.so
254
255 %attr(755,root,root) %{_libdir}/modules/dri/atiogl_a_dri.so
256 %attr(755,root,root) %{_libdir}/modules/dri/fglrx_dri.so
257 %attr(755,root,root) %{_libdir}/modules/drivers/fglrx_drv.so
258 %attr(755,root,root) %{_libdir}/modules/linux/libfglrxdrm.so
259 %doc ATI_LICENSE.TXT common%{_docdir}/fglrx/*.html common%{_docdir}/fglrx/articles common%{_docdir}/fglrx/release-notes common%{_docdir}/fglrx/user-manual
260
261 # -devel
262 #%attr(755,root,root) %{_libdir}/libfglrx_gamma.so
263 #%{_includedir}/X11/include/libfglrx_gamma.h
264 #/usr/include/GL/glATI.h
265 #/usr/include/GL/glxATI.h
266
267 # -static
268 #%{_libdir}/libfglrx_gamma.a
269 #%{_libdir}/libfglrx_pp.a
270 %endif
271
272 %if %{with kernel}
273 %files -n kernel-video-firegl
274 %defattr(644,root,root,755)
275 /lib/modules/%{_kernel_ver}/misc/*.ko*
276
277 %if %{with smp} && %{with dist_kernel}
278 %files -n kernel-smp-video-firegl
279 %defattr(644,root,root,755)
280 /lib/modules/%{_kernel_ver}smp/misc/*.ko*
281 %endif
282 %endif
This page took 0.064136 seconds and 4 git commands to generate.