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