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