]>
Commit | Line | Data |
---|---|---|
73f83a82 | 1 | # |
2 | # Conditional build: | |
65666b9f | 3 | %bcond_without dist_kernel # without distribution kernel |
56f8b0b0 JB |
4 | %bcond_without kernel # don't build kernel modules |
5 | %bcond_without userspace # don't build userspace tools | |
de505e65 | 6 | %bcond_with verbose # verbose build (V=1) |
2aa20f95 | 7 | %bcond_without incall # include all sources in srpm |
6cec6fba | 8 | %bcond_with grsec_kernel # build for kernel-grsecurity |
9 | # | |
9a8b5c18 | 10 | %if !%{with kernel} |
37862d70 | 11 | %undefine with_dist_kernel |
12 | %endif | |
6cec6fba | 13 | # |
14 | %if %{with kernel} && %{with dist_kernel} && %{with grsec_kernel} | |
15 | %define alt_kernel grsecurity | |
16 | %endif | |
17 | # | |
18 | %define _min_eq_x11 1:6.9.0 | |
19 | %define _max_x11 1:7.0.0 | |
20 | %define x11ver x690 | |
37862d70 | 21 | |
935ce2f3 | 22 | %ifarch %{ix86} |
674278d1 | 23 | %define arch_sufix "" |
24 | %define arch_dir x86 | |
2aa20f95 | 25 | %else |
42ab2c5b | 26 | %define arch_sufix _64a |
674278d1 | 27 | %define arch_dir x86_64 |
2aa20f95 PZ |
28 | %endif |
29 | ||
d2672a50 | 30 | %define _rel 1 |
73f83a82 | 31 | Summary: Linux Drivers for ATI graphics accelerators |
6ec2f123 | 32 | Summary(pl.UTF-8): Sterowniki do akceleratorów graficznych ATI |
21b4bb90 | 33 | Name: X11-driver-firegl |
aaafd05b | 34 | Version: 8.34.8 |
ec3d3e05 | 35 | Release: %{_rel} |
3b871561 | 36 | License: ATI Binary (parts are GPL) |
42ab2c5b | 37 | Group: X11 |
d0c301b5 | 38 | Source0: http://www2.ati.com/drivers/linux/ati-driver-installer-%{version}-x86.x86_64.run |
aaafd05b | 39 | # Source0-md5: 44eda48613542b955a63bd6af2ccc6ce |
54d5ebd9 | 40 | Patch0: firegl-panel.patch |
44f1fe6d | 41 | Patch1: firegl-panel-ugliness.patch |
2ad3dd01 | 42 | Patch2: %{name}-kh.patch |
43 | Patch3: %{name}-viak8t.patch | |
d6783586 | 44 | Patch4: %{name}-force-define-AGP.patch |
8f6e06eb | 45 | Patch5: xorg-driver-video-fglrx-2.6.20-restore_syscalls.patch |
46 | Patch6: xorg-driver-video-fglrx-2.6.20-init_work_macro.patch | |
d0c301b5 | 47 | URL: http://ati.amd.com/support/drivers/linux/linux-radeon.html |
42ab2c5b | 48 | #BuildRequires: X11-devel >= %{_min_eq_x11} # disabled for now |
909a7a21 | 49 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.14} |
6ad30d21 | 50 | %{?with_userspace:BuildRequires: qt-devel} |
a3a376da | 51 | BuildRequires: rpmbuild(macros) >= 1.330 |
9e00e8f6 | 52 | Requires: X11-OpenGL-core >= %{_min_eq_x11} |
c8bdf4d6 | 53 | Requires: X11-Xserver |
2ad3dd01 | 54 | %{?with_kernel:Requires: X11-driver-firegl(kernel)} |
9e00e8f6 | 55 | Requires: X11-libs < %{_max_x11} |
42ab2c5b | 56 | Requires: X11-libs >= %{_min_eq_x11} |
9e00e8f6 | 57 | Requires: X11-modules < %{_max_x11} |
42ab2c5b | 58 | Requires: X11-modules >= %{_min_eq_x11} |
4aa9a663 | 59 | Provides: X11-OpenGL-libGL |
65666b9f | 60 | Provides: XFree86-OpenGL-libGL |
8d7b5ede | 61 | Obsoletes: Mesa |
21b4bb90 | 62 | Obsoletes: X11-OpenGL-libGL |
8d7b5ede | 63 | Obsoletes: XFree86-OpenGL-libGL |
21b4bb90 | 64 | Obsoletes: XFree86-driver-firegl |
06d82cec | 65 | ExclusiveArch: i586 i686 athlon pentium3 pentium4 %{x8664} |
b0e61c0f AM |
66 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
67 | ||
ea373867 | 68 | %define _ccver %(rpm -q --qf "%{VERSION}" gcc | sed 's/\\..*//') |
bf7a2974 | 69 | |
2d2f8d91 | 70 | %define _noautoreqdep libGL.so.1 |
b0e61c0f | 71 | |
b0e61c0f AM |
72 | %define _prefix /usr/X11R6 |
73 | %define _mandir %{_prefix}/man | |
b0e61c0f AM |
74 | |
75 | %description | |
77e2079e AM |
76 | Display driver files for the ATI Radeon 8500, 9700, Mobility M9 and |
77 | the FireGL 8700/8800, E1, Z1/X1 graphics accelerators. This package | |
78 | provides 2D display drivers and hardware accelerated OpenGL. | |
b0e61c0f | 79 | |
69025518 | 80 | %description -l pl.UTF-8 |
77e2079e | 81 | Sterowniki do kart graficznych ATI Radeon 8500, 9700, Mobility M9 oraz |
69025518 JR |
82 | graficznych akceleratorów FireGL 8700/8800, E1, Z1/X1. Pakiet |
83 | dostarcza sterowniki obsługujące wyświetlanie 2D oraz sprzętowo | |
666ae80e | 84 | akcelerowany OpenGL. |
b0e61c0f | 85 | |
909a7a21 | 86 | %package -n kernel%{_alt_kernel}-video-firegl |
b0e61c0f | 87 | Summary: ATI kernel module for FireGL support |
6ec2f123 | 88 | Summary(pl.UTF-8): Moduł jądra oferujący wsparcie dla ATI FireGL |
ec3d3e05 | 89 | Release: %{_rel}@%{_kernel_ver_str} |
b0e61c0f | 90 | License: ATI |
b0e61c0f | 91 | Group: Base/Kernel |
249e0040 | 92 | %{?with_dist_kernel:%requires_releq_kernel} |
ff402db6 | 93 | Requires(post,postun): /sbin/depmod |
fa80fc8a | 94 | Provides: X11-driver-firegl(kernel) |
b0e61c0f | 95 | |
909a7a21 | 96 | %description -n kernel%{_alt_kernel}-video-firegl |
b0e61c0f AM |
97 | ATI kernel module for FireGL support. |
98 | ||
69025518 JR |
99 | %description -n kernel%{_alt_kernel}-video-firegl -l pl.UTF-8 |
100 | Moduł jądra oferujący wsparcie dla ATI FireGL. | |
b0e61c0f AM |
101 | |
102 | %prep | |
77e2079e | 103 | %setup -q -c -T |
42ab2c5b | 104 | |
42ab2c5b | 105 | sh %{SOURCE0} --extract . |
42ab2c5b | 106 | |
674278d1 | 107 | cp arch/%{arch_dir}/lib/modules/fglrx/build_mod/* common/lib/modules/fglrx/build_mod |
42ab2c5b | 108 | |
56f8b0b0 | 109 | install -d panel_src |
cbe5572b | 110 | tar -xzf common/usr/src/ati/fglrx_panel_sources.tgz -C panel_src |
54d5ebd9 | 111 | %patch0 -p1 |
44f1fe6d | 112 | %patch1 -p1 |
42ab2c5b | 113 | cd common |
2ad3dd01 | 114 | %{?with_dist_kernel:%patch2 -p1} |
115 | %patch3 -p1 | |
d6783586 | 116 | %patch4 -p2 |
42ab2c5b | 117 | cd - |
8f6e06eb | 118 | %patch5 -p1 |
119 | %patch6 -p1 | |
42ab2c5b | 120 | |
121 | install -d common%{_prefix}/{%{_lib},bin} | |
8dfcd94a AM |
122 | cp -r %{x11ver}%{arch_sufix}%{_prefix}/%{_lib}/* common%{_prefix}/%{_lib} |
123 | cp -r %{x11ver}%{arch_sufix}%{_bindir}/* common%{_bindir} | |
674278d1 | 124 | cp -r arch/%{arch_dir}%{_prefix}/%{_lib}/* common%{_prefix}/%{_lib} |
125 | cp -r arch/%{arch_dir}%{_bindir}/* common%{_bindir} | |
b0e61c0f AM |
126 | |
127 | %build | |
56f8b0b0 | 128 | %if %{with kernel} |
42ab2c5b | 129 | cd common/lib/modules/fglrx/build_mod |
54eab238 | 130 | cp -f 2.6.x/Makefile . |
bf7a2974 | 131 | %build_kernel_modules -m fglrx GCC_VER_MAJ=%{_ccver} |
de505e65 | 132 | cd - |
56f8b0b0 | 133 | %endif |
123d3a2e | 134 | |
56f8b0b0 | 135 | %if %{with userspace} |
c5f71a31 | 136 | %{__make} -C panel_src \ |
ca7c1407 KK |
137 | C="%{__cc}" \ |
138 | CC="%{__cxx}" \ | |
c5f71a31 PS |
139 | CCFLAGS="%{rpmcflags} -DFGLRX_USE_XEXTENSIONS" \ |
140 | MK_QTDIR=/usr \ | |
141 | LIBQT_DYN=qt-mt | |
56f8b0b0 | 142 | %endif |
b0e61c0f AM |
143 | |
144 | %install | |
145 | rm -rf $RPM_BUILD_ROOT | |
b0e61c0f | 146 | |
56f8b0b0 | 147 | %if %{with kernel} |
addd07ab | 148 | %install_kernel_modules -m common/lib/modules/fglrx/build_mod/fglrx -d misc |
56f8b0b0 JB |
149 | %endif |
150 | ||
151 | %if %{with userspace} | |
152 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/X11/extensions} \ | |
153 | $RPM_BUILD_ROOT/usr/{%{_lib},include/GL} | |
b0e61c0f | 154 | |
674278d1 | 155 | install common%{_bindir}/{fgl_glxgears,fglrxinfo,aticonfig} \ |
5e5f3f25 | 156 | $RPM_BUILD_ROOT%{_bindir} |
c5f71a31 PS |
157 | install panel_src/fireglcontrol.qt3.gcc%(gcc -dumpversion) \ |
158 | $RPM_BUILD_ROOT%{_bindir}/fireglcontrol | |
42ab2c5b | 159 | cp -r common%{_prefix}/%{_lib}/* $RPM_BUILD_ROOT%{_libdir} |
b0e61c0f | 160 | |
56f8b0b0 JB |
161 | ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so |
162 | ||
163 | # OpenGL ABI for Linux compatibility | |
164 | ln -sf %{_libdir}/libGL.so.1 $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so.1 | |
165 | ln -sf %{_libdir}/libGL.so $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so | |
166 | ||
42ab2c5b | 167 | install common/usr/include/GL/*.h $RPM_BUILD_ROOT/usr/include/GL |
168 | install common%{_includedir}/X11/extensions/*.h $RPM_BUILD_ROOT%{_includedir}/X11/extensions | |
56f8b0b0 | 169 | %endif |
b0e61c0f AM |
170 | |
171 | %clean | |
172 | rm -rf $RPM_BUILD_ROOT | |
173 | ||
174 | %post -p /sbin/ldconfig | |
175 | %postun -p /sbin/ldconfig | |
176 | ||
909a7a21 | 177 | %post -n kernel%{_alt_kernel}-video-firegl |
65666b9f | 178 | %depmod %{_kernel_ver} |
b0e61c0f | 179 | |
909a7a21 | 180 | %postun -n kernel%{_alt_kernel}-video-firegl |
65666b9f | 181 | %depmod %{_kernel_ver} |
b0e61c0f | 182 | |
56f8b0b0 | 183 | %if %{with userspace} |
b0e61c0f AM |
184 | %files |
185 | %defattr(644,root,root,755) | |
b0e61c0f | 186 | %attr(755,root,root) %{_bindir}/* |
56f8b0b0 JB |
187 | %attr(755,root,root) %{_libdir}/libGL.so.*.* |
188 | %attr(755,root,root) %{_libdir}/libGL.so | |
674278d1 | 189 | %attr(755,root,root) %{_libdir}/libfglrx_dm.so.*.* |
56f8b0b0 | 190 | %attr(755,root,root) %{_libdir}/libfglrx_gamma.so.*.* |
29617f5d | 191 | %attr(755,root,root) %{_libdir}/libfglrx_pp.so.*.* |
56f8b0b0 JB |
192 | # Linux OpenGL ABI compatibility symlinks |
193 | %attr(755,root,root) /usr/%{_lib}/libGL.so.1 | |
194 | %attr(755,root,root) /usr/%{_lib}/libGL.so | |
195 | ||
8f6e06eb | 196 | #attr(755,root,root) %{_libdir}/modules/dri/atiogl_a_dri.so |
56f8b0b0 | 197 | %attr(755,root,root) %{_libdir}/modules/dri/fglrx_dri.so |
42ab2c5b | 198 | %attr(755,root,root) %{_libdir}/modules/drivers/fglrx_drv.so |
199 | %attr(755,root,root) %{_libdir}/modules/linux/libfglrxdrm.so | |
200 | %doc ATI_LICENSE.TXT common%{_docdir}/fglrx/*.html common%{_docdir}/fglrx/articles common%{_docdir}/fglrx/release-notes common%{_docdir}/fglrx/user-manual | |
56f8b0b0 JB |
201 | |
202 | # -devel | |
203 | #%attr(755,root,root) %{_libdir}/libfglrx_gamma.so | |
204 | #%{_includedir}/X11/include/libfglrx_gamma.h | |
a5669d3a | 205 | #/usr/include/GL/glATI.h |
56f8b0b0 JB |
206 | #/usr/include/GL/glxATI.h |
207 | ||
208 | # -static | |
209 | #%{_libdir}/libfglrx_gamma.a | |
a5669d3a | 210 | #%{_libdir}/libfglrx_pp.a |
56f8b0b0 JB |
211 | %endif |
212 | ||
213 | %if %{with kernel} | |
909a7a21 | 214 | %files -n kernel%{_alt_kernel}-video-firegl |
b0e61c0f | 215 | %defattr(644,root,root,755) |
c894bed3 | 216 | /lib/modules/%{_kernel_ver}/misc/*.ko* |
ca67ef3e | 217 | %endif |