]> git.pld-linux.org Git - packages/X11-driver-firegl.git/blob - X11-driver-firegl.spec
- release 3 to rebuild with fixed viak8t patch
[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 %{x8664}
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    3
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.213
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 %{x8664}
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 %{x8664}
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 %patch4 -p1
134
135 %build
136 %if %{with kernel}
137 cd lib/modules/fglrx/build_mod
138 cp -f 2.6.x/Makefile .
139 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
140         if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
141                 exit 1
142         fi
143         rm -rf include
144         install -d include/{linux,config}
145         ln -sf %{_kernelsrcdir}/config-$cfg .config
146         ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
147         ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
148 %if %{without dist_kernel}
149         ln -sf %{_kernelsrcdir}/scripts
150 %endif
151         touch include/config/MARKER
152         %{__make} -C %{_kernelsrcdir} clean \
153                 RCS_FIND_IGNORE="-name '*.ko' -o" \
154                 M=$PWD O=$PWD \
155                 %{?with_verbose:V=1}
156         %{__make} -C %{_kernelsrcdir} modules \
157                 M=$PWD O=$PWD \
158                 %{?with_verbose:V=1}
159         mv fglrx{,-$cfg}.ko
160 done
161 cd -
162 %endif
163
164 %if %{with userspace}
165 %{__make} -C panel_src \
166         CCFLAGS="%{rpmcflags} -DFGLRX_USE_XEXTENSIONS" \
167         MK_QTDIR=/usr \
168         LIBQT_DYN=qt-mt
169 %endif
170
171 %install
172 rm -rf $RPM_BUILD_ROOT
173
174 %if %{with kernel}
175 cd lib/modules/fglrx/build_mod
176 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
177
178 install fglrx-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
179         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/fglrx.ko
180 %if %{with smp} && %{with dist_kernel}
181 install fglrx-smp.ko \
182         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/fglrx.ko
183 %endif
184 cd -
185 %endif
186
187 %if %{with userspace}
188 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/X11/extensions} \
189         $RPM_BUILD_ROOT/usr/{%{_lib},include/GL}
190
191 install usr/X11R6/bin/{fgl_glxgears,fglrxconfig,fglrxinfo} \
192         $RPM_BUILD_ROOT%{_bindir}
193 install panel_src/fireglcontrol.qt3.gcc%(gcc -dumpversion) \
194         $RPM_BUILD_ROOT%{_bindir}/fireglcontrol
195 cp -r usr/X11R6/%{_lib}/* $RPM_BUILD_ROOT%{_libdir}
196
197 ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
198
199 # OpenGL ABI for Linux compatibility
200 ln -sf %{_libdir}/libGL.so.1 $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so.1
201 ln -sf %{_libdir}/libGL.so $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so
202
203 install usr/include/GL/*.h $RPM_BUILD_ROOT/usr/include/GL
204 install usr/X11R6/include/X11/extensions/*.h $RPM_BUILD_ROOT%{_includedir}/X11/extensions
205 %endif
206
207 %clean
208 rm -rf $RPM_BUILD_ROOT
209
210 %post   -p /sbin/ldconfig
211 %postun -p /sbin/ldconfig
212
213 %post   -n kernel-video-firegl
214 %depmod %{_kernel_ver}
215
216 %postun -n kernel-video-firegl
217 %depmod %{_kernel_ver}
218
219 %post   -n kernel-smp-video-firegl
220 %depmod %{_kernel_ver}smp
221
222 %postun -n kernel-smp-video-firegl
223 %depmod %{_kernel_ver}smp
224
225 %if %{with userspace}
226 %files
227 %defattr(644,root,root,755)
228 %attr(755,root,root) %{_bindir}/*
229 %attr(755,root,root) %{_libdir}/libGL.so.*.*
230 %attr(755,root,root) %{_libdir}/libGL.so
231 %attr(755,root,root) %{_libdir}/libfglrx_gamma.so.*.*
232 # Linux OpenGL ABI compatibility symlinks
233 %attr(755,root,root) /usr/%{_lib}/libGL.so.1
234 %attr(755,root,root) /usr/%{_lib}/libGL.so
235
236 %attr(755,root,root) %{_libdir}/modules/dri/fglrx_dri.so
237 %attr(755,root,root) %{_libdir}/modules/drivers/fglrx_drv.o
238 %{_libdir}/modules/linux/libfglrxdrm.a
239
240 # -devel
241 #%attr(755,root,root) %{_libdir}/libfglrx_gamma.so
242 #%{_includedir}/X11/include/libfglrx_gamma.h
243 #/usr/include/GL/glxATI.h
244
245 # -static
246 #%{_libdir}/libfglrx_gamma.a
247 %endif
248
249 %if %{with kernel}
250 %files -n kernel-video-firegl
251 %defattr(644,root,root,755)
252 /lib/modules/%{_kernel_ver}/misc/*.ko*
253
254 %if %{with smp} && %{with dist_kernel}
255 %files -n kernel-smp-video-firegl
256 %defattr(644,root,root,755)
257 /lib/modules/%{_kernel_ver}smp/misc/*.ko*
258 %endif
259 %endif
This page took 0.05268 seconds and 3 git commands to generate.