]> git.pld-linux.org Git - packages/X11-driver-firegl.git/blob - X11-driver-firegl.spec
- via k8t support added (patch sent by Paweł M. Zaskórski).
[packages/X11-driver-firegl.git] / X11-driver-firegl.spec
1 #
2 # Conditional build:
3 %bcond_without  dist_kernel     # without distribution kernel
4 %bcond_without  kernel          # don't build kernel modules
5 %bcond_without  smp             # don't build SMP module
6 %bcond_without  userspace       # don't build userspace tools
7 %bcond_with     verbose         # verbose build (V=1)
8 %bcond_without  incall          # include all sources in srpm
9
10 %define         _min_x11        6.8.0
11
12 %if %{without kernel}
13 %undefine with_dist_kernel
14 %endif
15
16 %ifarch %{ix86}
17 %define         need_x86        1
18 %else
19 %define         need_x86        0%{?with_incall:1}
20 %endif
21 %ifarch amd64
22 %define         need_amd64      1
23 %else
24 %define         need_amd64      0%{?with_incall:1}
25 %endif
26
27 Summary:        Linux Drivers for ATI graphics accelerators
28 Summary(pl):    Sterowniki do akceleratorów graficznych ATI
29 Name:           X11-driver-firegl
30 Version:        8.12.10
31 %define         _rel    2
32 Release:        %{_rel}
33 License:        ATI Binary (parts are GPL)
34 Vendor:         ATI
35 Group:          X11/XFree86
36 %if %{need_x86}
37 Source0:        http://www2.ati.com/drivers/linux/fglrx_6_8_0-%{version}-1.i386.rpm
38 # Source0-md5:  9c6397047331aadaa2c379ca78245810
39 %endif
40 %if %{need_amd64}
41 Source1:        http://www2.ati.com/drivers/linux/fglrx64_6_8_0-%{version}-1.x86_64.rpm
42 # Source1-md5:  a54abd8af43d3066faccda4cecec851c
43 %endif
44 Patch0:         firegl-panel.patch
45 Patch1:         firegl-panel-ugliness.patch
46 Patch2:         %{name}-kernel-2_6_11.patch
47 Patch3:         %{name}-kh.patch
48 Patch4:         %{name}-viak8t.patch
49 URL:            http://www.ati.com/support/drivers/linux/radeon-linux.html
50 BuildRequires:  cpio
51 %{?with_dist_kernel:BuildRequires:      kernel-module-build >= 2.6.7}
52 BuildRequires:  rpmbuild(macros) >= 1.153
53 %{?with_userspace:BuildRequires:        qt-devel}
54 #BuildRequires: X11-devel >= %{_min_x11}        # disabled for now
55 Requires:       X11-OpenGL-core >= %{_min_x11}
56 Requires:       X11-Xserver
57 Requires:       X11-driver-firegl(kernel)
58 Requires:       X11-libs >= %{_min_x11}
59 Requires:       X11-modules >= %{_min_x11}
60 Provides:       X11-OpenGL-libGL
61 Provides:       XFree86-OpenGL-libGL
62 Obsoletes:      Mesa
63 Obsoletes:      X11-OpenGL-libGL
64 Obsoletes:      XFree86-OpenGL-libGL
65 Obsoletes:      XFree86-driver-firegl
66 ExclusiveArch:  i586 i686 athlon pentium3 pentium4 amd64
67 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68
69 %define         _noautoreqdep   libGL.so.1
70
71 %define         _prefix         /usr/X11R6
72 %define         _mandir         %{_prefix}/man
73
74 %description
75 Display driver files for the ATI Radeon 8500, 9700, Mobility M9 and
76 the FireGL 8700/8800, E1, Z1/X1 graphics accelerators. This package
77 provides 2D display drivers and hardware accelerated OpenGL.
78
79 %description -l pl
80 Sterowniki do kart graficznych ATI Radeon 8500, 9700, Mobility M9 oraz
81 graficznych akceleratorów FireGL 8700/8800, E1, Z1/X1. Pakiet
82 dostarcza sterowniki obs³uguj±ce wy¶wietlanie 2D oraz sprzêtowo
83 akcelerowany OpenGL.
84
85 %package -n kernel-video-firegl
86 Summary:        ATI kernel module for FireGL support
87 Summary(pl):    Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
88 Release:        %{_rel}@%{_kernel_ver_str}
89 License:        ATI
90 Vendor:         ATI
91 Group:          Base/Kernel
92 %{?with_dist_kernel:%requires_releq_kernel_up}
93 Requires(post,postun):  /sbin/depmod
94 Provides:       X11-driver-firegl(kernel)
95
96 %description -n kernel-video-firegl
97 ATI kernel module for FireGL support.
98
99 %description -n kernel-video-firegl -l pl
100 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
101
102 %package -n kernel-smp-video-firegl
103 Summary:        ATI kernel module for FireGL support
104 Summary(pl):    Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
105 Release:        %{_rel}@%{_kernel_ver_str}
106 License:        ATI
107 Vendor:         ATI
108 Group:          Base/Kernel
109 %{?with_dist_kernel:%requires_releq_kernel_smp}
110 Requires(post,postun):  /sbin/depmod
111 Provides:       X11-driver-firegl(kernel)
112
113 %description -n kernel-smp-video-firegl
114 ATI kernel module for FireGL support.
115
116 %description -n kernel-smp-video-firegl -l pl
117 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
118
119 %prep
120 %setup -q -c -T
121 %ifarch amd64
122 rpm2cpio %{SOURCE1} | cpio -i -d
123 %else
124 rpm2cpio %{SOURCE0} | cpio -i -d
125 %endif
126 install -d panel_src
127 tar -xzf usr/src/ATI/fglrx_panel_sources.tgz -C panel_src
128
129 %patch0 -p1
130 %patch1 -p1
131 %patch2 -p1
132 %{?with_dist_kernel:%patch3 -p1}
133
134 %build
135 %if %{with kernel}
136 cd lib/modules/fglrx/build_mod
137 cp -f 2.6.x/Makefile .
138 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
139         if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
140                 exit 1
141         fi
142         rm -rf include
143         install -d include/{linux,config}
144         ln -sf %{_kernelsrcdir}/config-$cfg .config
145         ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
146         ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
147 %if %{without dist_kernel}
148         ln -sf %{_kernelsrcdir}/scripts
149 %endif
150         touch include/config/MARKER
151         %{__make} -C %{_kernelsrcdir} clean \
152                 RCS_FIND_IGNORE="-name '*.ko' -o" \
153                 M=$PWD O=$PWD \
154                 %{?with_verbose:V=1}
155         %{__make} -C %{_kernelsrcdir} modules \
156                 M=$PWD O=$PWD \
157                 %{?with_verbose:V=1}
158         mv fglrx{,-$cfg}.ko
159 done
160 cd -
161 %endif
162
163 %if %{with userspace}
164 %{__make} -C panel_src \
165         CCFLAGS="%{rpmcflags} -DFGLRX_USE_XEXTENSIONS" \
166         MK_QTDIR=/usr \
167         LIBQT_DYN=qt-mt
168 %endif
169
170 %install
171 rm -rf $RPM_BUILD_ROOT
172
173 %if %{with kernel}
174 cd lib/modules/fglrx/build_mod
175 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
176
177 install fglrx-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
178         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/fglrx.ko
179 %if %{with smp} && %{with dist_kernel}
180 install fglrx-smp.ko \
181         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/fglrx.ko
182 %endif
183 cd -
184 %endif
185
186 %if %{with userspace}
187 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/X11/extensions} \
188         $RPM_BUILD_ROOT/usr/{%{_lib},include/GL}
189
190 install usr/X11R6/bin/{fgl_glxgears,fglrxconfig,fglrxinfo} \
191         $RPM_BUILD_ROOT%{_bindir}
192 install panel_src/fireglcontrol.qt3.gcc%(gcc -dumpversion) \
193         $RPM_BUILD_ROOT%{_bindir}/fireglcontrol
194 cp -r usr/X11R6/%{_lib}/* $RPM_BUILD_ROOT%{_libdir}
195
196 ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
197
198 # OpenGL ABI for Linux compatibility
199 ln -sf %{_libdir}/libGL.so.1 $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so.1
200 ln -sf %{_libdir}/libGL.so $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so
201
202 install usr/include/GL/*.h $RPM_BUILD_ROOT/usr/include/GL
203 install usr/X11R6/include/X11/extensions/*.h $RPM_BUILD_ROOT%{_includedir}/X11/extensions
204 %endif
205
206 %clean
207 rm -rf $RPM_BUILD_ROOT
208
209 %post   -p /sbin/ldconfig
210 %postun -p /sbin/ldconfig
211
212 %post   -n kernel-video-firegl
213 %depmod %{_kernel_ver}
214
215 %postun -n kernel-video-firegl
216 %depmod %{_kernel_ver}
217
218 %post   -n kernel-smp-video-firegl
219 %depmod %{_kernel_ver}smp
220
221 %postun -n kernel-smp-video-firegl
222 %depmod %{_kernel_ver}smp
223
224 %if %{with userspace}
225 %files
226 %defattr(644,root,root,755)
227 %attr(755,root,root) %{_bindir}/*
228 %attr(755,root,root) %{_libdir}/libGL.so.*.*
229 %attr(755,root,root) %{_libdir}/libGL.so
230 %attr(755,root,root) %{_libdir}/libfglrx_gamma.so.*.*
231 # Linux OpenGL ABI compatibility symlinks
232 %attr(755,root,root) /usr/%{_lib}/libGL.so.1
233 %attr(755,root,root) /usr/%{_lib}/libGL.so
234
235 %attr(755,root,root) %{_libdir}/modules/dri/fglrx_dri.so
236 %attr(755,root,root) %{_libdir}/modules/drivers/fglrx_drv.o
237 %{_libdir}/modules/linux/libfglrxdrm.a
238
239 # -devel
240 #%attr(755,root,root) %{_libdir}/libfglrx_gamma.so
241 #%{_includedir}/X11/include/libfglrx_gamma.h
242 #/usr/include/GL/glxATI.h
243
244 # -static
245 #%{_libdir}/libfglrx_gamma.a
246 %endif
247
248 %if %{with kernel}
249 %files -n kernel-video-firegl
250 %defattr(644,root,root,755)
251 /lib/modules/%{_kernel_ver}/misc/*.ko*
252
253 %if %{with smp} && %{with dist_kernel}
254 %files -n kernel-smp-video-firegl
255 %defattr(644,root,root,755)
256 /lib/modules/%{_kernel_ver}smp/misc/*.ko*
257 %endif
258 %endif
This page took 0.196475 seconds and 3 git commands to generate.