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