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