]> git.pld-linux.org Git - packages/X11-driver-firegl.git/blob - X11-driver-firegl.spec
- reverted
[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  userspace       # don't build userspace tools
6 #
7
8 %define         _min_xfree      4.3.0
9 %define         _gcc_ver        %(gcc -dumpversion)
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.7.0
15 Release:        2
16 License:        ATI Binary (parts are GPL)
17 Vendor:         ATI
18 Group:          X11/XFree86
19 Source0:        http://www2.ati.com/drivers/linux/fglrx-glc22-%{_min_xfree}-%{version}.i386.rpm
20 # Source0-md5:  7dd12340a2b8525b3a9fa1f310e06141
21 Patch0:         firegl-panel.patch
22 Patch1:         XFree86-driver-firegl-kh.patch  
23 URL:            http://www.ati.com/support/drivers/linux/radeon-linux.html
24 BuildRequires:  cpio
25 %if %{with kernel} && %{with dist_kernel}
26 BuildRequires:         kernel-source >= 2.6.0
27 %endif
28 BuildRequires:  rpm-utils
29 BuildRequires:  rpmbuild(macros) >= 1.118
30 # not used at the moment (see commented make in panel_src)
31 #BuildRequires: XFree86-OpenGL-devel
32 #BuildRequires: qt-devel
33 Requires:       XFree86-Xserver
34 Requires:       XFree86-libs >= %{_min_xfree}
35 Requires:       XFree86-modules >= %{_min_xfree}
36 %{?with_dist_kernel:Requires:   kernel-video-firegl = %{version} }
37 Provides:       XFree86-OpenGL-core = %{_min_xfree}
38 Provides:       XFree86-OpenGL-libGL
39 Obsoletes:      Mesa
40 Obsoletes:      XFree86-OpenGL-libGL
41 ExclusiveArch:  i586 i686 athlon
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 PreReq:         modutils >= 2.3.18-2
69 Requires(post,postun):  /sbin/depmod
70
71 %description -n kernel-video-firegl
72 ATI kernel module for FireGL support.
73
74 %description -n kernel-video-firegl -l pl
75 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
76
77 %package -n kernel-smp-video-firegl
78 Summary:        ATI kernel module for FireGL support
79 Summary(pl):    Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
80 Release:        %{release}@%{_kernel_ver_str}
81 License:        ATI
82 Vendor:         ATI
83 Group:          Base/Kernel
84 %{?with_dist_kernel:%requires_releq_kernel_smp}
85 PreReq:         modutils >= 2.3.18-2
86 Requires(post,postun):  /sbin/depmod
87
88 %description -n kernel-smp-video-firegl
89 ATI kernel module for FireGL support.
90
91 %description -n kernel-smp-video-firegl -l pl
92 Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
93
94 %prep
95 %setup -q -c -T
96 rpm2cpio %{SOURCE0} | cpio -i -d
97 bzip2 -d -v usr/X11R6/bin/*.bz2
98 install -d panel_src
99 tar -xzf usr/src/ATI/fglrx_panel_sources.tgz -C panel_src
100 %patch0 -p1
101 %{?with_dist_kernel:%patch1 -p1}
102
103 %build
104 %if %{with kernel}
105 cd lib/modules/fglrx/build_mod
106 cp make.sh make.sh.org && rm -f make.sh
107 sed -e 's#gcc#%{kgcc}#g' -e 's#`id -u` -ne 0#`id -u` -ne `id -u`#g' make.sh.org > make.sh
108 chmod 755 make.sh
109 ./make.sh \
110         SMP=1
111 mv fglrx.ko fglrx-smp.ko
112 ./make.sh clean
113 ./make.sh
114 cd ../../../..
115 %endif
116
117 %if %{with userspace}
118 #%{__make} -C panel_src \
119 #       MK_QTDIR=/usr \
120 #       LIBQT_DYN=qt-mt
121 %endif
122
123 %install
124 rm -rf $RPM_BUILD_ROOT
125
126 %if %{with kernel}
127 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
128 install lib/modules/fglrx/build_mod/fglrx.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
129 install lib/modules/fglrx/build_mod/fglrx-smp.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc
130 %endif
131
132 %if %{with userspace}
133 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/X11/extensions} \
134         $RPM_BUILD_ROOT/usr/{%{_lib},include/GL}
135
136 install usr/X11R6/bin/{fgl_glxgears,fglrxconfig,fglrxinfo} $RPM_BUILD_ROOT%{_bindir}
137 #install panel_src/{fireglcontrol.qt3.gcc%{_gcc_ver},fireglcontrol} $RPM_BUILD_ROOT%{_bindir}
138 cp -r usr/X11R6/lib/* $RPM_BUILD_ROOT%{_libdir}
139
140 ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
141
142 # OpenGL ABI for Linux compatibility
143 ln -sf %{_libdir}/libGL.so.1 $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so.1
144 ln -sf %{_libdir}/libGL.so $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so
145
146 install usr/include/GL/*.h $RPM_BUILD_ROOT/usr/include/GL
147 install usr/X11R6/include/X11/extensions/*.h $RPM_BUILD_ROOT%{_includedir}/X11/extensions
148 %endif
149
150 %clean
151 rm -rf $RPM_BUILD_ROOT
152
153 %post   -p /sbin/ldconfig
154 %postun -p /sbin/ldconfig
155
156 %post   -n kernel-video-firegl
157 %depmod %{_kernel_ver}
158
159 %postun -n kernel-video-firegl
160 %depmod %{_kernel_ver}
161
162 %post   -n kernel-smp-video-firegl
163 %depmod %{_kernel_ver}smp
164
165 %postun -n kernel-smp-video-firegl
166 %depmod %{_kernel_ver}smp
167
168 %if %{with userspace}
169 %files
170 %defattr(644,root,root,755)
171 %attr(755,root,root) %{_bindir}/*
172 %attr(755,root,root) %{_libdir}/libGL.so.*.*
173 %attr(755,root,root) %{_libdir}/libGL.so
174 %attr(755,root,root) %{_libdir}/libfglrx_gamma.so.*.*
175 # Linux OpenGL ABI compatibility symlinks
176 %attr(755,root,root) /usr/%{_lib}/libGL.so.1
177 %attr(755,root,root) /usr/%{_lib}/libGL.so
178
179 %attr(755,root,root) %{_libdir}/modules/dri/fglrx_dri.so
180 %attr(755,root,root) %{_libdir}/modules/drivers/fglrx_drv.o
181 %{_libdir}/modules/linux/libfglrxdrm.a
182
183 # -devel
184 #%attr(755,root,root) %{_libdir}/libfglrx_gamma.so
185 #%{_includedir}/X11/include/libfglrx_gamma.h
186 #/usr/include/GL/glxATI.h
187
188 # -static
189 #%{_libdir}/libfglrx_gamma.a
190 %endif
191
192 %if %{with kernel}
193 %files -n kernel-video-firegl
194 %defattr(644,root,root,755)
195 /lib/modules/%{_kernel_ver}/misc/*.ko*
196
197 %files -n kernel-smp-video-firegl
198 %defattr(644,root,root,755)
199 /lib/modules/%{_kernel_ver}smp/misc/*.ko*
200 %endif
This page took 0.050146 seconds and 4 git commands to generate.