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