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)
10 %define _min_xfree 4.3.0
11 %define _gcc_ver %(gcc -dumpversion)
13 Summary: Linux Drivers for ATI graphics accelerators
14 Summary(pl): Sterowniki do akceleratorów graficznych ATI
15 Name: XFree86-driver-firegl
18 License: ATI Binary (parts are GPL)
21 Source0: http://www2.ati.com/drivers/linux/fglrx-%{_min_xfree}-%{version}.i386.rpm
22 # Source0-md5: 8538c3669fd6eab3d17c3669e2d88235
23 Patch0: firegl-panel.patch
24 Patch1: XFree86-driver-firegl-kh.patch
25 URL: http://www.ati.com/support/drivers/linux/radeon-linux.html
27 %if %{with kernel} && %{with dist_kernel}
28 BuildRequires: kernel-source >= 2.6.0
30 BuildRequires: rpm-utils
31 BuildRequires: rpmbuild(macros) >= 1.118
32 # not used at the moment (see commented make in panel_src)
33 #BuildRequires: XFree86-OpenGL-devel
34 #BuildRequires: qt-devel
35 Requires: XFree86-Xserver
36 Requires: XFree86-libs >= %{_min_xfree}
37 Requires: XFree86-modules >= %{_min_xfree}
38 %{?with_dist_kernel:Requires: kernel-video-firegl = %{version} }
39 Provides: XFree86-OpenGL-core = %{_min_xfree}
40 Provides: XFree86-OpenGL-libGL
42 Obsoletes: XFree86-OpenGL-libGL
43 ExclusiveArch: i586 i686 athlon pentium3 pentium4
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 %define _noautoreqdep libGL.so.1.2
48 %define _prefix /usr/X11R6
49 %define _mandir %{_prefix}/man
52 Display driver files for the ATI Radeon 8500, 9700, Mobility M9 and
53 the FireGL 8700/8800, E1, Z1/X1 graphics accelerators. This package
54 provides 2D display drivers and hardware accelerated OpenGL.
57 Sterowniki do kart graficznych ATI Radeon 8500, 9700, Mobility M9 oraz
58 graficznych akceleratorów FireGL 8700/8800, E1, Z1/X1. Pakiet
59 dostarcza sterowniki obs³uguj±ce wy¶wietlanie 2D oraz sprzêtowo
62 %package -n kernel-video-firegl
63 Summary: ATI kernel module for FireGL support
64 Summary(pl): Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
65 Release: %{release}@%{_kernel_ver_str}
69 %{?with_dist_kernel:%requires_releq_kernel_up}
70 PreReq: modutils >= 2.3.18-2
71 Requires(post,postun): /sbin/depmod
73 %description -n kernel-video-firegl
74 ATI kernel module for FireGL support.
76 %description -n kernel-video-firegl -l pl
77 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
79 %package -n kernel-smp-video-firegl
80 Summary: ATI kernel module for FireGL support
81 Summary(pl): Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
82 Release: %{release}@%{_kernel_ver_str}
86 %{?with_dist_kernel:%requires_releq_kernel_smp}
87 PreReq: modutils >= 2.3.18-2
88 Requires(post,postun): /sbin/depmod
90 %description -n kernel-smp-video-firegl
91 ATI kernel module for FireGL support.
93 %description -n kernel-smp-video-firegl -l pl
94 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
98 rpm2cpio %{SOURCE0} | cpio -i -d
99 bzip2 -d -v usr/X11R6/bin/*.bz2
101 tar -xzf usr/src/ATI/fglrx_panel_sources.tgz -C panel_src
103 %{?with_dist_kernel:%patch1 -p1}
107 cd lib/modules/fglrx/build_mod
109 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
110 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
114 install -d include/{linux,config}
115 %{__make} -C %{_kernelsrcdir} mrproper \
119 ln -sf %{_kernelsrcdir}/config-$cfg .config
120 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
121 touch include/config/MARKER
122 %{__make} -C %{_kernelsrcdir} modules \
126 mv fglrx.ko fglrx-$cfg.ko
131 %if %{with userspace}
132 #%{__make} -C panel_src \
138 rm -rf $RPM_BUILD_ROOT
141 cd lib/modules/fglrx/build_mod
142 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
144 install fglrx-%{?with_dist_files:up}%{!?with_dist_kernel:nondist}.ko \
145 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/fglrx.ko
146 %if %{with smp} && %{with dist_kernel}
147 install fglrx-smp.ko \
148 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/fglrx.ko
153 %if %{with userspace}
154 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/X11/extensions} \
155 $RPM_BUILD_ROOT/usr/{%{_lib},include/GL}
157 install usr/X11R6/bin/{fgl_glxgears,fglrxconfig,fglrxinfo} $RPM_BUILD_ROOT%{_bindir}
158 #install panel_src/{fireglcontrol.qt3.gcc%{_gcc_ver},fireglcontrol} $RPM_BUILD_ROOT%{_bindir}
159 cp -r usr/X11R6/lib/* $RPM_BUILD_ROOT%{_libdir}
161 ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
163 # OpenGL ABI for Linux compatibility
164 ln -sf %{_libdir}/libGL.so.1 $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so.1
165 ln -sf %{_libdir}/libGL.so $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so
167 install usr/include/GL/*.h $RPM_BUILD_ROOT/usr/include/GL
168 install usr/X11R6/include/X11/extensions/*.h $RPM_BUILD_ROOT%{_includedir}/X11/extensions
172 rm -rf $RPM_BUILD_ROOT
174 %post -p /sbin/ldconfig
175 %postun -p /sbin/ldconfig
177 %post -n kernel-video-firegl
178 %depmod %{_kernel_ver}
180 %postun -n kernel-video-firegl
181 %depmod %{_kernel_ver}
183 %post -n kernel-smp-video-firegl
184 %depmod %{_kernel_ver}smp
186 %postun -n kernel-smp-video-firegl
187 %depmod %{_kernel_ver}smp
189 %if %{with userspace}
191 %defattr(644,root,root,755)
192 %attr(755,root,root) %{_bindir}/*
193 %attr(755,root,root) %{_libdir}/libGL.so.*.*
194 %attr(755,root,root) %{_libdir}/libGL.so
195 %attr(755,root,root) %{_libdir}/libfglrx_gamma.so.*.*
196 # Linux OpenGL ABI compatibility symlinks
197 %attr(755,root,root) /usr/%{_lib}/libGL.so.1
198 %attr(755,root,root) /usr/%{_lib}/libGL.so
200 %attr(755,root,root) %{_libdir}/modules/dri/fglrx_dri.so
201 %attr(755,root,root) %{_libdir}/modules/drivers/fglrx_drv.o
202 %{_libdir}/modules/linux/libfglrxdrm.a
205 #%attr(755,root,root) %{_libdir}/libfglrx_gamma.so
206 #%{_includedir}/X11/include/libfglrx_gamma.h
207 #/usr/include/GL/glxATI.h
210 #%{_libdir}/libfglrx_gamma.a
214 %files -n kernel-video-firegl
215 %defattr(644,root,root,755)
216 /lib/modules/%{_kernel_ver}/misc/*.ko*
218 %if %{with smp} && %{with dist_kernel}
219 %files -n kernel-smp-video-firegl
220 %defattr(644,root,root,755)
221 /lib/modules/%{_kernel_ver}smp/misc/*.ko*