3 %bcond_without dist_kernel # without distribution kernel
4 %bcond_without kernel # don't build kernel modules
5 %bcond_without userspace # don't build userspace tools
8 %define _min_xfree 4.3.0
9 %define _gcc_ver %(gcc -dumpversion)
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-glc22-%{_min_xfree}-%{version}.i386.rpm
20 # Source0-md5: 7dd12340a2b8525b3a9fa1f310e06141
21 Patch0: firegl-panel.patch
22 Patch1: XFree86-driver-firegl-kh.patch
23 URL: http://www.ati.com/support/drivers/linux/radeon-linux.html
25 %if %{with kernel} && %{with dist_kernel}
26 BuildRequires: kernel-source >= 2.6.0
28 BuildRequires: rpm-utils
29 BuildRequires: rpmbuild(macros) >= 1.118
30 # not used at the moment (see commented make in panel_src)
31 #BuildRequires: XFree86-OpenGL-devel
32 #BuildRequires: qt-devel
33 Requires: XFree86-Xserver
34 Requires: XFree86-libs >= %{_min_xfree}
35 Requires: XFree86-modules >= %{_min_xfree}
36 %{?with_dist_kernel:Requires: kernel-video-firegl = %{version} }
37 Provides: XFree86-OpenGL-core = %{_min_xfree}
38 Provides: XFree86-OpenGL-libGL
40 Obsoletes: XFree86-OpenGL-libGL
41 ExclusiveArch: i586 i686 athlon
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 %define _noautoreqdep libGL.so.1.2
46 %define _prefix /usr/X11R6
47 %define _mandir %{_prefix}/man
50 Display driver files for the ATI Radeon 8500, 9700, Mobility M9 and
51 the FireGL 8700/8800, E1, Z1/X1 graphics accelerators. This package
52 provides 2D display drivers and hardware accelerated OpenGL.
55 Sterowniki do kart graficznych ATI Radeon 8500, 9700, Mobility M9 oraz
56 graficznych akceleratorów FireGL 8700/8800, E1, Z1/X1. Pakiet
57 dostarcza sterowniki obs³uguj±ce wy¶wietlanie 2D oraz sprzêtowo
60 %package -n kernel-video-firegl
61 Summary: ATI kernel module for FireGL support
62 Summary(pl): Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
63 Release: %{release}@%{_kernel_ver_str}
67 %{?with_dist_kernel:%requires_releq_kernel_up}
68 PreReq: modutils >= 2.3.18-2
69 Requires(post,postun): /sbin/depmod
71 %description -n kernel-video-firegl
72 ATI kernel module for FireGL support.
74 %description -n kernel-video-firegl -l pl
75 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
77 %package -n kernel-smp-video-firegl
78 Summary: ATI kernel module for FireGL support
79 Summary(pl): Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
80 Release: %{release}@%{_kernel_ver_str}
84 %{?with_dist_kernel:%requires_releq_kernel_smp}
85 PreReq: modutils >= 2.3.18-2
86 Requires(post,postun): /sbin/depmod
88 %description -n kernel-smp-video-firegl
89 ATI kernel module for FireGL support.
91 %description -n kernel-smp-video-firegl -l pl
92 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
96 rpm2cpio %{SOURCE0} | cpio -i -d
97 bzip2 -d -v usr/X11R6/bin/*.bz2
99 tar -xzf usr/src/ATI/fglrx_panel_sources.tgz -C panel_src
101 %{?with_dist_kernel:%patch1 -p1}
105 cd lib/modules/fglrx/build_mod
106 cp make.sh make.sh.org && rm -f make.sh
107 sed -e 's#gcc#%{kgcc}#g' -e 's#`id -u` -ne 0#`id -u` -ne `id -u`#g' make.sh.org > make.sh
111 mv fglrx.ko fglrx-smp.ko
117 %if %{with userspace}
118 #%{__make} -C panel_src \
124 rm -rf $RPM_BUILD_ROOT
127 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
128 install lib/modules/fglrx/build_mod/fglrx.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
129 install lib/modules/fglrx/build_mod/fglrx-smp.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc
132 %if %{with userspace}
133 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/X11/extensions} \
134 $RPM_BUILD_ROOT/usr/{%{_lib},include/GL}
136 install usr/X11R6/bin/{fgl_glxgears,fglrxconfig,fglrxinfo} $RPM_BUILD_ROOT%{_bindir}
137 #install panel_src/{fireglcontrol.qt3.gcc%{_gcc_ver},fireglcontrol} $RPM_BUILD_ROOT%{_bindir}
138 cp -r usr/X11R6/lib/* $RPM_BUILD_ROOT%{_libdir}
140 ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
142 # OpenGL ABI for Linux compatibility
143 ln -sf %{_libdir}/libGL.so.1 $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so.1
144 ln -sf %{_libdir}/libGL.so $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so
146 install usr/include/GL/*.h $RPM_BUILD_ROOT/usr/include/GL
147 install usr/X11R6/include/X11/extensions/*.h $RPM_BUILD_ROOT%{_includedir}/X11/extensions
151 rm -rf $RPM_BUILD_ROOT
153 %post -p /sbin/ldconfig
154 %postun -p /sbin/ldconfig
156 %post -n kernel-video-firegl
157 %depmod %{_kernel_ver}
159 %postun -n kernel-video-firegl
160 %depmod %{_kernel_ver}
162 %post -n kernel-smp-video-firegl
163 %depmod %{_kernel_ver}smp
165 %postun -n kernel-smp-video-firegl
166 %depmod %{_kernel_ver}smp
168 %if %{with userspace}
170 %defattr(644,root,root,755)
171 %attr(755,root,root) %{_bindir}/*
172 %attr(755,root,root) %{_libdir}/libGL.so.*.*
173 %attr(755,root,root) %{_libdir}/libGL.so
174 %attr(755,root,root) %{_libdir}/libfglrx_gamma.so.*.*
175 # Linux OpenGL ABI compatibility symlinks
176 %attr(755,root,root) /usr/%{_lib}/libGL.so.1
177 %attr(755,root,root) /usr/%{_lib}/libGL.so
179 %attr(755,root,root) %{_libdir}/modules/dri/fglrx_dri.so
180 %attr(755,root,root) %{_libdir}/modules/drivers/fglrx_drv.o
181 %{_libdir}/modules/linux/libfglrxdrm.a
184 #%attr(755,root,root) %{_libdir}/libfglrx_gamma.so
185 #%{_includedir}/X11/include/libfglrx_gamma.h
186 #/usr/include/GL/glxATI.h
189 #%{_libdir}/libfglrx_gamma.a
193 %files -n kernel-video-firegl
194 %defattr(644,root,root,755)
195 /lib/modules/%{_kernel_ver}/misc/*.ko*
197 %files -n kernel-smp-video-firegl
198 %defattr(644,root,root,755)
199 /lib/modules/%{_kernel_ver}smp/misc/*.ko*