- add wfb.so symlink
[packages/xorg-driver-video-nvidia.git] / xorg-driver-video-nvidia.spec
index 4f3fcae42418ba2db12b2e03da4deae40346f3d2..f921b1aa0152f9cd887ade0b8a7e5c61e0eaad7a 100644 (file)
@@ -1,6 +1,7 @@
 #
 # Conditional build:
 %bcond_without dist_kernel     # without distribution kernel
+%bcond_without up              # without up packages
 %bcond_without smp             # without smp packages
 %bcond_without kernel          # without kernel packages
 %bcond_without incall          # include all tarballs
@@ -10,7 +11,7 @@
 %define                no_install_post_strip 1
 #
 %define                _nv_ver         1.0
-%define                _nv_rel         8774
+%define                _nv_rel         9746
 %define                _min_x11        6.7.0
 %define                _rel            1
 #
@@ -36,12 +37,12 @@ Release:    %{_rel}
 License:       nVidia Binary
 Group:         X11
 %if %{need_x86}
-Source0:       http://download.nvidia.com/XFree86/Linux-x86/%{_nv_ver}-%{_nv_rel}/NVIDIA-Linux-x86-%{_nv_ver}-%{_nv_rel}-pkg1.run
-# Source0-md5: eb01a4372096ee7799e6560cf568c1c2
+Source0:       http://us.download.nvidia.com/XFree86/Linux-x86/%{_nv_ver}-%{_nv_rel}/NVIDIA-Linux-x86-%{_nv_ver}-%{_nv_rel}-pkg1.run
+# Source0-md5: cf0cdbd9099a6df028de429044e7f4da
 %endif
 %if %{need_x8664}
-Source1:       http://download.nvidia.com/XFree86/Linux-x86_64/%{_nv_ver}-%{_nv_rel}/NVIDIA-Linux-x86_64-%{_nv_ver}-%{_nv_rel}-pkg2.run
-# Source1-md5: 1f569a860caf1c4314444536c7e659dd
+Source1:       http://us.download.nvidia.com/XFree86/Linux-x86_64/%{_nv_ver}-%{_nv_rel}/NVIDIA-Linux-x86_64-%{_nv_ver}-%{_nv_rel}-pkg2.run
+# Source1-md5: c0afc66e1c21a9a54ba6719b8edd3166
 %endif
 Source2:       %{name}-xinitrc.sh
 Patch0:                X11-driver-nvidia-GL.patch
@@ -51,22 +52,18 @@ URL:                http://www.nvidia.com/object/linux.html
 %{?with_dist_kernel:BuildRequires:     kernel%{_alt_kernel}-module-build >= 3:2.6.7}
 %endif
 BuildRequires: %{kgcc_package}
-BuildRequires: rpmbuild(macros) >= 1.308
+BuildRequires: rpmbuild(macros) >= 1.330
 BuildRequires: sed >= 4.0
 BuildConflicts:        XFree86-nvidia
 Requires:      xorg-xserver-server
 Provides:      OpenGL = 1.5
 Provides:      OpenGL-GLX
-Provides:      X11-OpenGL-core
-Provides:      X11-OpenGL-libGL
-Provides:      XFree86-OpenGL-core
-Provides:      XFree86-OpenGL-libGL
 Provides:      xorg-xserver-modules-libglx
 Obsoletes:     Mesa
-Obsoletes:     X11-OpenGL-core
-Obsoletes:     X11-OpenGL-libGL
-Obsoletes:     XFree86-OpenGL-core
-Obsoletes:     XFree86-OpenGL-libGL
+Obsoletes:     X11-OpenGL-core < 1:7.0.0
+Obsoletes:     X11-OpenGL-libGL < 1:7.0.0
+Obsoletes:     XFree86-OpenGL-core < 1:7.0.0
+Obsoletes:     XFree86-OpenGL-libGL < 1:7.0.0
 Obsoletes:     XFree86-driver-nvidia
 Obsoletes:     XFree86-nvidia
 Conflicts:     XFree86-OpenGL-devel <= 4.2.0-3
@@ -190,35 +187,13 @@ echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> usr/s
 %if %{with kernel}
 cd usr/src/nv/
 ln -sf Makefile.kbuild 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
