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