]> git.pld-linux.org Git - packages/X11-driver-firegl.git/blame - X11-driver-firegl.spec
- up bcond
[packages/X11-driver-firegl.git] / X11-driver-firegl.spec
CommitLineData
73f83a82 1#
2# Conditional build:
65666b9f 3%bcond_without dist_kernel # without distribution kernel
56f8b0b0 4%bcond_without kernel # don't build kernel modules
ca67ef3e 5%bcond_without up # don't build UP module
de505e65 6%bcond_without smp # don't build SMP module
56f8b0b0 7%bcond_without userspace # don't build userspace tools
de505e65 8%bcond_with verbose # verbose build (V=1)
2aa20f95 9%bcond_without incall # include all sources in srpm
6cec6fba 10%bcond_with grsec_kernel # build for kernel-grsecurity
11#
9a8b5c18 12%if !%{with kernel}
37862d70 13%undefine with_dist_kernel
14%endif
6cec6fba 15#
16%if %{with kernel} && %{with dist_kernel} && %{with grsec_kernel}
17%define alt_kernel grsecurity
18%endif
19#
20%define _min_eq_x11 1:6.9.0
21%define _max_x11 1:7.0.0
22%define x11ver x690
37862d70 23
935ce2f3 24%ifarch %{ix86}
674278d1 25%define arch_sufix ""
26%define arch_dir x86
2aa20f95 27%else
42ab2c5b 28%define arch_sufix _64a
674278d1 29%define arch_dir x86_64
2aa20f95
PZ
30%endif
31
d2672a50 32%define _rel 1
73f83a82 33Summary: Linux Drivers for ATI graphics accelerators
6ec2f123 34Summary(pl.UTF-8): Sterowniki do akceleratorów graficznych ATI
21b4bb90 35Name: X11-driver-firegl
aaafd05b 36Version: 8.34.8
ec3d3e05 37Release: %{_rel}
3b871561 38License: ATI Binary (parts are GPL)
42ab2c5b 39Group: X11
d0c301b5 40Source0: http://www2.ati.com/drivers/linux/ati-driver-installer-%{version}-x86.x86_64.run
aaafd05b 41# Source0-md5: 44eda48613542b955a63bd6af2ccc6ce
54d5ebd9 42Patch0: firegl-panel.patch
44f1fe6d 43Patch1: firegl-panel-ugliness.patch
2ad3dd01 44Patch2: %{name}-kh.patch
45Patch3: %{name}-viak8t.patch
d6783586 46Patch4: %{name}-force-define-AGP.patch
8f6e06eb 47Patch5: xorg-driver-video-fglrx-2.6.20-restore_syscalls.patch
48Patch6: xorg-driver-video-fglrx-2.6.20-init_work_macro.patch
d0c301b5 49URL: http://ati.amd.com/support/drivers/linux/linux-radeon.html
42ab2c5b 50#BuildRequires: X11-devel >= %{_min_eq_x11} # disabled for now
909a7a21 51%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.14}
6ad30d21 52%{?with_userspace:BuildRequires: qt-devel}
a3a376da 53BuildRequires: rpmbuild(macros) >= 1.330
9e00e8f6 54Requires: X11-OpenGL-core >= %{_min_eq_x11}
c8bdf4d6 55Requires: X11-Xserver
2ad3dd01 56%{?with_kernel:Requires: X11-driver-firegl(kernel)}
9e00e8f6 57Requires: X11-libs < %{_max_x11}
42ab2c5b 58Requires: X11-libs >= %{_min_eq_x11}
9e00e8f6 59Requires: X11-modules < %{_max_x11}
42ab2c5b 60Requires: X11-modules >= %{_min_eq_x11}
4aa9a663 61Provides: X11-OpenGL-libGL
65666b9f 62Provides: XFree86-OpenGL-libGL
8d7b5ede 63Obsoletes: Mesa
21b4bb90 64Obsoletes: X11-OpenGL-libGL
8d7b5ede 65Obsoletes: XFree86-OpenGL-libGL
21b4bb90 66Obsoletes: XFree86-driver-firegl
06d82cec 67ExclusiveArch: i586 i686 athlon pentium3 pentium4 %{x8664}
b0e61c0f
AM
68BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69
ea373867 70%define _ccver %(rpm -q --qf "%{VERSION}" gcc | sed 's/\\..*//')
bf7a2974 71
2d2f8d91 72%define _noautoreqdep libGL.so.1
b0e61c0f 73
b0e61c0f
AM
74%define _prefix /usr/X11R6
75%define _mandir %{_prefix}/man
b0e61c0f
AM
76
77%description
77e2079e
AM
78Display driver files for the ATI Radeon 8500, 9700, Mobility M9 and
79the FireGL 8700/8800, E1, Z1/X1 graphics accelerators. This package
80provides 2D display drivers and hardware accelerated OpenGL.
b0e61c0f 81
69025518 82%description -l pl.UTF-8
77e2079e 83Sterowniki do kart graficznych ATI Radeon 8500, 9700, Mobility M9 oraz
69025518
JR
84graficznych akceleratorów FireGL 8700/8800, E1, Z1/X1. Pakiet
85dostarcza sterowniki obsługujące wyświetlanie 2D oraz sprzętowo
666ae80e 86akcelerowany OpenGL.
b0e61c0f 87
909a7a21 88%package -n kernel%{_alt_kernel}-video-firegl
b0e61c0f 89Summary: ATI kernel module for FireGL support
6ec2f123 90Summary(pl.UTF-8): Moduł jądra oferujący wsparcie dla ATI FireGL
ec3d3e05 91Release: %{_rel}@%{_kernel_ver_str}
b0e61c0f 92License: ATI
b0e61c0f 93Group: Base/Kernel
65666b9f 94%{?with_dist_kernel:%requires_releq_kernel_up}
ff402db6 95Requires(post,postun): /sbin/depmod
fa80fc8a 96Provides: X11-driver-firegl(kernel)
b0e61c0f 97
909a7a21 98%description -n kernel%{_alt_kernel}-video-firegl
b0e61c0f
AM
99ATI kernel module for FireGL support.
100
69025518
JR
101%description -n kernel%{_alt_kernel}-video-firegl -l pl.UTF-8
102Moduł jądra oferujący wsparcie dla ATI FireGL.
b0e61c0f 103
909a7a21 104%package -n kernel%{_alt_kernel}-smp-video-firegl
074bf6e3 105Summary: ATI kernel module for FireGL support
6ec2f123 106Summary(pl.UTF-8): Moduł jądra oferujący wsparcie dla ATI FireGL
ec3d3e05 107Release: %{_rel}@%{_kernel_ver_str}
074bf6e3 108License: ATI
074bf6e3 109Group: Base/Kernel
65666b9f 110%{?with_dist_kernel:%requires_releq_kernel_smp}
074bf6e3 111Requires(post,postun): /sbin/depmod
fa80fc8a 112Provides: X11-driver-firegl(kernel)
074bf6e3 113
909a7a21 114%description -n kernel%{_alt_kernel}-smp-video-firegl
074bf6e3
PG
115ATI kernel module for FireGL support.
116
69025518
JR
117%description -n kernel%{_alt_kernel}-smp-video-firegl -l pl.UTF-8
118Moduł jądra oferujący wsparcie dla ATI FireGL.
074bf6e3 119
b0e61c0f 120%prep
77e2079e 121%setup -q -c -T
42ab2c5b 122
42ab2c5b 123sh %{SOURCE0} --extract .
42ab2c5b 124
674278d1 125cp arch/%{arch_dir}/lib/modules/fglrx/build_mod/* common/lib/modules/fglrx/build_mod
42ab2c5b 126
56f8b0b0 127install -d panel_src
cbe5572b 128tar -xzf common/usr/src/ati/fglrx_panel_sources.tgz -C panel_src
54d5ebd9 129%patch0 -p1
44f1fe6d 130%patch1 -p1
42ab2c5b 131cd common
2ad3dd01 132%{?with_dist_kernel:%patch2 -p1}
133%patch3 -p1
d6783586 134%patch4 -p2
42ab2c5b 135cd -
8f6e06eb 136%patch5 -p1
137%patch6 -p1
42ab2c5b 138
139install -d common%{_prefix}/{%{_lib},bin}
8dfcd94a
AM
140cp -r %{x11ver}%{arch_sufix}%{_prefix}/%{_lib}/* common%{_prefix}/%{_lib}
141cp -r %{x11ver}%{arch_sufix}%{_bindir}/* common%{_bindir}
674278d1 142cp -r arch/%{arch_dir}%{_prefix}/%{_lib}/* common%{_prefix}/%{_lib}
143cp -r arch/%{arch_dir}%{_bindir}/* common%{_bindir}
b0e61c0f
AM
144
145%build
56f8b0b0 146%if %{with kernel}
42ab2c5b 147cd common/lib/modules/fglrx/build_mod
54eab238 148cp -f 2.6.x/Makefile .
bf7a2974 149%build_kernel_modules -m fglrx GCC_VER_MAJ=%{_ccver}
de505e65 150cd -
56f8b0b0 151%endif
123d3a2e 152
56f8b0b0 153%if %{with userspace}
c5f71a31 154%{__make} -C panel_src \
ca7c1407
KK
155 C="%{__cc}" \
156 CC="%{__cxx}" \
c5f71a31
PS
157 CCFLAGS="%{rpmcflags} -DFGLRX_USE_XEXTENSIONS" \
158 MK_QTDIR=/usr \
159 LIBQT_DYN=qt-mt
56f8b0b0 160%endif
b0e61c0f
AM
161
162%install
163rm -rf $RPM_BUILD_ROOT
b0e61c0f 164
56f8b0b0 165%if %{with kernel}
addd07ab 166%install_kernel_modules -m common/lib/modules/fglrx/build_mod/fglrx -d misc
56f8b0b0
JB
167%endif
168
169%if %{with userspace}
170install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/X11/extensions} \
171 $RPM_BUILD_ROOT/usr/{%{_lib},include/GL}
b0e61c0f 172
674278d1 173install common%{_bindir}/{fgl_glxgears,fglrxinfo,aticonfig} \
5e5f3f25 174 $RPM_BUILD_ROOT%{_bindir}
c5f71a31
PS
175install panel_src/fireglcontrol.qt3.gcc%(gcc -dumpversion) \
176 $RPM_BUILD_ROOT%{_bindir}/fireglcontrol
42ab2c5b 177cp -r common%{_prefix}/%{_lib}/* $RPM_BUILD_ROOT%{_libdir}
b0e61c0f 178
56f8b0b0
JB
179ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
180
181# OpenGL ABI for Linux compatibility
182ln -sf %{_libdir}/libGL.so.1 $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so.1
183ln -sf %{_libdir}/libGL.so $RPM_BUILD_ROOT/usr/%{_lib}/libGL.so
184
42ab2c5b 185install common/usr/include/GL/*.h $RPM_BUILD_ROOT/usr/include/GL
186install common%{_includedir}/X11/extensions/*.h $RPM_BUILD_ROOT%{_includedir}/X11/extensions
56f8b0b0 187%endif
b0e61c0f
AM
188
189%clean
190rm -rf $RPM_BUILD_ROOT
191
192%post -p /sbin/ldconfig
193%postun -p /sbin/ldconfig
194
909a7a21 195%post -n kernel%{_alt_kernel}-video-firegl
65666b9f 196%depmod %{_kernel_ver}
b0e61c0f 197
909a7a21 198%postun -n kernel%{_alt_kernel}-video-firegl
65666b9f 199%depmod %{_kernel_ver}
b0e61c0f 200
909a7a21 201%post -n kernel%{_alt_kernel}-smp-video-firegl
65666b9f 202%depmod %{_kernel_ver}smp
074bf6e3 203
909a7a21 204%postun -n kernel%{_alt_kernel}-smp-video-firegl
65666b9f 205%depmod %{_kernel_ver}smp
074bf6e3 206
56f8b0b0 207%if %{with userspace}
b0e61c0f
AM
208%files
209%defattr(644,root,root,755)
b0e61c0f 210%attr(755,root,root) %{_bindir}/*
56f8b0b0
JB
211%attr(755,root,root) %{_libdir}/libGL.so.*.*
212%attr(755,root,root) %{_libdir}/libGL.so
674278d1 213%attr(755,root,root) %{_libdir}/libfglrx_dm.so.*.*
56f8b0b0 214%attr(755,root,root) %{_libdir}/libfglrx_gamma.so.*.*
29617f5d 215%attr(755,root,root) %{_libdir}/libfglrx_pp.so.*.*
56f8b0b0
JB
216# Linux OpenGL ABI compatibility symlinks
217%attr(755,root,root) /usr/%{_lib}/libGL.so.1
218%attr(755,root,root) /usr/%{_lib}/libGL.so
219
8f6e06eb 220#attr(755,root,root) %{_libdir}/modules/dri/atiogl_a_dri.so
56f8b0b0 221%attr(755,root,root) %{_libdir}/modules/dri/fglrx_dri.so
42ab2c5b 222%attr(755,root,root) %{_libdir}/modules/drivers/fglrx_drv.so
223%attr(755,root,root) %{_libdir}/modules/linux/libfglrxdrm.so
224%doc ATI_LICENSE.TXT common%{_docdir}/fglrx/*.html common%{_docdir}/fglrx/articles common%{_docdir}/fglrx/release-notes common%{_docdir}/fglrx/user-manual
56f8b0b0
JB
225
226# -devel
227#%attr(755,root,root) %{_libdir}/libfglrx_gamma.so
228#%{_includedir}/X11/include/libfglrx_gamma.h
a5669d3a 229#/usr/include/GL/glATI.h
56f8b0b0
JB
230#/usr/include/GL/glxATI.h
231
232# -static
233#%{_libdir}/libfglrx_gamma.a
a5669d3a 234#%{_libdir}/libfglrx_pp.a
56f8b0b0
JB
235%endif
236
237%if %{with kernel}
ca67ef3e 238%if %{with up} || %{without dist_kernel}
909a7a21 239%files -n kernel%{_alt_kernel}-video-firegl
b0e61c0f 240%defattr(644,root,root,755)
c894bed3 241/lib/modules/%{_kernel_ver}/misc/*.ko*
ca67ef3e 242%endif
074bf6e3 243
bbc12abe 244%if %{with smp} && %{with dist_kernel}
909a7a21 245%files -n kernel%{_alt_kernel}-smp-video-firegl
074bf6e3 246%defattr(644,root,root,755)
c894bed3 247/lib/modules/%{_kernel_ver}smp/misc/*.ko*
56f8b0b0 248%endif
bbc12abe 249%endif
This page took 0.098291 seconds and 4 git commands to generate.