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