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
10 %define _gcc_ver %(gcc -dumpversion)
12 Summary: Linux Drivers for ATI graphics accelerators
13 Summary(pl): Sterowniki do akceleratorów graficznych ATI
14 Name: XFree86-driver-firegl
17 License: ATI Binary (parts are GPL)
20 Source0: http://www2.ati.com/drivers/linux/fglrx-%{_min_xfree}-%{version}.i386.rpm
21 # Source0-md5: 9f7802ee0bbdeb5172673027056e789d
22 Patch0: firegl-panel.patch
23 Patch1: %{name}-kh.patch
24 Patch2: %{name}-atomic.patch
25 URL: http://www.ati.com/support/drivers/linux/radeon-linux.html
27 %{?with_dist_kernel:BuildRequires: kernel-module-build}
28 BuildRequires: rpmbuild(macros) >= 1.153
29 # not used at the moment (see commented make in panel_src)
30 #BuildRequires: XFree86-OpenGL-devel
31 #BuildRequires: qt-devel
32 Requires: XFree86-Xserver
33 Requires: XFree86-libs >= %{_min_xfree}
34 Requires: XFree86-modules >= %{_min_xfree}
35 %{?with_dist_kernel:Requires: kernel-video-firegl = %{version} }
36 Provides: XFree86-OpenGL-core = %{_min_xfree}
37 Provides: XFree86-OpenGL-libGL
39 Obsoletes: XFree86-OpenGL-libGL
40 ExclusiveArch: i586 i686 athlon pentium3 pentium4
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 %define _noautoreqdep libGL.so.1.2
45 %define _prefix /usr/X11R6
46 %define _mandir %{_prefix}/man
49 Display driver files for the ATI Radeon 8500, 9700, Mobility M9 and
50 the FireGL 8700/8800, E1, Z1/X1 graphics accelerators. This package
51 provides 2D display drivers and hardware accelerated OpenGL.
54 Sterowniki do kart graficznych ATI Radeon 8500, 9700, Mobility M9 oraz
55 graficznych akceleratorów FireGL 8700/8800, E1, Z1/X1. Pakiet
56 dostarcza sterowniki obs³uguj±ce wy¶wietlanie 2D oraz sprzêtowo
59 %package -n kernel-video-firegl
60 Summary: ATI kernel module for FireGL support
61 Summary(pl): Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
62 Release: %{release}@%{_kernel_ver_str}
66 %{?with_dist_kernel:%requires_releq_kernel_up}
67 Requires(post,postun): /sbin/depmod
69 %description -n kernel-video-firegl
70 ATI kernel module for FireGL support.
72 %description -n kernel-video-firegl -l pl
73 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
75 %package -n kernel-smp-video-firegl
76 Summary: ATI kernel module for FireGL support
77 Summary(pl): Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
78 Release: %{release}@%{_kernel_ver_str}
82 %{?with_dist_kernel:%requires_releq_kernel_smp}
83 Requires(post,postun): /sbin/depmod
85 %description -n kernel-smp-video-firegl
86 ATI kernel module for FireGL support.
88 %description -n kernel-smp-video-firegl -l pl
89 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
93 rpm2cpio %{SOURCE0} | cpio -i -d
94 bzip2 -d -v usr/X11R6/bin/*.bz2
96 tar -xzf usr/src/ATI/fglrx_panel_sources.tgz -C panel_src
98 %{?with_dist_kernel:%patch1 -p1}
103 cd lib/modules/fglrx/build_mod
104 cp -f 2.6.x/Makefile .
105 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
106 if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
110 install -d include/{linux,config}
111 ln -sf %{_kernelsrcdir}/config-$cfg .config
112 ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
113 ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
114 touch include/config/MARKER
115 %{__make} -C %{_kernelsrcdir} clean modules \
116 RCS_FIND_IGNORE="-name '*.ko' -o" \
124 %if %{with userspace}
125 #%{__make} -C panel_src \
131 rm -rf $RPM_BUILD_ROOT
134 cd lib/modules/fglrx/build_mod
135 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
137 install fglrx-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
138 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/fglrx.ko
139 %if %{with smp} && %{with dist_kernel}
140 install fglrx-smp.ko \
141 $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/fglrx.ko
146 %if %{with userspace}
147 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/X11/extensions} \
148 $RPM_BUILD_ROOT/usr/{%{_lib},include/GL}
150 install usr/X11R6/bin/{fgl_glxgears,fglrxconfig,fglrxinfo} $RPM_BUILD_ROOT%{_bindir}
151 #install panel_src/{fireglcontrol.qt3.gcc%{_gcc_ver},fireglcontrol} $RPM_BUILD_ROOT%{_bindir}
152 cp -r usr/X11R6/lib/* $RPM_BUILD_ROOT%{_libdir}
154 ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
156 # OpenGL ABI for Linux compatibility
157 ln -sf %{_libdir}/libGL.so.1 $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so.1
158 ln -sf %{_libdir}/libGL.so $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so
160 install usr/include/GL/*.h $RPM_BUILD_ROOT/usr/include/GL
161 install usr/X11R6/include/X11/extensions/*.h $RPM_BUILD_ROOT%{_includedir}/X11/extensions
165 rm -rf $RPM_BUILD_ROOT
167 %post -p /sbin/ldconfig
168 %postun -p /sbin/ldconfig
170 %post -n kernel-video-firegl
171 %depmod %{_kernel_ver}
173 %postun -n kernel-video-firegl
174 %depmod %{_kernel_ver}
176 %post -n kernel-smp-video-firegl
177 %depmod %{_kernel_ver}smp
179 %postun -n kernel-smp-video-firegl
180 %depmod %{_kernel_ver}smp
182 %if %{with userspace}
184 %defattr(644,root,root,755)
185 %attr(755,root,root) %{_bindir}/*
186 %attr(755,root,root) %{_libdir}/libGL.so.*.*
187 %attr(755,root,root) %{_libdir}/libGL.so
188 %attr(755,root,root) %{_libdir}/libfglrx_gamma.so.*.*
189 # Linux OpenGL ABI compatibility symlinks
190 %attr(755,root,root) /usr/%{_lib}/libGL.so.1
191 %attr(755,root,root) /usr/%{_lib}/libGL.so
193 %attr(755,root,root) %{_libdir}/modules/dri/fglrx_dri.so
194 %attr(755,root,root) %{_libdir}/modules/drivers/fglrx_drv.o
195 %{_libdir}/modules/linux/libfglrxdrm.a
198 #%attr(755,root,root) %{_libdir}/libfglrx_gamma.so
199 #%{_includedir}/X11/include/libfglrx_gamma.h
200 #/usr/include/GL/glxATI.h
203 #%{_libdir}/libfglrx_gamma.a
207 %files -n kernel-video-firegl
208 %defattr(644,root,root,755)
209 /lib/modules/%{_kernel_ver}/misc/*.ko*
211 %if %{with smp} && %{with dist_kernel}
212 %files -n kernel-smp-video-firegl
213 %defattr(644,root,root,755)
214 /lib/modules/%{_kernel_ver}smp/misc/*.ko*