]> git.pld-linux.org Git - packages/X11-driver-firegl.git/blob - X11-driver-firegl.spec
b11e679a72f948bfe609d57ba776c466aa06c843
[packages/X11-driver-firegl.git] / X11-driver-firegl.spec
1 #
2 #
3 # TODO:
4 # fix OpenGL on AMD64
5 #
6 # Conditional build:
7 %bcond_without  dist_kernel     # without distribution kernel
8 %bcond_without  kernel          # don't build kernel modules
9 %bcond_without  smp             # don't build SMP module
10 %bcond_without  userspace       # don't build userspace tools
11 %bcond_with     verbose         # verbose build (V=1)
12
13 %define         _min_x11        6.8.0
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.8.25
19 %define         _rel    2
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:  8245afc1a5f83634ab1b906b8107cd0c
26 Source1:        http://www2.ati.com/drivers/linux/fglrx64_6_8_0-%{version}-1.x86_64.rpm
27 # Source1-md5:  4967e36a1bdf275a37251605b6a2356c
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 %{?with_dist_kernel:BuildRequires:      kernel-source >= 2.6.7}
34 BuildRequires:  rpmbuild(macros) >= 1.153
35 %{?with_userspace:BuildRequires:        qt-devel}
36 #BuildRequires: X11-devel >= %{_min_x11}        # disabled for now
37 Requires:       X11-OpenGL-core >= %{_min_x11}
38 Requires:       X11-Xserver
39 Requires:       X11-driver-firegl(kernel)
40 Requires:       X11-libs >= %{_min_x11}
41 Requires:       X11-modules >= %{_min_x11}
42 Provides:       X11-OpenGL-libGL
43 Provides:       XFree86-OpenGL-libGL
44 Obsoletes:      Mesa
45 Obsoletes:      X11-OpenGL-libGL
46 Obsoletes:      XFree86-OpenGL-libGL
47 Obsoletes:      XFree86-driver-firegl
48 ExclusiveArch:  i586 i686 athlon pentium3 pentium4 amd64
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %define         _noautoreqdep   libGL.so.1
52
53 %define         _prefix         /usr/X11R6
54 %define         _mandir         %{_prefix}/man
55 %ifarch amd64
56 %define         _libdir32       %{_prefix}/lib
57 %endif
58
59 %description
60 Display driver files for the ATI Radeon 8500, 9700, Mobility M9 and
61 the FireGL 8700/8800, E1, Z1/X1 graphics accelerators. This package
62 provides 2D display drivers and hardware accelerated OpenGL.
63
64 %description -l pl
65 Sterowniki do kart graficznych ATI Radeon 8500, 9700, Mobility M9 oraz
66 graficznych akceleratorów FireGL 8700/8800, E1, Z1/X1. Pakiet
67 dostarcza sterowniki obs³uguj±ce wy¶wietlanie 2D oraz sprzêtowo
68 akcelerowany OpenGL.
69
70 %package -n kernel-video-firegl
71 Summary:        ATI kernel module for FireGL support
72 Summary(pl):    Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
73 Release:        %{_rel}@%{_kernel_ver_str}
74 License:        ATI
75 Vendor:         ATI
76 Group:          Base/Kernel
77 %{?with_dist_kernel:%requires_releq_kernel_up}
78 Requires(post,postun):  /sbin/depmod
79 Provides:       X11-driver-firegl(kernel)
80
81 %description -n kernel-video-firegl
82 ATI kernel module for FireGL support.
83
84 %description -n kernel-video-firegl -l pl
85 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
86
87 %package -n kernel-smp-video-firegl
88 Summary:        ATI kernel module for FireGL support
89 Summary(pl):    Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
90 Release:        %{_rel}@%{_kernel_ver_str}
91 License:        ATI
92 Vendor:         ATI
93 Group:          Base/Kernel
94 %{?with_dist_kernel:%requires_releq_kernel_smp}
95 Requires(post,postun):  /sbin/depmod
96 Provides:       X11-driver-firegl(kernel)
97
98 %description -n kernel-smp-video-firegl
99 ATI kernel module for FireGL support.
100
101 %description -n kernel-smp-video-firegl -l pl
102 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
103
104 %prep
105 %setup -q -c -T
106 %ifarch amd64
107 rpm2cpio %{SOURCE1} | cpio -i -d
108 %else
109 rpm2cpio %{SOURCE0} | cpio -i -d
110 %endif
111 install -d panel_src
112 tar -xzf usr/src/ATI/fglrx_panel_sources.tgz -C panel_src
113 %patch0 -p1
114 %patch1 -p1
115 %{?with_dist_kernel:%patch2 -p1}
116
117 %build
118 %if %{with kernel}
119 cd lib/modules/fglrx/build_mod
120 cp -f 2.6.x/Makefile .
121 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
122         if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
123                 exit 1
124         fi
125         rm -rf include
126         install -d include/{linux,config}
127         ln -sf %{_kernelsrcdir}/config-$cfg .config
128         ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
129         ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
130         touch include/config/MARKER
131         %{__make} -C %{_kernelsrcdir} clean \
132                 RCS_FIND_IGNORE="-name '*.ko' -o" \
133                 M=$PWD O=$PWD \
134                 %{?with_verbose:V=1}
135         %{__make} -C %{_kernelsrcdir} modules \
136                 M=$PWD O=$PWD \
137                 %{?with_verbose:V=1}
138         mv fglrx{,-$cfg}.ko
139 done
140 cd -
141 %endif
142
143 %if %{with userspace}
144 %{__make} -C panel_src \
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 cd lib/modules/fglrx/build_mod
155 install -d $RPM_BUILD_ROOT/%{_libdir}/modules/%{_kernel_ver}{,smp}/misc
156
157 install fglrx-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
158         $RPM_BUILD_ROOT/%{_libdir}/modules/%{_kernel_ver}/misc/fglrx.ko
159 %if %{with smp} && %{with dist_kernel}
160 install fglrx-smp.ko \
161         $RPM_BUILD_ROOT/%{_libdir}/modules/%{_kernel_ver}smp/misc/fglrx.ko
162 %endif
163 cd -
164 %endif
165
166 %if %{with userspace}
167 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/X11/extensions} \
168         $RPM_BUILD_ROOT/usr/{%{_lib},include/GL}
169
170 install usr/X11R6/bin/{fgl_glxgears,fglrxconfig,fglrxinfo} \
171         $RPM_BUILD_ROOT%{_bindir}
172 install panel_src/fireglcontrol.qt3.gcc%(gcc -dumpversion) \
173         $RPM_BUILD_ROOT%{_bindir}/fireglcontrol
174 %ifarch amd64
175 cp -r usr/X11R6/lib64/* $RPM_BUILD_ROOT%{_libdir}
176 %else
177 cp -r usr/X11R6/lib/* $RPM_BUILD_ROOT%{_libdir}
178 %endif
179
180 ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
181
182 # OpenGL ABI for Linux compatibility
183 ln -sf %{_libdir}/libGL.so.1 $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so.1
184 ln -sf %{_libdir}/libGL.so $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so
185
186 install usr/include/GL/*.h $RPM_BUILD_ROOT/usr/include/GL
187 install usr/X11R6/include/X11/extensions/*.h $RPM_BUILD_ROOT%{_includedir}/X11/extensions
188 %endif
189
190 %clean
191 rm -rf $RPM_BUILD_ROOT
192
193 %post   -p /sbin/ldconfig
194 %postun -p /sbin/ldconfig
195
196 %post   -n kernel-video-firegl
197 %depmod %{_kernel_ver}
198
199 %postun -n kernel-video-firegl
200 %depmod %{_kernel_ver}
201
202 %post   -n kernel-smp-video-firegl
203 %depmod %{_kernel_ver}smp
204
205 %postun -n kernel-smp-video-firegl
206 %depmod %{_kernel_ver}smp
207
208 %if %{with userspace}
209 %files
210 %defattr(644,root,root,755)
211 %attr(755,root,root) %{_bindir}/*
212 %attr(755,root,root) %{_libdir}/libGL.so.*.*
213 %attr(755,root,root) %{_libdir}/libGL.so
214 %attr(755,root,root) %{_libdir}/libfglrx_gamma.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/fglrx_dri.so
220 %attr(755,root,root) %{_libdir}/modules/drivers/fglrx_drv.o
221 %{_libdir}/modules/linux/libfglrxdrm.a
222
223 # -devel
224 #%attr(755,root,root) %{_libdir}/libfglrx_gamma.so
225 #%{_includedir}/X11/include/libfglrx_gamma.h
226 #/usr/include/GL/glxATI.h
227
228 # -static
229 #%{_libdir}/libfglrx_gamma.a
230 %endif
231
232 %if %{with kernel}
233 %files -n kernel-video-firegl
234 %defattr(644,root,root,755)
235 /%{_libdir}/modules/%{_kernel_ver}/misc/*.ko*
236
237 %if %{with smp} && %{with dist_kernel}
238 %files -n kernel-smp-video-firegl
239 %defattr(644,root,root,755)
240 /%{_libdir}/modules/%{_kernel_ver}smp/misc/*.ko*
241 %endif
242 %endif
This page took 0.03344 seconds and 2 git commands to generate.