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