]>
Commit | Line | Data |
---|---|---|
ab99b785 | 1 | # |
f4f29189 MK |
2 | # firegl driver for Ac |
3 | # Testd on highter than standard kernels (LINUX_2_6 family) | |
4 | ||
ab99b785 | 5 | # Conditional build: |
6 | %bcond_without dist_kernel # without distribution kernel | |
7 | %bcond_without kernel # don't build kernel modules | |
ab99b785 | 8 | %bcond_without userspace # don't build userspace tools |
9 | %bcond_with verbose # verbose build (V=1) | |
43322c21 | 10 | |
ab99b785 | 11 | %define _min_eq_x11 1:6.9.0 |
12 | %define _max_x11 1:7.0.0 | |
13 | %define x11ver x690 | |
14 | ||
43322c21 MK |
15 | # Either we use rpm-macros from Th and define |
16 | %define _libdir /usr/X11R6/lib/ | |
17 | # nor use Ac rpm-macros and define kernel macros | |
18 | ||
19 | ||
20 | %if !%{with kernel} | |
21 | %undefine with_dist_kernel | |
22 | %endif | |
23 | ||
ab99b785 | 24 | %ifarch %{ix86} |
25 | %define arch_sufix "" | |
26 | %define arch_dir x86 | |
27 | %else | |
28 | %define arch_sufix _64a | |
29 | %define arch_dir x86_64 | |
30 | %endif | |
31 | ||
ab99b785 | 32 | Summary: Linux Drivers for ATI graphics accelerators |
43322c21 | 33 | Summary(pl.UTF-8): Sterowniki do akceleratorów graficznych ATI |
ab99b785 | 34 | Name: X11-driver-firegl |
f4f29189 | 35 | Version: 8.40.4 |
43322c21 | 36 | %define _rel 0.1 |
ab99b785 | 37 | Release: %{_rel} |
38 | License: ATI Binary (parts are GPL) | |
39 | Group: X11 | |
43322c21 | 40 | Source0: http://dlmdownloads.ati.com/drivers/linux/ati-driver-installer-%{version}-x86.x86_64.run |
f4f29189 | 41 | # Source0-md5: d02add61ee36a4183510317c3c42b147 |
43322c21 MK |
42 | Patch0: %{name}-kh.patch |
43 | URL: http://www.ati.com/support/drivers/linux/radeon-linux.html | |
44 | %{?with_userspace:BuildRequires: OpenGL-GLU-devel} | |
45 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2} | |
ab99b785 | 46 | %{?with_userspace:BuildRequires: qt-devel} |
43322c21 MK |
47 | BuildRequires: rpmbuild(macros) >= 1.379 |
48 | BuildRequires: X11-devel >= %{_min_eq_x11} | |
ab99b785 | 49 | Requires: X11-OpenGL-core >= %{_min_eq_x11} |
50 | Requires: X11-Xserver | |
51 | %{?with_kernel:Requires: X11-driver-firegl(kernel)} | |
52 | Requires: X11-libs < %{_max_x11} | |
53 | Requires: X11-libs >= %{_min_eq_x11} | |
54 | Requires: X11-modules < %{_max_x11} | |
55 | Requires: X11-modules >= %{_min_eq_x11} | |
56 | Provides: X11-OpenGL-libGL | |
57 | Provides: XFree86-OpenGL-libGL | |
58 | Obsoletes: Mesa | |
59 | Obsoletes: X11-OpenGL-libGL | |
60 | Obsoletes: XFree86-OpenGL-libGL | |
61 | Obsoletes: XFree86-driver-firegl | |
62 | ExclusiveArch: i586 i686 athlon pentium3 pentium4 %{x8664} | |
63 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
64 | ||
65 | %define _ccver %(rpm -q --qf "%{VERSION}" gcc | sed 's/\\..*//') | |
66 | ||
67 | %define _noautoreqdep libGL.so.1 | |
68 | ||
ab99b785 | 69 | %description |
70 | Display driver files for the ATI Radeon 8500, 9700, Mobility M9 and | |
71 | the FireGL 8700/8800, E1, Z1/X1 graphics accelerators. This package | |
72 | provides 2D display drivers and hardware accelerated OpenGL. | |
73 | ||
43322c21 | 74 | %description -l pl.UTF-8 |
ab99b785 | 75 | Sterowniki do kart graficznych ATI Radeon 8500, 9700, Mobility M9 oraz |
43322c21 MK |
76 | graficznych akceleratorów FireGL 8700/8800, E1, Z1/X1. Pakiet |
77 | dostarcza sterowniki obsługujące wyświetlanie 2D oraz sprzętowo | |
ab99b785 | 78 | akcelerowany OpenGL. |
79 | ||
43322c21 MK |
80 | %package devel |
81 | Summary: Header files for development for the ATI Radeon cards proprietary driver | |
82 | Summary(pl.UTF-8): Pliki nagłówkowe do programowania z użyciem własnościowego sterownika dla kart ATI Radeon | |
83 | Group: X11/Development/Libraries | |
84 | Requires: %{name} = %{version}-%{release} | |
85 | ||
86 | %description devel | |
87 | Header files for development for the ATI proprietary driver for | |
88 | ATI Radeon graphic cards. | |
89 | ||
90 | %description devel -l pl.UTF-8 | |
91 | Pliki nagłówkowe do programowania z użyciem własnościowego sterownika | |
92 | ATI dla kart graficznych Radeon. | |
93 | ||
94 | %package static | |
95 | Summary: Static libraries for development for the ATI Radeon cards proprietary driver | |
96 | Summary(pl.UTF-8): Biblioteki statyczne do programowania z użyciem własnościowego sterownika dla kart ATI Radeon | |
97 | Group: X11/Development/Libraries | |
98 | Requires: %{name}-devel = %{version}-%{release} | |
99 | ||
100 | %description static | |
101 | Static libraries for development for the ATI proprietary driver for | |
102 | ATI Radeon graphic cards. | |
103 | ||
104 | %description static -l pl.UTF-8 | |
105 | Biblioteki statyczne do programowania z użyciem własnościowego | |
106 | sterownika ATI dla kart graficznych ATI Radeon. | |
107 | ||
ab99b785 | 108 | %package -n kernel%{_alt_kernel}-video-firegl |
109 | Summary: ATI kernel module for FireGL support | |
43322c21 | 110 | Summary(pl.UTF-8): Moduł jądra oferujący wsparcie dla ATI FireGL |
ab99b785 | 111 | Release: %{_rel}@%{_kernel_ver_str} |
112 | License: ATI | |
113 | Group: Base/Kernel | |
65bcddd7 | 114 | %{?with_dist_kernel:%requires_releq_kernel} |
ab99b785 | 115 | Requires(post,postun): /sbin/depmod |
ab99b785 | 116 | |
117 | %description -n kernel%{_alt_kernel}-video-firegl | |
118 | ATI kernel module for FireGL support. | |
119 | ||
43322c21 MK |
120 | %description -n kernel%{_alt_kernel}-video-firegl -l pl.UTF-8 |
121 | Moduł jądra oferujący wsparcie dla ATI FireGL. | |
ab99b785 | 122 | |
123 | %prep | |
124 | %setup -q -c -T | |
125 | ||
126 | sh %{SOURCE0} --extract . | |
127 | ||
128 | cp arch/%{arch_dir}/lib/modules/fglrx/build_mod/* common/lib/modules/fglrx/build_mod | |
129 | ||
ab99b785 | 130 | cd common |
43322c21 | 131 | %{?with_dist_kernel:%patch0 -p1} |
ab99b785 | 132 | cd - |
133 | ||
134 | install -d common%{_prefix}/{%{_lib},bin} | |
43322c21 MK |
135 | cp -r %{x11ver}%{arch_sufix}%{_prefix}/X11R6/%{_lib} common%{_libdir} |
136 | cp -r arch/%{arch_dir}%{_prefix}/X11R6/%{_lib}/* common%{_libdir} | |
137 | cp -r arch/%{arch_dir}%{_prefix}/X11R6/bin/* common%{_bindir} | |
ab99b785 | 138 | |
139 | %build | |
140 | %if %{with kernel} | |
141 | cd common/lib/modules/fglrx/build_mod | |
142 | cp -f 2.6.x/Makefile . | |
143 | %build_kernel_modules -m fglrx GCC_VER_MAJ=%{_ccver} | |
144 | cd - | |
145 | %endif | |
146 | ||
ab99b785 | 147 | %install |
148 | rm -rf $RPM_BUILD_ROOT | |
149 | ||
150 | %if %{with kernel} | |
151 | %install_kernel_modules -m common/lib/modules/fglrx/build_mod/fglrx -d misc | |
152 | %endif | |
153 | ||
154 | %if %{with userspace} | |
ab99b785 | 155 | |
43322c21 MK |
156 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/{ati,env.d},%{_bindir},%{_libdir}/modules,%{_includedir}/{X11/extensions,GL}} |
157 | ||
158 | install common%{_bindir}/{fgl_glxgears,fglrxinfo,aticonfig,fglrx_xgamma} \ | |
ab99b785 | 159 | $RPM_BUILD_ROOT%{_bindir} |
ab99b785 | 160 | |
43322c21 MK |
161 | cp -r common%{_libdir}/lib* $RPM_BUILD_ROOT%{_libdir} |
162 | cp -r common%{_libdir}/modules/* $RPM_BUILD_ROOT%{_libdir}/modules/ | |
163 | cp -r common%{_sysconfdir}/ati/control $RPM_BUILD_ROOT%{_sysconfdir}/ati/control | |
164 | ||
ab99b785 | 165 | |
166 | # OpenGL ABI for Linux compatibility | |
43322c21 MK |
167 | ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so |
168 | ln -sf libGL.so.1.2 $RPM_BUILD_ROOT%{_libdir}/libGL.so.1 | |
169 | ||
170 | cp -r common%{_sysconfdir}/ati/control $RPM_BUILD_ROOT%{_sysconfdir}/ati/control | |
171 | echo "LIBGL_DRIVERS_PATH=%{_libdir}/xorg/modules/dri" > $RPM_BUILD_ROOT%{_sysconfdir}/env.d/LIBGL_DRIVERS_PATH | |
ab99b785 | 172 | |
173 | install common/usr/include/GL/*.h $RPM_BUILD_ROOT/usr/include/GL | |
43322c21 | 174 | # install common%{_includedir}/X11/extensions/*.h $RPM_BUILD_ROOT%{_includedir}/X11/extensions |
ab99b785 | 175 | %endif |
176 | ||
177 | %clean | |
178 | rm -rf $RPM_BUILD_ROOT | |
179 | ||
180 | %post -p /sbin/ldconfig | |
181 | %postun -p /sbin/ldconfig | |
182 | ||
183 | %post -n kernel%{_alt_kernel}-video-firegl | |
184 | %depmod %{_kernel_ver} | |
185 | ||
186 | %postun -n kernel%{_alt_kernel}-video-firegl | |
187 | %depmod %{_kernel_ver} | |
188 | ||
ab99b785 | 189 | %if %{with userspace} |
190 | %files | |
191 | %defattr(644,root,root,755) | |
43322c21 MK |
192 | %doc ATI_LICENSE.TXT common%{_docdir}/fglrx/*.html common%{_docdir}/fglrx/articles common%{_docdir}/fglrx/release-notes common%{_docdir}/fglrx/user-manual |
193 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ati/control | |
194 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/env.d/LIBGL_DRIVERS_PATH | |
ab99b785 | 195 | %attr(755,root,root) %{_bindir}/* |
196 | %attr(755,root,root) %{_libdir}/libGL.so.*.* | |
43322c21 | 197 | %attr(755,root,root) %{_libdir}/libGL.so.1 |
ab99b785 | 198 | %attr(755,root,root) %{_libdir}/libGL.so |
199 | %attr(755,root,root) %{_libdir}/libfglrx_dm.so.*.* | |
200 | %attr(755,root,root) %{_libdir}/libfglrx_gamma.so.*.* | |
201 | %attr(755,root,root) %{_libdir}/libfglrx_pp.so.*.* | |
1ecf45b2 | 202 | %attr(755,root,root) %{_libdir}/libfglrx_tvout.so.*.* |
1ecf45b2 | 203 | %attr(755,root,root) %{_libdir}/modules/glesx.so |
ab99b785 | 204 | %attr(755,root,root) %{_libdir}/modules/dri/fglrx_dri.so |
205 | %attr(755,root,root) %{_libdir}/modules/drivers/fglrx_drv.so | |
206 | %attr(755,root,root) %{_libdir}/modules/linux/libfglrxdrm.so | |
1ecf45b2 | 207 | |
43322c21 MK |
208 | #%files devel |
209 | #%defattr(644,root,root,755) | |
210 | #%attr(755,root,root) %{_libdir}/libfglrx_*so | |
211 | #%{_includedir}/GL/glATI.h | |
212 | #%{_includedir}/GL/glxATI.h | |
213 | #%{_includedir}/X11/extensions/fglrx_gamma.h | |
ab99b785 | 214 | |
43322c21 MK |
215 | #%files static |
216 | #%defattr(644,root,root,755) | |
217 | #%{_libdir}/libfglrx_*.a | |
218 | #%{_libdir}/esut.a | |
ab99b785 | 219 | %endif |
220 | ||
221 | %if %{with kernel} | |
222 | %files -n kernel%{_alt_kernel}-video-firegl | |
223 | %defattr(644,root,root,755) | |
224 | /lib/modules/%{_kernel_ver}/misc/*.ko* | |
3072a430 | 225 | %endif |