]> git.pld-linux.org Git - packages/X11-driver-firegl.git/blobdiff - X11-driver-firegl.spec
- tabs in preamble
[packages/X11-driver-firegl.git] / X11-driver-firegl.spec
index 3d55fbeb268c70b9be2ea094955ffe18ce71417e..e456cb520e946a616db225cc3b99529e555bd615 100644 (file)
@@ -6,56 +6,48 @@
 %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                arch_sufix      ""
+%define                arch_dir        x86
 %else
-%define                need_x86        0%{?with_incall:1}
-%endif
-%ifarch %{x8664}
-%define                need_amd64      1
 %define                arch_sufix      _64a
-%else
-%define                need_amd64      0%{?with_incall:1}
-%define                arch_sufix      ""
+%define                arch_dir        x86_64
 %endif
 
+%define                _rel    1
 Summary:       Linux Drivers for ATI graphics accelerators
-Summary(pl):   Sterowniki do akceleratorów graficznych ATI
+Summary(pl.UTF-8):     Sterowniki do akceleratorów graficznych ATI
 Name:          X11-driver-firegl
-Version:       8.20.8
-%define                _rel    3
+Version:       8.33.6
 Release:       %{_rel}
 License:       ATI Binary (parts are GPL)
-Vendor:                ATI
 Group:         X11
-%if %{need_x86}
-Source0:       http://dlmdownloads.ati.com/drivers/linux/ati-driver-installer-%{version}-i386.run
-# Source0-md5: d3cd0788936d57c2b6734449c66987f8
-%endif
-%if %{need_amd64}
-Source1:       http://dlmdownloads.ati.com/drivers/linux/64bit/ati-driver-installer-%{version}-x86_64.run
-# Source1-md5: 1ffc8dfe93db24fa18f3dd387e20bbcd
-%endif
-Source2:       %{name}-fglrx_pp_proto.h
+Source0:       http://www2.ati.com/drivers/linux/ati-driver-installer-%{version}-x86.x86_64.run
+# Source0-md5: 5fbd42d666d467a904acbaeb600c1d5a
 Patch0:                firegl-panel.patch
 Patch1:                firegl-panel-ugliness.patch
 Patch2:                %{name}-kh.patch
 Patch3:                %{name}-viak8t.patch
-URL:           http://www.ati.com/support/drivers/linux/radeon-linux.html
+Patch4:                %{name}-force-define-AGP.patch
+URL:           http://ati.amd.com/support/drivers/linux/linux-radeon.html
 #BuildRequires:        X11-devel >= %{_min_eq_x11}     # disabled for now
-BuildRequires: cpio
-%{?with_dist_kernel:BuildRequires:     kernel-module-build >= 2.6.14}
+%{?with_dist_kernel:BuildRequires:     kernel%{_alt_kernel}-module-build >= 3:2.6.14}
 %{?with_userspace:BuildRequires:       qt-devel}
-BuildRequires: rpmbuild(macros) >= 1.213
+BuildRequires: rpmbuild(macros) >= 1.330
 Requires:      X11-OpenGL-core >= %{_min_eq_x11}
 Requires:      X11-Xserver
 %{?with_kernel:Requires:       X11-driver-firegl(kernel)}
@@ -72,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
@@ -82,98 +76,72 @@ Display driver files for the ATI Radeon 8500, 9700, Mobility M9 and
 the FireGL 8700/8800, E1, Z1/X1 graphics accelerators. This package
 provides 2D display drivers and hardware accelerated OpenGL.
 
-%description -l pl
+%description -l pl.UTF-8
 Sterowniki do kart graficznych ATI Radeon 8500, 9700, Mobility M9 oraz
-graficznych akceleratorów FireGL 8700/8800, E1, Z1/X1. Pakiet
-dostarcza sterowniki obs³uguj±ce wy¶wietlanie 2D oraz sprzêtowo
+graficznych akceleratorów FireGL 8700/8800, E1, Z1/X1. Pakiet
+dostarcza sterowniki obsługujące wyświetlanie 2D oraz sprzętowo
 akcelerowany OpenGL.
 
-%package -n kernel-video-firegl
+%package -n kernel%{_alt_kernel}-video-firegl
 Summary:       ATI kernel module for FireGL support
-Summary(pl):   Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
+Summary(pl.UTF-8):     Moduł jądra oferujący wsparcie dla ATI FireGL
 Release:       %{_rel}@%{_kernel_ver_str}
 License:       ATI
-Vendor:                ATI
 Group:         Base/Kernel
 %{?with_dist_kernel:%requires_releq_kernel_up}
 Requires(post,postun): /sbin/depmod
 Provides:      X11-driver-firegl(kernel)
 
-%description -n kernel-video-firegl
+%description -n kernel%{_alt_kernel}-video-firegl
 ATI kernel module for FireGL support.
 
-%description -n kernel-video-firegl -l pl
-Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
+%description -n kernel%{_alt_kernel}-video-firegl -l pl.UTF-8
+Moduł jądra oferujący wsparcie dla ATI FireGL.
 
-%package -n kernel-smp-video-firegl
+%package -n kernel%{_alt_kernel}-smp-video-firegl
 Summary:       ATI kernel module for FireGL support
-Summary(pl):   Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL
+Summary(pl.UTF-8):     Moduł jądra oferujący wsparcie dla ATI FireGL
 Release:       %{_rel}@%{_kernel_ver_str}
 License:       ATI
