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