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