]> git.pld-linux.org Git - packages/X11-driver-firegl.git/blob - X11-driver-firegl.spec
- updated to 3.14.6
[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.14.6
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:  cd364b6fd6d7b23b3becfe78aab0f98b
22 Patch0:         firegl-panel.patch
23 Patch1:         firegl-panel-ugliness.patch
24 Patch2:         %{name}-kh.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 #BuildRequires: X11-devel >= %{_min_x11}        # disabled for now
31 Requires:       X11-OpenGL-core >= %{_min_x11}
32 Requires:       X11-Xserver
33 Requires:       X11-driver-firegl(kernel)
34 Requires:       X11-libs >= %{_min_x11}
35 Requires:       X11-modules >= %{_min_x11}
36 Provides:       X11-OpenGL-libGL
37 Provides:       XFree86-OpenGL-libGL
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:        %{_rel}@%{_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 Provides:       X11-driver-firegl(kernel)
71
72 %description -n kernel-video-firegl
73 ATI kernel module for FireGL support.
74
75 %description -n kernel-video-firegl -l pl
76 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
77
78 %package -n kernel-smp-video-firegl
79 Summary:        ATI kernel module for FireGL support
80 Summary(pl):    Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
81 Release:        %{_rel}@%{_kernel_ver_str}
82 License:        ATI
83 Vendor:         ATI
84 Group:          Base/Kernel
85 %{?with_dist_kernel:%requires_releq_kernel_smp}
86 Requires(post,postun):  /sbin/depmod
87 Provides:       X11-driver-firegl(kernel)
88
89 %description -n kernel-smp-video-firegl
90 ATI kernel module for FireGL support.
91
92 %description -n kernel-smp-video-firegl -l pl
93 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
94
95 %prep
96 %setup -q -c -T
97 rpm2cpio %{SOURCE0} | cpio -i -d
98 install -d panel_src
99 tar -xzf usr/src/ATI/fglrx_panel_sources.tgz -C panel_src
100 %patch0 -p1
101 %patch1 -p1
102 %{?with_dist_kernel:%patch2 -p1}
103
104 %build
105 %if %{with kernel}
106 cd lib/modules/fglrx/build_mod
107 cp -f 2.6.x/Makefile .
108 for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
109         if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
110                 exit 1
111         fi
112         rm -rf include
113         install -d include/{linux,config}
114         ln -sf %{_kernelsrcdir}/config-$cfg .config
115         ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
116         ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
117         touch include/config/MARKER
118         %{__make} -C %{_kernelsrcdir} clean \
119                 RCS_FIND_IGNORE="-name '*.ko' -o" \
120                 M=$PWD O=$PWD \
121                 %{?with_verbose:V=1}
122         %{__make} -C %{_kernelsrcdir} modules \
123                 M=$PWD O=$PWD \
124                 %{?with_verbose:V=1}
125         mv fglrx{,-$cfg}.ko
126 done
127 cd -
128 %endif
129
130 %if %{with userspace}
131 %{__make} -C panel_src \
132         CCFLAGS="%{rpmcflags} -DFGLRX_USE_XEXTENSIONS" \
133         MK_QTDIR=/usr \
134         LIBQT_DYN=qt-mt
135 %endif
136
137 %install
138 rm -rf $RPM_BUILD_ROOT
139
140 %if %{with kernel}
141 cd lib/modules/fglrx/build_mod
142 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
143
144 install fglrx-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
145         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/fglrx.ko
146 %if %{with smp} && %{with dist_kernel}
147 install fglrx-smp.ko \
148         $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/fglrx.ko
149 %endif
150 cd -
151 %endif
152
153 %if %{with userspace}
154 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/X11/extensions} \
155         $RPM_BUILD_ROOT/usr/{%{_lib},include/GL}
156
157 install usr/X11R6/bin/{fgl_glxgears,fglrxconfig,fglrxinfo} \
158         $RPM_BUILD_ROOT%{_bindir}
159 install panel_src/fireglcontrol.qt3.gcc%(gcc -dumpversion) \
160         $RPM_BUILD_ROOT%{_bindir}/fireglcontrol
161 cp -r usr/X11R6/lib/* $RPM_BUILD_ROOT%{_libdir}
162
163 ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
164
165 # OpenGL ABI for Linux compatibility
166 ln -sf %{_libdir}/libGL.so.1 $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so.1
167 ln -sf %{_libdir}/libGL.so $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so
168
169 install usr/include/GL/*.h $RPM_BUILD_ROOT/usr/include/GL
170 install usr/X11R6/include/X11/extensions/*.h $RPM_BUILD_ROOT%{_includedir}/X11/extensions
171 %endif
172
173 %clean
174 rm -rf $RPM_BUILD_ROOT
175
176 %post   -p /sbin/ldconfig
177 %postun -p /sbin/ldconfig
178
179 %post   -n kernel-video-firegl
180 %depmod %{_kernel_ver}
181
182 %postun -n kernel-video-firegl
183 %depmod %{_kernel_ver}
184
185 %post   -n kernel-smp-video-firegl
186 %depmod %{_kernel_ver}smp
187
188 %postun -n kernel-smp-video-firegl
189 %depmod %{_kernel_ver}smp
190
191 %if %{with userspace}
192 %files
193 %defattr(644,root,root,755)
194 %attr(755,root,root) %{_bindir}/*
195 %attr(755,root,root) %{_libdir}/libGL.so.*.*
196 %attr(755,root,root) %{_libdir}/libGL.so
197 %attr(755,root,root) %{_libdir}/libfglrx_gamma.so.*.*
198 # Linux OpenGL ABI compatibility symlinks
199 %attr(755,root,root) /usr/%{_lib}/libGL.so.1
200 %attr(755,root,root) /usr/%{_lib}/libGL.so
201
202 %attr(755,root,root) %{_libdir}/modules/dri/fglrx_dri.so
203 %attr(755,root,root) %{_libdir}/modules/drivers/fglrx_drv.o
204 %{_libdir}/modules/linux/libfglrxdrm.a
205
206 # -devel
207 #%attr(755,root,root) %{_libdir}/libfglrx_gamma.so
208 #%{_includedir}/X11/include/libfglrx_gamma.h
209 #/usr/include/GL/glxATI.h
210
211 # -static
212 #%{_libdir}/libfglrx_gamma.a
213 %endif
214
215 %if %{with kernel}
216 %files -n kernel-video-firegl
217 %defattr(644,root,root,755)
218 /lib/modules/%{_kernel_ver}/misc/*.ko*
219
220 %if %{with smp} && %{with dist_kernel}
221 %files -n kernel-smp-video-firegl
222 %defattr(644,root,root,755)
223 /lib/modules/%{_kernel_ver}smp/misc/*.ko*
224 %endif
225 %endif
This page took 0.76292 seconds and 3 git commands to generate.