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