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