]> git.pld-linux.org Git - packages/X11-driver-firegl.git/blob - X11-driver-firegl.spec
- fixed _noautoreqdep (it must be SONAME, not filename)
[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 %define         _min_x11        6.7.0
11
12 Summary:        Linux Drivers for ATI graphics accelerators
13 Summary(pl):    Sterowniki do akceleratorów graficznych ATI
14 Name:           X11-driver-firegl
15 Version:        3.9.0
16 Release:        1
17 License:        ATI Binary (parts are GPL)
18 Vendor:         ATI
19 Group:          X11/XFree86
20 Source0:        http://www2.ati.com/drivers/linux/fglrx-%{_min_xfree}-%{version}.i386.rpm
21 # Source0-md5:  9f7802ee0bbdeb5172673027056e789d
22 Patch0:         firegl-panel.patch
23 Patch1:         %{name}-kh.patch
24 Patch2:         %{name}-atomic.patch
25 URL:            http://www.ati.com/support/drivers/linux/radeon-linux.html
26 BuildRequires:  cpio
27 %{?with_dist_kernel:BuildRequires:      kernel-source >= 2.6.7}
28 BuildRequires:  rpmbuild(macros) >= 1.153
29 %{?with_userspace:BuildRequires:        qt-devel}
30 Requires:       X11-Xserver
31 Requires:       X11-libs >= %{_min_x11}
32 Requires:       X11-modules >= %{_min_x11}
33 Requires:       X11-OpenGL-core >= %{_min_x11}
34 %{?with_dist_kernel:Requires:   kernel-video-firegl = %{version} }
35 Provides:       X11-OpenGL-libGL
36 Provides:       XFree86-OpenGL-libGL
37 Provides:       XFree86-driver-firegl
38 Obsoletes:      Mesa
39 Obsoletes:      X11-OpenGL-libGL
40 Obsoletes:      XFree86-OpenGL-libGL
41 Obsoletes:      XFree86-driver-firegl
42 ExclusiveArch:  i586 i686 athlon pentium3 pentium4
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %define         _noautoreqdep   libGL.so.1
46
47 %define         _prefix         /usr/X11R6
48 %define         _mandir         %{_prefix}/man
49
50 %description
51 Display driver files for the ATI Radeon 8500, 9700, Mobility M9 and
52 the FireGL 8700/8800, E1, Z1/X1 graphics accelerators. This package
53 provides 2D display drivers and hardware accelerated OpenGL.
54
55 %description -l pl
56 Sterowniki do kart graficznych ATI Radeon 8500, 9700, Mobility M9 oraz
57 graficznych akceleratorów FireGL 8700/8800, E1, Z1/X1. Pakiet
58 dostarcza sterowniki obs³uguj±ce wy¶wietlanie 2D oraz sprzêtowo
59 akcelerowany OpenGL.
60
61 %package -n kernel-video-firegl
62 Summary:        ATI kernel module for FireGL support
63 Summary(pl):    Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
64 Release:        %{release}@%{_kernel_ver_str}
65 License:        ATI
66 Vendor:         ATI
67 Group:          Base/Kernel
68 %{?with_dist_kernel:%requires_releq_kernel_up}
69 Requires(post,postun):  /sbin/depmod
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:        %{release}@%{_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
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 %patch2 -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 modules \
118                 RCS_FIND_IGNORE="-name '*.ko' -o" \
119                 M=$PWD O=$PWD \
120                 %{?with_verbose:V=1}
121         mv fglrx{,-$cfg}.ko
122 done
123 cd -
124 %endif
125
126 %if %{with userspace}
127 %{__make} -C panel_src \
128         MK_QTDIR=/usr \
129         LIBQT_DYN=qt-mt
130 %endif
131
132 %install
133 rm -rf $RPM_BUILD_ROOT
134
135 %if %{with kernel}
136 cd lib/modules/fglrx/build_mod
137 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
138
139 install fglrx-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
140         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/fglrx.ko
141 %if %{with smp} && %{with dist_kernel}
142 install fglrx-smp.ko \
143         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/fglrx.ko
144 %endif
145 cd -
146 %endif
147
148 %if %{with userspace}
149 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/X11/extensions} \
150         $RPM_BUILD_ROOT/usr/{%{_lib},include/GL}
151
152 install usr/X11R6/bin/{fgl_glxgears,fglrxconfig,fglrxinfo} \
153         $RPM_BUILD_ROOT%{_bindir}
154 install panel_src/fireglcontrol.qt3.gcc%(gcc -dumpversion) \
155         $RPM_BUILD_ROOT%{_bindir}/fireglcontrol
156 cp -r usr/X11R6/lib/* $RPM_BUILD_ROOT%{_libdir}
157
158 ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
159
160 # OpenGL ABI for Linux compatibility
161 ln -sf %{_libdir}/libGL.so.1 $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so.1
162 ln -sf %{_libdir}/libGL.so $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so
163
164 install usr/include/GL/*.h $RPM_BUILD_ROOT/usr/include/GL
165 install usr/X11R6/include/X11/extensions/*.h $RPM_BUILD_ROOT%{_includedir}/X11/extensions
166 %endif
167
168 %clean
169 rm -rf $RPM_BUILD_ROOT
170
171 %post   -p /sbin/ldconfig
172 %postun -p /sbin/ldconfig
173
174 %post   -n kernel-video-firegl
175 %depmod %{_kernel_ver}
176
177 %postun -n kernel-video-firegl
178 %depmod %{_kernel_ver}
179
180 %post   -n kernel-smp-video-firegl
181 %depmod %{_kernel_ver}smp
182
183 %postun -n kernel-smp-video-firegl
184 %depmod %{_kernel_ver}smp
185
186 %if %{with userspace}
187 %files
188 %defattr(644,root,root,755)
189 %attr(755,root,root) %{_bindir}/*
190 %attr(755,root,root) %{_libdir}/libGL.so.*.*
191 %attr(755,root,root) %{_libdir}/libGL.so
192 %attr(755,root,root) %{_libdir}/libfglrx_gamma.so.*.*
193 # Linux OpenGL ABI compatibility symlinks
194 %attr(755,root,root) /usr/%{_lib}/libGL.so.1
195 %attr(755,root,root) /usr/%{_lib}/libGL.so
196
197 %attr(755,root,root) %{_libdir}/modules/dri/fglrx_dri.so
198 %attr(755,root,root) %{_libdir}/modules/drivers/fglrx_drv.o
199 %{_libdir}/modules/linux/libfglrxdrm.a
200
201 # -devel
202 #%attr(755,root,root) %{_libdir}/libfglrx_gamma.so
203 #%{_includedir}/X11/include/libfglrx_gamma.h
204 #/usr/include/GL/glxATI.h
205
206 # -static
207 #%{_libdir}/libfglrx_gamma.a
208 %endif
209
210 %if %{with kernel}
211 %files -n kernel-video-firegl
212 %defattr(644,root,root,755)
213 /lib/modules/%{_kernel_ver}/misc/*.ko*
214
215 %if %{with smp} && %{with dist_kernel}
216 %files -n kernel-smp-video-firegl
217 %defattr(644,root,root,755)
218 /lib/modules/%{_kernel_ver}smp/misc/*.ko*
219 %endif
220 %endif
This page took 0.100737 seconds and 3 git commands to generate.