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)
9 %define _min_xfree 4.3.0
11 Summary: Linux Drivers for ATI graphics accelerators
12 Summary(pl): Sterowniki do akceleratorów graficznych ATI
13 Name: XFree86-driver-firegl
16 License: ATI Binary (parts are GPL)
19 Source0: http://www2.ati.com/drivers/linux/fglrx-%{_min_xfree}-%{version}.i386.rpm
20 # Source0-md5: 9f7802ee0bbdeb5172673027056e789d
21 Patch0: firegl-panel.patch
22 Patch1: %{name}-kh.patch
23 Patch2: %{name}-atomic.patch
24 URL: http://www.ati.com/support/drivers/linux/radeon-linux.html
26 %{?with_dist_kernel:BuildRequires: kernel-source >= 2.6.7}
27 BuildRequires: rpmbuild(macros) >= 1.153
28 %{?with_userspace:BuildRequires: qt-devel}
29 Requires: XFree86-Xserver
30 Requires: XFree86-libs >= %{_min_xfree}
31 Requires: XFree86-modules >= %{_min_xfree}
32 %{?with_dist_kernel:Requires: kernel-video-firegl = %{version} }
33 Provides: XFree86-OpenGL-libGL
35 Obsoletes: XFree86-OpenGL-libGL
36 ExclusiveArch: i586 i686 athlon pentium3 pentium4
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 %define _noautoreqdep libGL.so.1.2
41 %define _prefix /usr/X11R6
42 %define _mandir %{_prefix}/man
45 Display driver files for the ATI Radeon 8500, 9700, Mobility M9 and
46 the FireGL 8700/8800, E1, Z1/X1 graphics accelerators. This package
47 provides 2D display drivers and hardware accelerated OpenGL.
50 Sterowniki do kart graficznych ATI Radeon 8500, 9700, Mobility M9 oraz
51 graficznych akceleratorów FireGL 8700/8800, E1, Z1/X1. Pakiet
52 dostarcza sterowniki obs³uguj±ce wy¶wietlanie 2D oraz sprzêtowo
55 %package -n kernel-video-firegl
56 Summary: ATI kernel module for FireGL support
57 Summary(pl): Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
58 Release: %{release}@%{_kernel_ver_str}
62 %{?with_dist_kernel:%requires_releq_kernel_up}
63 Requires(post,postun): /sbin/depmod
65 %description -n kernel-video-firegl
66 ATI kernel module for FireGL support.
68 %description -n kernel-video-firegl -l pl
69 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
71 %package -n kernel-smp-video-firegl
72 Summary: ATI kernel module for FireGL support
73 Summary(pl): Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
74 Release: %{release}@%{_kernel_ver_str}
78 %{?with_dist_kernel:%requires_releq_kernel_smp}
79 Requires(post,postun): /sbin/depmod
81 %description -n kernel-smp-video-firegl
82 ATI kernel module for FireGL support.
84 %description -n kernel-smp-video-firegl -l pl
85 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
89 rpm2cpio %{SOURCE0} | cpio -i -d
90 bzip2 -d -v usr/X11R6/bin/*.bz2
92 tar -xzf usr/src/ATI/fglrx_panel_sources.tgz -C panel_src
94 %{?with_dist_kernel:%patch1 -p1}
99 cd lib/modules/fglrx/build_mod
100 cp -f 2.6.x/Makefile .
101 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
102 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
106 install -d include/{linux,config}
107 ln -sf %{_kernelsrcdir}/config-$cfg .config
108 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
109 ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
110 touch include/config/MARKER
111 %{__make} -C %{_kernelsrcdir} clean modules \
112 RCS_FIND_IGNORE="-name '*.ko' -o" \
120 %if %{with userspace}
121 %{__make} -C panel_src \
127 rm -rf $RPM_BUILD_ROOT
130 cd lib/modules/fglrx/build_mod
131 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
133 install fglrx-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
134 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/fglrx.ko
135 %if %{with smp} && %{with dist_kernel}
136 install fglrx-smp.ko \
137 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/fglrx.ko
142 %if %{with userspace}
143 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/X11/extensions} \
144 $RPM_BUILD_ROOT/usr/{%{_lib},include/GL}
146 install usr/X11R6/bin/{fgl_glxgears,fglrxconfig,fglrxinfo} \
147 $RPM_BUILD_ROOT%{_bindir}
148 install panel_src/fireglcontrol.qt3.gcc%(gcc -dumpversion) \
149 $RPM_BUILD_ROOT%{_bindir}/fireglcontrol
150 cp -r usr/X11R6/lib/* $RPM_BUILD_ROOT%{_libdir}
152 ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
154 # OpenGL ABI for Linux compatibility
155 ln -sf %{_libdir}/libGL.so.1 $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so.1
156 ln -sf %{_libdir}/libGL.so $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so
158 install usr/include/GL/*.h $RPM_BUILD_ROOT/usr/include/GL
159 install usr/X11R6/include/X11/extensions/*.h $RPM_BUILD_ROOT%{_includedir}/X11/extensions
163 rm -rf $RPM_BUILD_ROOT
165 %post -p /sbin/ldconfig
166 %postun -p /sbin/ldconfig
168 %post -n kernel-video-firegl
169 %depmod %{_kernel_ver}
171 %postun -n kernel-video-firegl
172 %depmod %{_kernel_ver}
174 %post -n kernel-smp-video-firegl
175 %depmod %{_kernel_ver}smp
177 %postun -n kernel-smp-video-firegl
178 %depmod %{_kernel_ver}smp
180 %if %{with userspace}
182 %defattr(644,root,root,755)
183 %attr(755,root,root) %{_bindir}/*
184 %attr(755,root,root) %{_libdir}/libGL.so.*.*
185 %attr(755,root,root) %{_libdir}/libGL.so
186 %attr(755,root,root) %{_libdir}/libfglrx_gamma.so.*.*
187 # Linux OpenGL ABI compatibility symlinks
188 %attr(755,root,root) /usr/%{_lib}/libGL.so.1
189 %attr(755,root,root) /usr/%{_lib}/libGL.so
191 %attr(755,root,root) %{_libdir}/modules/dri/fglrx_dri.so
192 %attr(755,root,root) %{_libdir}/modules/drivers/fglrx_drv.o
193 %{_libdir}/modules/linux/libfglrxdrm.a
196 #%attr(755,root,root) %{_libdir}/libfglrx_gamma.so
197 #%{_includedir}/X11/include/libfglrx_gamma.h
198 #/usr/include/GL/glxATI.h
201 #%{_libdir}/libfglrx_gamma.a
205 %files -n kernel-video-firegl
206 %defattr(644,root,root,755)
207 /lib/modules/%{_kernel_ver}/misc/*.ko*
209 %if %{with smp} && %{with dist_kernel}
210 %files -n kernel-smp-video-firegl
211 %defattr(644,root,root,755)
212 /lib/modules/%{_kernel_ver}smp/misc/*.ko*