]> git.pld-linux.org Git - packages/X11-driver-firegl.git/blob - X11-driver-firegl.spec
- sources per arch - less to download
[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    1
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}-kh.patch
35 URL:            http://www.ati.com/support/drivers/linux/radeon-linux.html
36 BuildRequires:  cpio
37 BuildRequires:  sed
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 %patch0 -p1
116 %patch1 -p1
117 %{?with_dist_kernel:%patch2 -p1}
118
119 %build
120 %if %{with kernel}
121 cd lib/modules/fglrx/build_mod
122 cp -f 2.6.x/Makefile .
123 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
124         if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
125                 exit 1
126         fi
127         rm -rf include
128         install -d include/{linux,config}
129         ln -sf %{_kernelsrcdir}/config-$cfg .config
130         ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
131         ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
132         touch include/config/MARKER
133         %{__make} -C %{_kernelsrcdir} clean \
134                 RCS_FIND_IGNORE="-name '*.ko' -o" \
135                 M=$PWD O=$PWD \
136                 %{?with_verbose:V=1}
137         %{__make} -C %{_kernelsrcdir} modules \
138                 M=$PWD O=$PWD \
139                 %{?with_verbose:V=1}
140         mv fglrx{,-$cfg}.ko
141 done
142 cd -
143 %endif
144
145 %if %{with userspace}
146 %{__make} -C panel_src \
147         CCFLAGS="%{rpmcflags} -DFGLRX_USE_XEXTENSIONS" \
148         MK_QTDIR=/usr \
149         LIBQT_DYN=qt-mt
150 %endif
151
152 %install
153 rm -rf $RPM_BUILD_ROOT
154
155 %if %{with kernel}
156 cd lib/modules/fglrx/build_mod
157 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
158
159 install fglrx-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
160         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/fglrx.ko
161 %if %{with smp} && %{with dist_kernel}
162 install fglrx-smp.ko \
163         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/fglrx.ko
164 %endif
165 cd -
166 %endif
167
168 %if %{with userspace}
169 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/X11/extensions} \
170         $RPM_BUILD_ROOT/usr/{%{_lib},include/GL}
171
172 install usr/X11R6/bin/{fgl_glxgears,fglrxconfig,fglrxinfo} \
173         $RPM_BUILD_ROOT%{_bindir}
174 install panel_src/fireglcontrol.qt3.gcc%(gcc -dumpversion) \
175         $RPM_BUILD_ROOT%{_bindir}/fireglcontrol
176 cp -r usr/X11R6/%{_lib}/* $RPM_BUILD_ROOT%{_libdir}
177
178 ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
179
180 # OpenGL ABI for Linux compatibility
181 ln -sf %{_libdir}/libGL.so.1 $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so.1
182 ln -sf %{_libdir}/libGL.so $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so
183
184 install usr/include/GL/*.h $RPM_BUILD_ROOT/usr/include/GL
185 install usr/X11R6/include/X11/extensions/*.h $RPM_BUILD_ROOT%{_includedir}/X11/extensions
186 %endif
187
188 %clean
189 rm -rf $RPM_BUILD_ROOT
190
191 %post   -p /sbin/ldconfig
192 %postun -p /sbin/ldconfig
193
194 %post   -n kernel-video-firegl
195 %depmod %{_kernel_ver}
196
197 %postun -n kernel-video-firegl
198 %depmod %{_kernel_ver}
199
200 %post   -n kernel-smp-video-firegl
201 %depmod %{_kernel_ver}smp
202
203 %postun -n kernel-smp-video-firegl
204 %depmod %{_kernel_ver}smp
205
206 %if %{with userspace}
207 %files
208 %defattr(644,root,root,755)
209 %attr(755,root,root) %{_bindir}/*
210 %attr(755,root,root) %{_libdir}/libGL.so.*.*
211 %attr(755,root,root) %{_libdir}/libGL.so
212 %attr(755,root,root) %{_libdir}/libfglrx_gamma.so.*.*
213 # Linux OpenGL ABI compatibility symlinks
214 %attr(755,root,root) /usr/%{_lib}/libGL.so.1
215 %attr(755,root,root) /usr/%{_lib}/libGL.so
216
217 %attr(755,root,root) %{_libdir}/modules/dri/fglrx_dri.so
218 %attr(755,root,root) %{_libdir}/modules/drivers/fglrx_drv.o
219 %{_libdir}/modules/linux/libfglrxdrm.a
220
221 # -devel
222 #%attr(755,root,root) %{_libdir}/libfglrx_gamma.so
223 #%{_includedir}/X11/include/libfglrx_gamma.h
224 #/usr/include/GL/glxATI.h
225
226 # -static
227 #%{_libdir}/libfglrx_gamma.a
228 %endif
229
230 %if %{with kernel}
231 %files -n kernel-video-firegl
232 %defattr(644,root,root,755)
233 /lib/modules/%{_kernel_ver}/misc/*.ko*
234
235 %if %{with smp} && %{with dist_kernel}
236 %files -n kernel-smp-video-firegl
237 %defattr(644,root,root,755)
238 /lib/modules/%{_kernel_ver}smp/misc/*.ko*
239 %endif
240 %endif
This page took 0.121835 seconds and 3 git commands to generate.