]> git.pld-linux.org Git - packages/X11-driver-firegl.git/blob - X11-driver-firegl.spec
- escape '\'
[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_eq_x11     1:6.9.0
11 %define         _max_x11        1:7.0.0
12 %define         x11ver          x690
13
14 %if !%{with kernel}
15 %undefine with_dist_kernel
16 %endif
17
18 %ifarch %{ix86}
19 %define         arch_sufix      ""
20 %define         arch_dir        x86
21 %else
22 %define         arch_sufix      _64a
23 %define         arch_dir        x86_64
24 %endif
25
26 %define         _rel    0.2
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.30.3
31 Release:        %{_rel}
32 License:        ATI Binary (parts are GPL)
33 Group:          X11
34 Source0:        http://dlmdownloads.ati.com/drivers/linux/ati-driver-installer-%{version}.run
35 # Source0-md5:  058990a8e7cb57c670d423adfd7bfc00
36 Patch0:         firegl-panel.patch
37 Patch1:         firegl-panel-ugliness.patch
38 Patch2:         %{name}-kh.patch
39 Patch3:         %{name}-viak8t.patch
40 Patch4:         %{name}-force-define-AGP.patch
41 URL:            http://www.ati.com/support/drivers/linux/radeon-linux.html
42 #BuildRequires: X11-devel >= %{_min_eq_x11}     # disabled for now
43 %{?with_dist_kernel:BuildRequires:      kernel%{_alt_kernel}-module-build >= 3:2.6.14}
44 %{?with_userspace:BuildRequires:        qt-devel}
45 BuildRequires:  rpmbuild(macros) >= 1.330
46 Requires:       X11-OpenGL-core >= %{_min_eq_x11}
47 Requires:       X11-Xserver
48 %{?with_kernel:Requires:        X11-driver-firegl(kernel)}
49 Requires:       X11-libs < %{_max_x11}
50 Requires:       X11-libs >= %{_min_eq_x11}
51 Requires:       X11-modules < %{_max_x11}
52 Requires:       X11-modules >= %{_min_eq_x11}
53 Provides:       X11-OpenGL-libGL
54 Provides:       XFree86-OpenGL-libGL
55 Obsoletes:      Mesa
56 Obsoletes:      X11-OpenGL-libGL
57 Obsoletes:      XFree86-OpenGL-libGL
58 Obsoletes:      XFree86-driver-firegl
59 ExclusiveArch:  i586 i686 athlon pentium3 pentium4 %{x8664}
60 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61
62 %define         _ccver  %(rpm -q --qf "%{VERSION}" gcc | sed 's/\\..*//')
63
64 %define         _noautoreqdep   libGL.so.1
65
66 %define         _prefix         /usr/X11R6
67 %define         _mandir         %{_prefix}/man
68
69 %description
70 Display driver files for the ATI Radeon 8500, 9700, Mobility M9 and
71 the FireGL 8700/8800, E1, Z1/X1 graphics accelerators. This package
72 provides 2D display drivers and hardware accelerated OpenGL.
73
74 %description -l pl
75 Sterowniki do kart graficznych ATI Radeon 8500, 9700, Mobility M9 oraz
76 graficznych akceleratorów FireGL 8700/8800, E1, Z1/X1. Pakiet
77 dostarcza sterowniki obs³uguj±ce wy¶wietlanie 2D oraz sprzêtowo
78 akcelerowany OpenGL.
79
80 %package -n kernel%{_alt_kernel}-video-firegl
81 Summary:        ATI kernel module for FireGL support
82 Summary(pl):    Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
83 Release:        %{_rel}@%{_kernel_ver_str}
84 License:        ATI
85 Group:          Base/Kernel
86 %{?with_dist_kernel:%requires_releq_kernel_up}
87 Requires(post,postun):  /sbin/depmod
88 Provides:       X11-driver-firegl(kernel)
89
90 %description -n kernel%{_alt_kernel}-video-firegl
91 ATI kernel module for FireGL support.
92
93 %description -n kernel%{_alt_kernel}-video-firegl -l pl
94 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
95
96 %package -n kernel%{_alt_kernel}-smp-video-firegl
97 Summary:        ATI kernel module for FireGL support
98 Summary(pl):    Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
99 Release:        %{_rel}@%{_kernel_ver_str}
100 License:        ATI
101 Group:          Base/Kernel
102 %{?with_dist_kernel:%requires_releq_kernel_smp}
103 Requires(post,postun):  /sbin/depmod
104 Provides:       X11-driver-firegl(kernel)
105
106 %description -n kernel%{_alt_kernel}-smp-video-firegl
107 ATI kernel module for FireGL support.
108
109 %description -n kernel%{_alt_kernel}-smp-video-firegl -l pl
110 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
111
112 %prep
113 %setup -q -c -T
114
115 sh %{SOURCE0} --extract .
116
117 cp arch/%{arch_dir}/lib/modules/fglrx/build_mod/* common/lib/modules/fglrx/build_mod
118
119 install -d panel_src
120 tar -xzf common/usr/src/ati/fglrx_panel_sources.tgz -C panel_src
121 %patch0 -p1
122 %patch1 -p1
123 cd common
124 %{?with_dist_kernel:%patch2 -p1}
125 %patch3 -p1
126 %patch4 -p2
127 cd -
128
129 install -d common%{_prefix}/{%{_lib},bin}
130 cp -r %{x11ver}%{arch_sufix}%{_prefix}/%{_lib}/* common%{_prefix}/%{_lib}
131 cp -r %{x11ver}%{arch_sufix}%{_bindir}/* common%{_bindir}
132 cp -r arch/%{arch_dir}%{_prefix}/%{_lib}/* common%{_prefix}/%{_lib}
133 cp -r arch/%{arch_dir}%{_bindir}/* common%{_bindir}
134
135 %build
136 %if %{with kernel}
137 cd common/lib/modules/fglrx/build_mod
138 cp -f 2.6.x/Makefile .
139 %build_kernel_modules -m fglrx GCC_VER_MAJ=%{_ccver}
140 cd -
141 %endif
142
143 %if %{with userspace}
144 %{__make} -C panel_src \
145         C="%{__cc}" \
146         CC="%{__cxx}" \
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 %install_kernel_modules -m common/lib/modules/fglrx/build_mod/fglrx -d misc
157 %endif
158
159 %if %{with userspace}
160 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/X11/extensions} \
161         $RPM_BUILD_ROOT/usr/{%{_lib},include/GL}
162
163 install common%{_bindir}/{fgl_glxgears,fglrxinfo,aticonfig} \
164         $RPM_BUILD_ROOT%{_bindir}
165 install panel_src/fireglcontrol.qt3.gcc%(gcc -dumpversion) \
166         $RPM_BUILD_ROOT%{_bindir}/fireglcontrol
167 cp -r common%{_prefix}/%{_lib}/* $RPM_BUILD_ROOT%{_libdir}
168
169 ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
170
171 # OpenGL ABI for Linux compatibility
172 ln -sf %{_libdir}/libGL.so.1 $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so.1
173 ln -sf %{_libdir}/libGL.so $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so
174
175 install common/usr/include/GL/*.h $RPM_BUILD_ROOT/usr/include/GL
176 install common%{_includedir}/X11/extensions/*.h $RPM_BUILD_ROOT%{_includedir}/X11/extensions
177 %endif
178
179 %clean
180 rm -rf $RPM_BUILD_ROOT
181
182 %post   -p /sbin/ldconfig
183 %postun -p /sbin/ldconfig
184
185 %post   -n kernel%{_alt_kernel}-video-firegl
186 %depmod %{_kernel_ver}
187
188 %postun -n kernel%{_alt_kernel}-video-firegl
189 %depmod %{_kernel_ver}
190
191 %post   -n kernel%{_alt_kernel}-smp-video-firegl
192 %depmod %{_kernel_ver}smp
193
194 %postun -n kernel%{_alt_kernel}-smp-video-firegl
195 %depmod %{_kernel_ver}smp
196
197 %if %{with userspace}
198 %files
199 %defattr(644,root,root,755)
200 %attr(755,root,root) %{_bindir}/*
201 %attr(755,root,root) %{_libdir}/libGL.so.*.*
202 %attr(755,root,root) %{_libdir}/libGL.so
203 %attr(755,root,root) %{_libdir}/libfglrx_dm.so.*.*
204 %attr(755,root,root) %{_libdir}/libfglrx_gamma.so.*.*
205 %attr(755,root,root) %{_libdir}/libfglrx_pp.so.*.*
206 # Linux OpenGL ABI compatibility symlinks
207 %attr(755,root,root) /usr/%{_lib}/libGL.so.1
208 %attr(755,root,root) /usr/%{_lib}/libGL.so
209
210 %attr(755,root,root) %{_libdir}/modules/dri/atiogl_a_dri.so
211 %attr(755,root,root) %{_libdir}/modules/dri/fglrx_dri.so
212 %attr(755,root,root) %{_libdir}/modules/drivers/fglrx_drv.so
213 %attr(755,root,root) %{_libdir}/modules/linux/libfglrxdrm.so
214 %doc ATI_LICENSE.TXT common%{_docdir}/fglrx/*.html common%{_docdir}/fglrx/articles common%{_docdir}/fglrx/release-notes common%{_docdir}/fglrx/user-manual
215
216 # -devel
217 #%attr(755,root,root) %{_libdir}/libfglrx_gamma.so
218 #%{_includedir}/X11/include/libfglrx_gamma.h
219 #/usr/include/GL/glATI.h
220 #/usr/include/GL/glxATI.h
221
222 # -static
223 #%{_libdir}/libfglrx_gamma.a
224 #%{_libdir}/libfglrx_pp.a
225 %endif
226
227 %if %{with kernel}
228 %files -n kernel%{_alt_kernel}-video-firegl
229 %defattr(644,root,root,755)
230 /lib/modules/%{_kernel_ver}/misc/*.ko*
231
232 %if %{with smp} && %{with dist_kernel}
233 %files -n kernel%{_alt_kernel}-smp-video-firegl
234 %defattr(644,root,root,755)
235 /lib/modules/%{_kernel_ver}smp/misc/*.ko*
236 %endif
237 %endif
This page took 0.064309 seconds and 3 git commands to generate.