-%if %{with dist_kernel}
-       %{__make} -C %{_kernelsrcdir} O=$PWD/o prepare scripts
-%else
-       install -d o/include/config
-       touch o/include/config/MARKER
-       ln -sf %{_kernelsrcdir}/scripts o/scripts
-%endif
-       %{__make} -C %{_kernelsrcdir} clean \
-               RCS_FIND_IGNORE="-name '*.ko' -o -name nv-kernel.o -o" \
-               SYSSRC=%{_kernelsrcdir} \
-               SYSOUT=$PWD/o \
-               M=$PWD O=$PWD/o \
-               %{?with_verbose:V=1}
-       %{__make} -C %{_kernelsrcdir} modules \
-               CC="%{__cc}" CPP="%{__cpp}" \
-               SYSSRC=%{_kernelsrcdir} \
-               SYSOUT=$PWD/o \
-               M=$PWD O=$PWD/o \
-               %{?with_verbose:V=1}
-       mv nvidia.ko nvidia-$cfg.ko
-done
+cat >> Makefile <<'EOF'
+
+$(obj)/nv-kernel.o: $(src)/nv-kernel.o.bin
+       cp $< $@
+EOF
+mv nv-kernel.o{,.bin}
+%build_kernel_modules -m nvidia
 %endif
 
 %install
@@ -237,6 +212,7 @@ install %{SOURCE2} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d/nvidia-settings.sh
 
 for f in \
        usr/lib/tls/libnvidia-tls.so.%{version}         \
+       usr/lib/libnvidia-cfg.so.%{version}             \
        usr/lib/libGL{,core}.so.%{version}              \
        usr/X11R6/lib/libXvMCNVIDIA.so.%{version}       \
        usr/X11R6/lib/libXvMCNVIDIA.a                   \
@@ -246,14 +222,17 @@ done
 
 install usr/X11R6/lib/modules/extensions/libglx.so.%{version} \
        $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions
-install usr/X11R6/lib/modules/drivers/nvidia_drv.o \
+install usr/X11R6/lib/modules/drivers/nvidia_drv.so \
        $RPM_BUILD_ROOT%{_libdir}/xorg/modules/drivers
+install usr/X11R6/lib/modules/libnvidia-wfb.so.%{version} \
+       $RPM_BUILD_ROOT%{_libdir}/xorg/modules
 
 install usr/include/GL/*.h $RPM_BUILD_ROOT%{_includedir}/GL
 
 ln -sf libglx.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/extensions/libglx.so
 ln -sf libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libXvMCNVIDIA.so
 ln -sf libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libXvMCNVIDIA_dynamic.so.1
+ln -sf libnvidia-wfb.so.%{version} $RPM_BUILD_ROOT%{_libdir}/xorg/modules/wfb.so
 
 # OpenGL ABI for Linux compatibility
 ln -sf libGL.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libGL.so.1
@@ -261,14 +240,7 @@ ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/libGL.so
 %endif
 
 %if %{with kernel}
-cd usr/src/nv/
-install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
-install nvidia-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
-       $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/nvidia.ko
-%if %{with smp} && %{with dist_kernel}
-install nvidia-smp.ko \
-       $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/nvidia.ko
-%endif
+%install_kernel_modules -m usr/src/nv/nvidia -d misc
 %endif
 
 %clean
@@ -316,15 +288,20 @@ EOF
 %attr(755,root,root) %{_libdir}/libGLcore.so.*.*
 %attr(755,root,root) %{_libdir}/libXvMCNVIDIA.so.*.*
 %attr(755,root,root) %{_libdir}/libXvMCNVIDIA_dynamic.so.1
+%attr(755,root,root) %{_libdir}/libnvidia-cfg.so.*.*.*
 %attr(755,root,root) %{_libdir}/libnvidia-tls.so.*.*.*
+%attr(755,root,root) %{_libdir}/xorg/modules/libnvidia-wfb.so.*.*.*
+%attr(755,root,root) %{_libdir}/xorg/modules/wfb.so
+%attr(755,root,root) %{_libdir}/xorg/modules/drivers/nvidia_drv.so
 %attr(755,root,root) %{_libdir}/xorg/modules/extensions/libglx.so*
-%attr(755,root,root) %{_libdir}/xorg/modules/drivers/nvidia_drv.o
 %endif
 
 %if %{with kernel}
+%if %{with up} || %{without dist_kernel}
 %files -n kernel%{_alt_kernel}-video-nvidia
 %defattr(644,root,root,755)
 /lib/modules/%{_kernel_ver}/misc/*.ko*
+%endif
 
 %if %{with smp} && %{with dist_kernel}
 %files -n kernel%{_alt_kernel}-smp-video-nvidia
This page took 0.057636 seconds and 4 git commands to generate.