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