-Vendor:                ATI
 Group:         Base/Kernel
 %{?with_dist_kernel:%requires_releq_kernel_smp}
 Requires(post,postun): /sbin/depmod
 Provides:      X11-driver-firegl(kernel)
 
-%description -n kernel-smp-video-firegl
+%description -n kernel%{_alt_kernel}-smp-video-firegl
 ATI kernel module for FireGL support.
 
-%description -n kernel-smp-video-firegl -l pl
-Modu³ j±dra oferuj±cy wsparcie dla ATI FireGL.
+%description -n kernel%{_alt_kernel}-smp-video-firegl -l pl.UTF-8
+Moduł jądra oferujący wsparcie dla ATI FireGL.
 
 %prep
 %setup -q -c -T
 
-%ifarch %{x8664}
-sh %{SOURCE1} --extract .
-%else
 sh %{SOURCE0} --extract .
-%endif
 
-cp %{x11ver}%{arch_sufix}/lib/modules/fglrx/build_mod/* common/lib/modules/fglrx/build_mod
+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
-cp %{SOURCE2} panel_src/fglrx_pp_proto.h
+tar -xzf common/usr/src/ati/fglrx_panel_sources.tgz -C panel_src
 %patch0 -p1
 %patch1 -p1
 cd common
 %{?with_dist_kernel:%patch2 -p1}
 %patch3 -p1
+%patch4 -p2
 cd -
 
 install -d common%{_prefix}/{%{_lib},bin}
 cp -r %{x11ver}%{arch_sufix}%{_prefix}/%{_lib}/* common%{_prefix}/%{_lib}
 cp -r %{x11ver}%{arch_sufix}%{_bindir}/* common%{_bindir}
+cp -r arch/%{arch_dir}%{_prefix}/%{_lib}/* common%{_prefix}/%{_lib}
+cp -r arch/%{arch_dir}%{_bindir}/* common%{_bindir}
 
 %build
 %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
-       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
-       ln -sf %{_kernelsrcdir}/Module.symvers-$cfg Module.symvers
-%if %{without dist_kernel}
-       ln -sf %{_kernelsrcdir}/scripts
-%endif
-       touch include/config/MARKER
-       %{__make} -C %{_kernelsrcdir} clean \
-               RCS_FIND_IGNORE="-name '*.ko' -o" \
-               M=$PWD O=$PWD \
-               %{?with_verbose:V=1}
-       %{__make} -C %{_kernelsrcdir} modules \
-               M=$PWD O=$PWD \
-               %{?with_verbose:V=1}
-       mv fglrx{,-$cfg}.ko
-done
+%build_kernel_modules -m fglrx GCC_VER_MAJ=%{_ccver}
 cd -
 %endif
 
@@ -190,23 +158,14 @@ 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}
 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_includedir}/X11/extensions} \
        $RPM_BUILD_ROOT/usr/{%{_lib},include/GL}
 
-install common%{_bindir}/{fgl_glxgears,fglrxconfig,fglrxinfo,aticonfig} \
+install common%{_bindir}/{fgl_glxgears,fglrxinfo,aticonfig} \
        $RPM_BUILD_ROOT%{_bindir}
 install panel_src/fireglcontrol.qt3.gcc%(gcc -dumpversion) \
        $RPM_BUILD_ROOT%{_bindir}/fireglcontrol
@@ -228,16 +187,16 @@ rm -rf $RPM_BUILD_ROOT
 %post  -p /sbin/ldconfig
 %postun        -p /sbin/ldconfig
 
-%post  -n kernel-video-firegl
+%post  -n kernel%{_alt_kernel}-video-firegl
 %depmod %{_kernel_ver}
 
-%postun -n kernel-video-firegl
+%postun -n kernel%{_alt_kernel}-video-firegl
 %depmod %{_kernel_ver}
 
-%post  -n kernel-smp-video-firegl
+%post  -n kernel%{_alt_kernel}-smp-video-firegl
 %depmod %{_kernel_ver}smp
 
-%postun -n kernel-smp-video-firegl
+%postun -n kernel%{_alt_kernel}-smp-video-firegl
 %depmod %{_kernel_ver}smp
 
 %if %{with userspace}
@@ -246,6 +205,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/*
 %attr(755,root,root) %{_libdir}/libGL.so.*.*
 %attr(755,root,root) %{_libdir}/libGL.so
+%attr(755,root,root) %{_libdir}/libfglrx_dm.so.*.*
 %attr(755,root,root) %{_libdir}/libfglrx_gamma.so.*.*
 %attr(755,root,root) %{_libdir}/libfglrx_pp.so.*.*
 # Linux OpenGL ABI compatibility symlinks
@@ -270,12 +230,12 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 
 %if %{with kernel}
-%files -n kernel-video-firegl
+%files -n kernel%{_alt_kernel}-video-firegl
 %defattr(644,root,root,755)
 /lib/modules/%{_kernel_ver}/misc/*.ko*
 
 %if %{with smp} && %{with dist_kernel}
-%files -n kernel-smp-video-firegl
+%files -n kernel%{_alt_kernel}-smp-video-firegl
 %defattr(644,root,root,755)
 /lib/modules/%{_kernel_ver}smp/misc/*.ko*
 %endif
This page took 0.045632 seconds and 4 git commands to generate.