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