]> git.pld-linux.org Git - packages/X11-driver-firegl.git/blob - X11-driver-firegl.spec
- prepared for kernel >= 2.6.13: link Module.symvers
[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.16.20
31 %define         _rel    1
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:  db413c61d9d00a96c6a103fe9cf697d5
39 %endif
40 %if %{need_amd64}
41 Source1:        http://www2.ati.com/drivers/linux/64bit/fglrx64_6_8_0-%{version}-1.x86_64.rpm
42 # Source1-md5:  71524b4690b1df108c2cc5d37f945856
43 %endif
44 Patch0:         firegl-panel.patch
45 Patch1:         firegl-panel-ugliness.patch
46 Patch2:         %{name}-kh.patch
47 Patch3:         %{name}-viak8t.patch
48 URL:            http://www.ati.com/support/drivers/linux/radeon-linux.html
49 BuildRequires:  cpio
50 %{?with_dist_kernel:BuildRequires:      kernel-module-build >= 2.6.7}
51 BuildRequires:  rpmbuild(macros) >= 1.213
52 %{?with_userspace:BuildRequires:        qt-devel}
53 #BuildRequires: X11-devel >= %{_min_x11}        # disabled for now
54 Requires:       X11-OpenGL-core >= %{_min_x11}
55 Requires:       X11-Xserver
56 %{?with_kernel:Requires:        X11-driver-firegl(kernel)}
57 Requires:       X11-libs >= %{_min_x11}
58 Requires:       X11-modules >= %{_min_x11}
59 Provides:       X11-OpenGL-libGL
60 Provides:       XFree86-OpenGL-libGL
61 Obsoletes:      Mesa
62 Obsoletes:      X11-OpenGL-libGL
63 Obsoletes:      XFree86-OpenGL-libGL
64 Obsoletes:      XFree86-driver-firegl
65 ExclusiveArch:  i586 i686 athlon pentium3 pentium4 %{x8664}
66 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67
68 %define         _noautoreqdep   libGL.so.1
69
70 %define         _prefix         /usr/X11R6
71 %define         _mandir         %{_prefix}/man
72
73 %description
74 Display driver files for the ATI Radeon 8500, 9700, Mobility M9 and
75 the FireGL 8700/8800, E1, Z1/X1 graphics accelerators. This package
76 provides 2D display drivers and hardware accelerated OpenGL.
77
78 %description -l pl
79 Sterowniki do kart graficznych ATI Radeon 8500, 9700, Mobility M9 oraz
80 graficznych akceleratorów FireGL 8700/8800, E1, Z1/X1. Pakiet
81 dostarcza sterowniki obs³uguj±ce wy¶wietlanie 2D oraz sprzêtowo
82 akcelerowany OpenGL.
83
84 %package -n kernel-video-firegl
85 Summary:        ATI kernel module for FireGL support
86 Summary(pl):    Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
87 Release:        %{_rel}@%{_kernel_ver_str}
88 License:        ATI
89 Vendor:         ATI
90 Group:          Base/Kernel
91 %{?with_dist_kernel:%requires_releq_kernel_up}
92 Requires(post,postun):  /sbin/depmod
93 Provides:       X11-driver-firegl(kernel)
94
95 %description -n kernel-video-firegl
96 ATI kernel module for FireGL support.
97
98 %description -n kernel-video-firegl -l pl
99 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
100
101 %package -n kernel-smp-video-firegl
102 Summary:        ATI kernel module for FireGL support
103 Summary(pl):    Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
104 Release:        %{_rel}@%{_kernel_ver_str}
105 License:        ATI
106 Vendor:         ATI
107 Group:          Base/Kernel
108 %{?with_dist_kernel:%requires_releq_kernel_smp}
109 Requires(post,postun):  /sbin/depmod
110 Provides:       X11-driver-firegl(kernel)
111
112 %description -n kernel-smp-video-firegl
113 ATI kernel module for FireGL support.
114
115 %description -n kernel-smp-video-firegl -l pl
116 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
117
118 %prep
119 %setup -q -c -T
120 %ifarch %{x8664}
121 rpm2cpio %{SOURCE1} | cpio -i -d
122 %else
123 rpm2cpio %{SOURCE0} | cpio -i -d
124 %endif
125 install -d panel_src
126 tar -xzf usr/src/ATI/fglrx_panel_sources.tgz -C panel_src
127
128 %patch0 -p1
129 %patch1 -p1
130 %{?with_dist_kernel:%patch2 -p1}
131 %patch3 -p1
132
133 %build
134 %if %{with kernel}
135 cd lib/modules/fglrx/build_mod
136 cp -f 2.6.x/Makefile .
137 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
138         if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
139                 exit 1
140         fi
141         rm -rf include
142         install -d include/{linux,config}
143         ln -sf %{_kernelsrcdir}/config-$cfg .config
144         ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
145         ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
146         ln -sf %{_kernelsrcdir}/Module.symvers-$cfg Module.symvers
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/atiogl_a_dri.so
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.077194 seconds and 3 git commands to generate.