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