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