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