]> git.pld-linux.org Git - packages/X11-driver-firegl.git/blobdiff - X11-driver-firegl.spec
- workaround for builder automation to allow building against
[packages/X11-driver-firegl.git] / X11-driver-firegl.spec
index c339a4c5a3d32bbe0a13ba73f5649ea04a563d7c..02ea3b8e057885661c92ae811c418b136bb4e7ba 100644 (file)
@@ -6,23 +6,24 @@
 %bcond_without userspace       # don't build userspace tools
 %bcond_with    verbose         # verbose build (V=1)
 %bcond_without incall          # include all sources in srpm
-
+%bcond_with    grsec_kernel    # build for kernel-grsecurity
+#
+%if !%{with kernel}
+%undefine with_dist_kernel
+%endif
+#
+%if %{with kernel} && %{with dist_kernel} && %{with grsec_kernel}
+%define        alt_kernel      grsecurity
+%endif
+#
 %define                _min_eq_x11     1:6.9.0
 %define                _max_x11        1:7.0.0
 %define                x11ver          x690
 
-%if %{without kernel}
-%undefine with_dist_kernel
-%endif
-
 %ifarch %{ix86}
-%define                need_x86        1
-%define                need_amd64      0%{?with_incall:1}
 %define                arch_sufix      ""
 %define                arch_dir        x86
 %else
-%define                need_x86        0%{?with_incall:1}
-%define                need_amd64      1
 %define                arch_sufix      _64a
 %define                arch_dir        x86_64
 %endif
 Summary:       Linux Drivers for ATI graphics accelerators
 Summary(pl):   Sterowniki do akceleratorów graficznych ATI
 Name:          X11-driver-firegl
-Version:       8.27.10
-%define                _rel    1
+Version:       8.31.5
 Release:       %{_rel}
 License:       ATI Binary (parts are GPL)
 Group:         X11
-%if %{need_x86}
-Source0:       http://dlmdownloads.ati.com/drivers/linux/ati-driver-installer-%{version}-x86.run
-# Source0-md5: 72f69477c66d8b2d1a580c7885afa892
-%endif
-%if %{need_amd64}
-Source1:       http://dlmdownloads.ati.com/drivers/linux/64bit/ati-driver-installer-%{version}-x86_64.run
-# Source1-md5: 4cc78c0fc864fd2b3205cee5f866f3d7
-%endif
+Source0:       http://www2.ati.com/drivers/linux/ati-driver-installer-%{version}-x86.x86_64.run
+# Source0-md5: 2be14c0459373149b3fff49504713d98
 Patch0:                firegl-panel.patch
 Patch1:                firegl-panel-ugliness.patch
 Patch2:                %{name}-kh.patch
 Patch3:                %{name}-viak8t.patch
 Patch4:                %{name}-force-define-AGP.patch
-URL:           http://www.ati.com/support/drivers/linux/radeon-linux.html
+URL:           http://ati.amd.com/support/drivers/linux/linux-radeon.html
 #BuildRequires:        X11-devel >= %{_min_eq_x11}     # disabled for now
 %{?with_dist_kernel:BuildRequires:     kernel%{_alt_kernel}-module-build >= 3:2.6.14}
 %{?with_userspace:BuildRequires:       qt-devel}
-BuildRequires: rpmbuild(macros) >= 1.308
+BuildRequires: rpmbuild(macros) >= 1.330
 Requires:      X11-OpenGL-core >= %{_min_eq_x11}
 Requires:      X11-Xserver
 %{?with_kernel:Requires:       X11-driver-firegl(kernel)}
@@ -70,6 +64,8 @@ Obsoletes:    XFree86-driver-firegl
 ExclusiveArch: i586 i686 athlon pentium3 pentium4 %{x8664}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define                _ccver  %(rpm -q --qf "%{VERSION}" gcc | sed 's/\\..*//')
+
 %define                _noautoreqdep   libGL.so.1
 
 %define                _prefix         /usr/X11R6
@@ -121,16 +117,12 @@ Modu
 %prep
 %setup -q -c -T
 
-%ifarch %{x8664}
-sh %{SOURCE1} --extract .
-%else
 sh %{SOURCE0} --extract .
-%endif
 
 cp arch/%{arch_dir}/lib/modules/fglrx/build_mod/* common/lib/modules/fglrx/build_mod
 
 install -d panel_src
-tar -xzf common/usr/src/ATI/fglrx_panel_sources.tgz -C panel_src
+tar -xzf common/usr/src/ati/fglrx_panel_sources.tgz -C panel_src
 %patch0 -p1
 %patch1 -p1
 cd common
@@ -149,24 +141,7 @@ cp -r arch/%{arch_dir}%{_bindir}/* common%{_bindir}
 %if %{with kernel}
 cd common/lib/modules/fglrx/build_mod
 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
-       install -d o/include/linux
-       ln -sf %{_kernelsrcdir}/config-$cfg o/.config
-       ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
-       ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
-       %{__make} -C %{_kernelsrcdir} O=$PWD/o prepare scripts
-       %{__make} -C %{_kernelsrcdir} clean \
-               RCS_FIND_IGNORE="-name '*.ko' -o" \
-               M=$PWD O=$PWD/o \
-               %{?with_verbose:V=1}
-       %{__make} -C %{_kernelsrcdir} modules \
-               M=$PWD O=$PWD/o \
-               %{?with_verbose:V=1}
-       mv fglrx{,-$cfg}.ko
-done
+%build_kernel_modules -m fglrx GCC_VER_MAJ=%{_ccver}
 cd -
 %endif
 
@@ -183,16 +158,7 @@ cd -
 rm -rf $RPM_BUILD_ROOT
 
 %if %{with kernel}
-cd common/lib/modules/fglrx/build_mod
-install -d $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 -
+%install_kernel_modules -m common/lib/modules/fglrx/build_mod/fglrx -d misc
 %endif
 
 %if %{with userspace}
This page took 0.041433 seconds and 4 git commands to generate.