]> git.pld-linux.org Git - packages/X11-driver-firegl.git/blob - X11-driver-firegl.spec
- Version 8.36.5-1. Build on 2.6.20.2.
[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  up              # don't build UP module
6 %bcond_without  smp             # don't build SMP module
7 %bcond_without  userspace       # don't build userspace tools
8 %bcond_with     verbose         # verbose build (V=1)
9 %bcond_without  incall          # include all sources in srpm
10 %bcond_with     grsec_kernel    # build for kernel-grsecurity
11 #
12 %if !%{with kernel}
13 %undefine with_dist_kernel
14 %endif
15 #
16 %if %{with kernel} && %{with dist_kernel} && %{with grsec_kernel}
17 %define alt_kernel      grsecurity
18 %endif
19 #
20 %define         _min_eq_x11     1:6.9.0
21 %define         _max_x11        1:7.0.0
22 %define         x11ver          x690
23
24 %ifarch %{ix86}
25 %define         arch_sufix      ""
26 %define         arch_dir        x86
27 %else
28 %define         arch_sufix      _64a
29 %define         arch_dir        x86_64
30 %endif
31
32 %define         _rel    1
33 Summary:        Linux Drivers for ATI graphics accelerators
34 Summary(pl):    Sterowniki do akceleratorów graficznych ATI
35 Name:           X11-driver-firegl
36 Version:        8.36.5
37 Release:        %{_rel}
38 License:        ATI Binary (parts are GPL)
39 Group:          X11
40 Source0:        http://www2.ati.com/drivers/linux/ati-driver-installer-%{version}-x86.x86_64.run
41 # Source0-md5:  bf056417ac6c57acdf5e5a6bb99a7dae
42 Patch0:         firegl-panel.patch
43 Patch1:         firegl-panel-ugliness.patch
44 Patch2:         %{name}-kh.patch
45 Patch3:         %{name}-viak8t.patch
46 # Patch4:               %{name}-force-define-AGP.patch
47 URL:            http://ati.amd.com/support/drivers/linux/linux-radeon.html
48 #BuildRequires: X11-devel >= %{_min_eq_x11}     # disabled for now
49 %{?with_dist_kernel:BuildRequires:      kernel%{_alt_kernel}-module-build >= 3:2.6.14}
50 %{?with_userspace:BuildRequires:        qt-devel}
51 BuildRequires:  rpmbuild(macros) >= 1.330
52 Requires:       X11-OpenGL-core >= %{_min_eq_x11}
53 Requires:       X11-Xserver
54 %{?with_kernel:Requires:        X11-driver-firegl(kernel)}
55 Requires:       X11-libs < %{_max_x11}
56 Requires:       X11-libs >= %{_min_eq_x11}
57 Requires:       X11-modules < %{_max_x11}
58 Requires:       X11-modules >= %{_min_eq_x11}
59 Provides:       X11-OpenGL-libGL
60 Provides:       XFree86-OpenGL-libGL
61 Obsoletes:      Mesa
62 Obsoletes:      X11-OpenGL-libGL
63 Obsoletes:      XFree86-OpenGL-libGL
64 Obsoletes:      XFree86-driver-firegl
65 ExclusiveArch:  i586 i686 athlon pentium3 pentium4 %{x8664}
66 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67
68 %define         _ccver  %(rpm -q --qf "%{VERSION}" gcc | sed 's/\\..*//')
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%{_alt_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 Group:          Base/Kernel
92 %{?with_dist_kernel:%requires_releq_kernel_up}
93 Requires(post,postun):  /sbin/depmod
94 Provides:       X11-driver-firegl(kernel)
95
96 %description -n kernel%{_alt_kernel}-video-firegl
97 ATI kernel module for FireGL support.
98
99 %description -n kernel%{_alt_kernel}-video-firegl -l pl
100 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
101
102 %package -n kernel%{_alt_kernel}-smp-video-firegl
103 Summary:        ATI kernel module for FireGL support
104 Summary(pl):    Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
105 Release:        %{_rel}@%{_kernel_ver_str}
106 License:        ATI
107 Group:          Base/Kernel
108 %{?with_dist_kernel:%requires_releq_kernel_smp}
109 Requires(post,postun):  /sbin/depmod
110 Provides:       X11-driver-firegl(kernel)
111
112 %description -n kernel%{_alt_kernel}-smp-video-firegl
113 ATI kernel module for FireGL support.
114
115 %description -n kernel%{_alt_kernel}-smp-video-firegl -l pl
116 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
117
118 %prep
119 %setup -q -c -T
120
121 sh %{SOURCE0} --extract .
122
123 cp arch/%{arch_dir}/lib/modules/fglrx/build_mod/* common/lib/modules/fglrx/build_mod
124
125 install -d panel_src
126 tar -xzf common/usr/src/ati/fglrx_panel_sources.tgz -C panel_src
127 %patch0 -p1
128 %patch1 -p1
129 cd common
130 %{?with_dist_kernel:%patch2 -p1}
131 %patch3 -p1
132 # %patch4 -p2
133 cd -
134
135 install -d common%{_prefix}/{%{_lib},bin}
136 cp -r %{x11ver}%{arch_sufix}%{_prefix}/%{_lib}/* common%{_prefix}/%{_lib}
137 cp -r %{x11ver}%{arch_sufix}%{_bindir}/* common%{_bindir}
138 cp -r arch/%{arch_dir}%{_prefix}/%{_lib}/* common%{_prefix}/%{_lib}
139 cp -r arch/%{arch_dir}%{_bindir}/* common%{_bindir}
140
141 %build
142 %if %{with kernel}
143 cd common/lib/modules/fglrx/build_mod
144 cp -f 2.6.x/Makefile .
145 %build_kernel_modules -m fglrx GCC_VER_MAJ=%{_ccver}
146 cd -
147 %endif
148
149 %if %{with userspace}
150 %{__make} -C panel_src \
151         C="%{__cc}" \
152         CC="%{__cxx}" \
153         CCFLAGS="%{rpmcflags} -DFGLRX_USE_XEXTENSIONS" \
154         MK_QTDIR=/usr \
155         LIBQT_DYN=qt-mt
156 %endif
157
158 %install
159 rm -rf $RPM_BUILD_ROOT
160
161 %if %{with kernel}
162 %install_kernel_modules -m common/lib/modules/fglrx/build_mod/fglrx -d misc
163 %endif
164
165 %if %{with userspace}
166 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/X11/extensions} \
167         $RPM_BUILD_ROOT/usr/{%{_lib},include/GL}
168
169 install common%{_bindir}/{fgl_glxgears,fglrxinfo,aticonfig} \
170         $RPM_BUILD_ROOT%{_bindir}
171 install panel_src/fireglcontrol.qt3.gcc%(gcc -dumpversion) \
172         $RPM_BUILD_ROOT%{_bindir}/fireglcontrol
173 cp -r common%{_prefix}/%{_lib}/* $RPM_BUILD_ROOT%{_libdir}
174
175 ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
176
177 # OpenGL ABI for Linux compatibility
178 ln -sf %{_libdir}/libGL.so.1 $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so.1
179 ln -sf %{_libdir}/libGL.so $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so
180
181 install common/usr/include/GL/*.h $RPM_BUILD_ROOT/usr/include/GL
182 install common%{_includedir}/X11/extensions/*.h $RPM_BUILD_ROOT%{_includedir}/X11/extensions
183 %endif
184
185 %clean
186 rm -rf $RPM_BUILD_ROOT
187
188 %post   -p /sbin/ldconfig
189 %postun -p /sbin/ldconfig
190
191 %post   -n kernel%{_alt_kernel}-video-firegl
192 %depmod %{_kernel_ver}
193
194 %postun -n kernel%{_alt_kernel}-video-firegl
195 %depmod %{_kernel_ver}
196
197 %post   -n kernel%{_alt_kernel}-smp-video-firegl
198 %depmod %{_kernel_ver}smp
199
200 %postun -n kernel%{_alt_kernel}-smp-video-firegl
201 %depmod %{_kernel_ver}smp
202
203 %if %{with userspace}
204 %files
205 %defattr(644,root,root,755)
206 %attr(755,root,root) %{_bindir}/*
207 %attr(755,root,root) %{_libdir}/libGL.so.*.*
208 %attr(755,root,root) %{_libdir}/libGL.so
209 %attr(755,root,root) %{_libdir}/libfglrx_dm.so.*.*
210 %attr(755,root,root) %{_libdir}/libfglrx_gamma.so.*.*
211 %attr(755,root,root) %{_libdir}/libfglrx_pp.so.*.*
212 %attr(755,root,root) %{_libdir}/libfglrx_tvout.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/atiogl_a_dri.so
218 %attr(755,root,root) %{_libdir}/modules/glesx.so
219 %attr(755,root,root) %{_libdir}/modules/dri/fglrx_dri.so
220 %attr(755,root,root) %{_libdir}/modules/drivers/fglrx_drv.so
221 %attr(755,root,root) %{_libdir}/modules/linux/libfglrxdrm.so
222
223 %doc ATI_LICENSE.TXT common%{_docdir}/fglrx/*.html common%{_docdir}/fglrx/articles common%{_docdir}/fglrx/release-notes common%{_docdir}/fglrx/user-manual
224
225 # -devel
226 #%attr(755,root,root) %{_libdir}/libfglrx_gamma.so
227 #%{_includedir}/X11/include/libfglrx_gamma.h
228 #/usr/include/GL/glATI.h
229 #/usr/include/GL/glxATI.h
230
231 # -static
232 #%{_libdir}/libfglrx_gamma.a
233 #%{_libdir}/libfglrx_pp.a
234 #%{_libdir}/modules/esut.a
235 %endif
236
237 %if %{with kernel}
238 %if %{with up} || %{without dist_kernel}
239 %files -n kernel%{_alt_kernel}-video-firegl
240 %defattr(644,root,root,755)
241 /lib/modules/%{_kernel_ver}/misc/*.ko*
242 %endif
243
244 %if %{with smp} && %{with dist_kernel}
245 %files -n kernel%{_alt_kernel}-smp-video-firegl
246 %defattr(644,root,root,755)
247 /lib/modules/%{_kernel_ver}smp/misc/*.ko*
248 %endif
249 %endif
This page took 0.053243 seconds and 3 git commands to generate.