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