]> git.pld-linux.org Git - packages/X11-driver-firegl.git/blob - X11-driver-firegl.spec
623bb2d043656369cd90550ea23bcca73827ee0a
[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:       XFree86-Xserver
31 Requires:       XFree86-libs >= %{_min_x11}
32 Requires:       XFree86-modules >= %{_min_x11}
33 %{?with_dist_kernel:Requires:   kernel-video-firegl = %{version} }
34 Provides:       X11-OpenGL-libGL
35 Provides:       XFree86-OpenGL-libGL
36 Provides:       XFree86-driver-firegl
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.2
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:        %{release}@%{_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
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
86 %description -n kernel-smp-video-firegl
87 ATI kernel module for FireGL support.
88
89 %description -n kernel-smp-video-firegl -l pl
90 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
91
92 %prep
93 %setup -q -c -T
94 rpm2cpio %{SOURCE0} | cpio -i -d
95 bzip2 -d -v usr/X11R6/bin/*.bz2
96 install -d panel_src
97 tar -xzf usr/src/ATI/fglrx_panel_sources.tgz -C panel_src
98 %patch0 -p1
99 %{?with_dist_kernel:%patch1 -p1}
100 %patch2 -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 modules \
117                 RCS_FIND_IGNORE="-name '*.ko' -o" \
118                 M=$PWD O=$PWD \
119                 %{?with_verbose:V=1}
120         mv fglrx{,-$cfg}.ko
121 done
122 cd -
123 %endif
124
125 %if %{with userspace}
126 %{__make} -C panel_src \
127         MK_QTDIR=/usr \
128         LIBQT_DYN=qt-mt
129 %endif
130
131 %install
132 rm -rf $RPM_BUILD_ROOT
133
134 %if %{with kernel}
135 cd lib/modules/fglrx/build_mod
136 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
137
138 install fglrx-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
139         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/fglrx.ko
140 %if %{with smp} && %{with dist_kernel}
141 install fglrx-smp.ko \
142         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/fglrx.ko
143 %endif
144 cd -
145 %endif
146
147 %if %{with userspace}
148 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/X11/extensions} \
149         $RPM_BUILD_ROOT/usr/{%{_lib},include/GL}
150
151 install usr/X11R6/bin/{fgl_glxgears,fglrxconfig,fglrxinfo} \
152         $RPM_BUILD_ROOT%{_bindir}
153 install panel_src/fireglcontrol.qt3.gcc%(gcc -dumpversion) \
154         $RPM_BUILD_ROOT%{_bindir}/fireglcontrol
155 cp -r usr/X11R6/lib/* $RPM_BUILD_ROOT%{_libdir}
156
157 ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
158
159 # OpenGL ABI for Linux compatibility
160 ln -sf %{_libdir}/libGL.so.1 $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so.1
161 ln -sf %{_libdir}/libGL.so $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so
162
163 install usr/include/GL/*.h $RPM_BUILD_ROOT/usr/include/GL
164 install usr/X11R6/include/X11/extensions/*.h $RPM_BUILD_ROOT%{_includedir}/X11/extensions
165 %endif
166
167 %clean
168 rm -rf $RPM_BUILD_ROOT
169
170 %post   -p /sbin/ldconfig
171 %postun -p /sbin/ldconfig
172
173 %post   -n kernel-video-firegl
174 %depmod %{_kernel_ver}
175
176 %postun -n kernel-video-firegl
177 %depmod %{_kernel_ver}
178
179 %post   -n kernel-smp-video-firegl
180 %depmod %{_kernel_ver}smp
181
182 %postun -n kernel-smp-video-firegl
183 %depmod %{_kernel_ver}smp
184
185 %if %{with userspace}
186 %files
187 %defattr(644,root,root,755)
188 %attr(755,root,root) %{_bindir}/*
189 %attr(755,root,root) %{_libdir}/libGL.so.*.*
190 %attr(755,root,root) %{_libdir}/libGL.so
191 %attr(755,root,root) %{_libdir}/libfglrx_gamma.so.*.*
192 # Linux OpenGL ABI compatibility symlinks
193 %attr(755,root,root) /usr/%{_lib}/libGL.so.1
194 %attr(755,root,root) /usr/%{_lib}/libGL.so
195
196 %attr(755,root,root) %{_libdir}/modules/dri/fglrx_dri.so
197 %attr(755,root,root) %{_libdir}/modules/drivers/fglrx_drv.o
198 %{_libdir}/modules/linux/libfglrxdrm.a
199
200 # -devel
201 #%attr(755,root,root) %{_libdir}/libfglrx_gamma.so
202 #%{_includedir}/X11/include/libfglrx_gamma.h
203 #/usr/include/GL/glxATI.h
204
205 # -static
206 #%{_libdir}/libfglrx_gamma.a
207 %endif
208
209 %if %{with kernel}
210 %files -n kernel-video-firegl
211 %defattr(644,root,root,755)
212 /lib/modules/%{_kernel_ver}/misc/*.ko*
213
214 %if %{with smp} && %{with dist_kernel}
215 %files -n kernel-smp-video-firegl
216 %defattr(644,root,root,755)
217 /lib/modules/%{_kernel_ver}smp/misc/*.ko*
218 %endif
219 %endif
This page took 0.041014 seconds and 2 git commands to generate.