]> git.pld-linux.org Git - packages/X11-driver-firegl.git/blob - X11-driver-firegl.spec
51295d28580c111d16db5bd5523f229504474e07
[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
9 %define         _min_x11        6.8.0
10
11 %if %{without kernel}
12 %undefine with_dist_kernel
13 %endif
14
15 Summary:        Linux Drivers for ATI graphics accelerators
16 Summary(pl):    Sterowniki do akceleratorów graficznych ATI
17 Name:           X11-driver-firegl
18 Version:        8.10.19
19 %define         _rel    1
20 Release:        %{_rel}
21 License:        ATI Binary (parts are GPL)
22 Vendor:         ATI
23 Group:          X11/XFree86
24 Source0:        http://www2.ati.com/drivers/linux/fglrx_6_8_0-%{version}-1.i386.rpm
25 # Source0-md5:  a3ddb544071b1878ed19984c60623346
26 Source1:        http://www2.ati.com/drivers/linux/fglrx64_6_8_0-%{version}-1.x86_64.rpm
27 # Source1-md5:  ca724fda36ecf6c8a60a74e3a1528829
28 Patch0:         firegl-panel.patch
29 Patch1:         firegl-panel-ugliness.patch
30 Patch2:         %{name}-kh.patch
31 URL:            http://www.ati.com/support/drivers/linux/radeon-linux.html
32 BuildRequires:  cpio
33 BuildRequires:  sed
34 %{?with_dist_kernel:BuildRequires:      kernel-module-build >= 2.6.7}
35 BuildRequires:  rpmbuild(macros) >= 1.153
36 %{?with_userspace:BuildRequires:        qt-devel}
37 #BuildRequires: X11-devel >= %{_min_x11}        # disabled for now
38 Requires:       X11-OpenGL-core >= %{_min_x11}
39 Requires:       X11-Xserver
40 Requires:       X11-driver-firegl(kernel)
41 Requires:       X11-libs >= %{_min_x11}
42 Requires:       X11-modules >= %{_min_x11}
43 Provides:       X11-OpenGL-libGL
44 Provides:       XFree86-OpenGL-libGL
45 Obsoletes:      Mesa
46 Obsoletes:      X11-OpenGL-libGL
47 Obsoletes:      XFree86-OpenGL-libGL
48 Obsoletes:      XFree86-driver-firegl
49 ExclusiveArch:  i586 i686 athlon pentium3 pentium4 amd64
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 %define         _noautoreqdep   libGL.so.1
53
54 %define         _prefix         /usr/X11R6
55 %define         _mandir         %{_prefix}/man
56
57 %description
58 Display driver files for the ATI Radeon 8500, 9700, Mobility M9 and
59 the FireGL 8700/8800, E1, Z1/X1 graphics accelerators. This package
60 provides 2D display drivers and hardware accelerated OpenGL.
61
62 %description -l pl
63 Sterowniki do kart graficznych ATI Radeon 8500, 9700, Mobility M9 oraz
64 graficznych akceleratorów FireGL 8700/8800, E1, Z1/X1. Pakiet
65 dostarcza sterowniki obs³uguj±ce wy¶wietlanie 2D oraz sprzêtowo
66 akcelerowany OpenGL.
67
68 %package -n kernel-video-firegl
69 Summary:        ATI kernel module for FireGL support
70 Summary(pl):    Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
71 Release:        %{_rel}@%{_kernel_ver_str}
72 License:        ATI
73 Vendor:         ATI
74 Group:          Base/Kernel
75 %{?with_dist_kernel:%requires_releq_kernel_up}
76 Requires(post,postun):  /sbin/depmod
77 Provides:       X11-driver-firegl(kernel)
78
79 %description -n kernel-video-firegl
80 ATI kernel module for FireGL support.
81
82 %description -n kernel-video-firegl -l pl
83 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
84
85 %package -n kernel-smp-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 Vendor:         ATI
91 Group:          Base/Kernel
92 %{?with_dist_kernel:%requires_releq_kernel_smp}
93 Requires(post,postun):  /sbin/depmod
94 Provides:       X11-driver-firegl(kernel)
95
96 %description -n kernel-smp-video-firegl
97 ATI kernel module for FireGL support.
98
99 %description -n kernel-smp-video-firegl -l pl
100 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
101
102 %prep
103 %setup -q -c -T
104 %ifarch amd64
105 rpm2cpio %{SOURCE1} | cpio -i -d
106 %else
107 rpm2cpio %{SOURCE0} | cpio -i -d
108 %endif
109 install -d panel_src
110 tar -xzf usr/src/ATI/fglrx_panel_sources.tgz -C panel_src
111 %patch0 -p1
112 %patch1 -p1
113 %{?with_dist_kernel:%patch2 -p1}
114
115 %build
116 %if %{with kernel}
117 cd lib/modules/fglrx/build_mod
118 cp -f 2.6.x/Makefile .
119 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
120         if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
121                 exit 1
122         fi
123         rm -rf include
124         install -d include/{linux,config}
125         ln -sf %{_kernelsrcdir}/config-$cfg .config
126         ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
127         ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
128         touch include/config/MARKER
129         %{__make} -C %{_kernelsrcdir} clean \
130                 RCS_FIND_IGNORE="-name '*.ko' -o" \
131                 M=$PWD O=$PWD \
132                 %{?with_verbose:V=1}
133         %{__make} -C %{_kernelsrcdir} modules \
134                 M=$PWD O=$PWD \
135                 %{?with_verbose:V=1}
136         mv fglrx{,-$cfg}.ko
137 done
138 cd -
139 %endif
140
141 %if %{with userspace}
142 %{__make} -C panel_src \
143         CCFLAGS="%{rpmcflags} -DFGLRX_USE_XEXTENSIONS" \
144         MK_QTDIR=/usr \
145         LIBQT_DYN=qt-mt
146 %endif
147
148 %install
149 rm -rf $RPM_BUILD_ROOT
150
151 %if %{with kernel}
152 cd lib/modules/fglrx/build_mod
153 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
154
155 install fglrx-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
156         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/fglrx.ko
157 %if %{with smp} && %{with dist_kernel}
158 install fglrx-smp.ko \
159         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/fglrx.ko
160 %endif
161 cd -
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 usr/X11R6/bin/{fgl_glxgears,fglrxconfig,fglrxinfo} \
169         $RPM_BUILD_ROOT%{_bindir}
170 install panel_src/fireglcontrol.qt3.gcc%(gcc -dumpversion) \
171         $RPM_BUILD_ROOT%{_bindir}/fireglcontrol
172 cp -r usr/X11R6/%{_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 usr/include/GL/*.h $RPM_BUILD_ROOT/usr/include/GL
181 install usr/X11R6/include/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-video-firegl
191 %depmod %{_kernel_ver}
192
193 %postun -n kernel-video-firegl
194 %depmod %{_kernel_ver}
195
196 %post   -n kernel-smp-video-firegl
197 %depmod %{_kernel_ver}smp
198
199 %postun -n 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_gamma.so.*.*
209 # Linux OpenGL ABI compatibility symlinks
210 %attr(755,root,root) /usr/%{_lib}/libGL.so.1
211 %attr(755,root,root) /usr/%{_lib}/libGL.so
212
213 %attr(755,root,root) %{_libdir}/modules/dri/fglrx_dri.so
214 %attr(755,root,root) %{_libdir}/modules/drivers/fglrx_drv.o
215 %{_libdir}/modules/linux/libfglrxdrm.a
216
217 # -devel
218 #%attr(755,root,root) %{_libdir}/libfglrx_gamma.so
219 #%{_includedir}/X11/include/libfglrx_gamma.h
220 #/usr/include/GL/glxATI.h
221
222 # -static
223 #%{_libdir}/libfglrx_gamma.a
224 %endif
225
226 %if %{with kernel}
227 %files -n kernel-video-firegl
228 %defattr(644,root,root,755)
229 /lib/modules/%{_kernel_ver}/misc/*.ko*
230
231 %if %{with smp} && %{with dist_kernel}
232 %files -n kernel-smp-video-firegl
233 %defattr(644,root,root,755)
234 /lib/modules/%{_kernel_ver}smp/misc/*.ko*
235 %endif
236 %endif
This page took 0.053422 seconds and 3 git commands to generate.