]> git.pld-linux.org Git - packages/X11-driver-firegl.git/blobdiff - X11-driver-firegl.spec
- R: fixed
[packages/X11-driver-firegl.git] / X11-driver-firegl.spec
index 8841aed6268a87c73e1630f6bcf6cd68edff43c2..f1f7a8531da5b4318e58bb4451615b75df7a3a44 100644 (file)
@@ -2,43 +2,43 @@
 # Conditional build:
 %bcond_without dist_kernel     # without distribution kernel
 %bcond_without kernel          # don't build kernel modules
+%bcond_without smp             # don't build SMP module
 %bcond_without userspace       # don't build userspace tools
-#
+%bcond_with    verbose         # verbose build (V=1)
 
 %define                _min_xfree      4.3.0
-%define                _gcc_ver        %(gcc -dumpversion)
+%define                _min_x11        6.7.0
 
 Summary:       Linux Drivers for ATI graphics accelerators
 Summary(pl):   Sterowniki do akceleratorów graficznych ATI
-Name:          XFree86-driver-firegl
-Version:       3.7.6
+Name:          X11-driver-firegl
+Version:       3.9.0
 Release:       1
 License:       ATI Binary (parts are GPL)
 Vendor:                ATI
 Group:         X11/XFree86
 Source0:       http://www2.ati.com/drivers/linux/fglrx-%{_min_xfree}-%{version}.i386.rpm
-# Source0-md5: 8538c3669fd6eab3d17c3669e2d88235
+# Source0-md5: 9f7802ee0bbdeb5172673027056e789d
 Patch0:                firegl-panel.patch
-Patch1:                XFree86-driver-firegl-kh.patch  
+Patch1:                %{name}-kh.patch
+Patch2:                %{name}-atomic.patch
 URL:           http://www.ati.com/support/drivers/linux/radeon-linux.html
 BuildRequires: cpio
-%if %{with kernel} && %{with dist_kernel}
-BuildRequires:         kernel-source >= 2.6.0
-%endif
-BuildRequires: rpm-utils
-BuildRequires: rpmbuild(macros) >= 1.118
-# not used at the moment (see commented make in panel_src)
-#BuildRequires:        XFree86-OpenGL-devel
-#BuildRequires:        qt-devel
-Requires:      XFree86-Xserver
-Requires:      XFree86-libs >= %{_min_xfree}
-Requires:      XFree86-modules >= %{_min_xfree}
+%{?with_dist_kernel:BuildRequires:     kernel-source >= 2.6.7}
+BuildRequires: rpmbuild(macros) >= 1.153
+%{?with_userspace:BuildRequires:       qt-devel}
+Requires:      X11-Xserver
+Requires:      X11-libs >= %{_min_x11}
+Requires:      X11-modules >= %{_min_x11}
 %{?with_dist_kernel:Requires:  kernel-video-firegl = %{version} }
-Provides:      XFree86-OpenGL-core = %{_min_xfree}
+Provides:      X11-OpenGL-libGL
 Provides:      XFree86-OpenGL-libGL
+Provides:      XFree86-driver-firegl
 Obsoletes:     Mesa
+Obsoletes:     X11-OpenGL-libGL
 Obsoletes:     XFree86-OpenGL-libGL
-ExclusiveArch: i586 i686 athlon
+Obsoletes:     XFree86-driver-firegl
+ExclusiveArch: i586 i686 athlon pentium3 pentium4
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _noautoreqdep   libGL.so.1.2
@@ -65,7 +65,6 @@ License:      ATI
 Vendor:                ATI
 Group:         Base/Kernel
 %{?with_dist_kernel:%requires_releq_kernel_up}
-PreReq:                modutils >= 2.3.18-2
 Requires(post,postun): /sbin/depmod
 
 %description -n kernel-video-firegl
@@ -82,7 +81,6 @@ License:      ATI
 Vendor:                ATI
 Group:         Base/Kernel
 %{?with_dist_kernel:%requires_releq_kernel_smp}
-PreReq:                modutils >= 2.3.18-2
 Requires(post,postun): /sbin/depmod
 
 %description -n kernel-smp-video-firegl
@@ -99,42 +97,61 @@ install -d panel_src
 tar -xzf usr/src/ATI/fglrx_panel_sources.tgz -C panel_src
 %patch0 -p1
 %{?with_dist_kernel:%patch1 -p1}
+%patch2 -p1
 
 %build
 %if %{with kernel}
 cd lib/modules/fglrx/build_mod
-cp make.sh make.sh.org && rm -f make.sh
-sed -e 's#gcc#%{kgcc}#g' -e 's#`id -u` -ne 0#`id -u` -ne `id -u`#g' make.sh.org > make.sh
-chmod 755 make.sh
-./make.sh \
-       SMP=1
-mv fglrx.ko fglrx-smp.ko
-./make.sh clean
-./make.sh
-cd ../../../..
+cp -f 2.6.x/Makefile .
+for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
+       if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
+               exit 1
+       fi
+       rm -rf include
+       install -d include/{linux,config}
+       ln -sf %{_kernelsrcdir}/config-$cfg .config
+       ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
+       ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
+       touch include/config/MARKER
+       %{__make} -C %{_kernelsrcdir} clean modules \
+               RCS_FIND_IGNORE="-name '*.ko' -o" \
+               M=$PWD O=$PWD \
+               %{?with_verbose:V=1}
+       mv fglrx{,-$cfg}.ko
+done
+cd -
 %endif
 
 %if %{with userspace}
-#%{__make} -C panel_src \
-#      MK_QTDIR=/usr \
-#      LIBQT_DYN=qt-mt
+%{__make} -C panel_src \
+       MK_QTDIR=/usr \
+       LIBQT_DYN=qt-mt
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %if %{with kernel}
+cd lib/modules/fglrx/build_mod
 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
-install lib/modules/fglrx/build_mod/fglrx.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
-install lib/modules/fglrx/build_mod/fglrx-smp.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc
+
+install fglrx-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
+       $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/fglrx.ko
+%if %{with smp} && %{with dist_kernel}
+install fglrx-smp.ko \
+       $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/fglrx.ko
+%endif
+cd -
 %endif
 
 %if %{with userspace}
 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/X11/extensions} \
        $RPM_BUILD_ROOT/usr/{%{_lib},include/GL}
 
-install usr/X11R6/bin/{fgl_glxgears,fglrxconfig,fglrxinfo} $RPM_BUILD_ROOT%{_bindir}
-#install panel_src/{fireglcontrol.qt3.gcc%{_gcc_ver},fireglcontrol} $RPM_BUILD_ROOT%{_bindir}
+install usr/X11R6/bin/{fgl_glxgears,fglrxconfig,fglrxinfo} \
+       $RPM_BUILD_ROOT%{_bindir}
+install panel_src/fireglcontrol.qt3.gcc%(gcc -dumpversion) \
+       $RPM_BUILD_ROOT%{_bindir}/fireglcontrol
 cp -r usr/X11R6/lib/* $RPM_BUILD_ROOT%{_libdir}
 
 ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
@@ -194,7 +211,9 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 /lib/modules/%{_kernel_ver}/misc/*.ko*
 
+%if %{with smp} && %{with dist_kernel}
 %files -n kernel-smp-video-firegl
 %defattr(644,root,root,755)
 /lib/modules/%{_kernel_ver}smp/misc/*.ko*
 %endif
+%endif
This page took 0.059655 seconds and 4 git commands to generate.