Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:X0F:HSF:Kernel
x11-video-nvidia-legacy
dkms-nvidia-legacy.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File dkms-nvidia-legacy.spec of Package x11-video-nvidia-legacy
# # spec file for package dkms-nvidia # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via bumblebee.obs@gmail.com # # norootforbuild # %define modname nvidia %define mirror1 http://download.nvidia.com/XFree86 #define mirror1 http://uk.download.nvidia.com/XFree86 #define mirror1 http://us.download.nvidia.com/XFree86 %define package_ver 304.135 %define package_name NVIDIA-Linux-x86 %define md5_x86 0e2082ae8490b135eb306befe6db56e1 %{package_name}-%{package_ver}.run %define md5_x86_64 dfd6d6ec0a36d2177229eee5f7dd57ba %{package_name}_64-%{package_ver}.run Name: dkms-%{modname} Summary: Installer for the graphics driver kernel module for GeForce 6xxx and newer GPUs Version: %{package_ver} Release: 0.1 Url: https://build.opensuse.org/project/show/home:Bumblebee-Project Group: System/Kernel License: GPL-2.0+ Vendor: The Bumblebee Project Source0: README Source1: kernel-4.9.patch Source2: kernel-4.10.patch Source3: kernel-4.11.patch Source1000: %{name}-legacy-rpmlintrc %if 0%{?suse_version} Conflicts: nvidia-kmp-default Conflicts: nvidia-kmp-desktop Conflicts: nvidia-kmp-pae Conflicts: nvidia-kmp-xen Conflicts: nvidia-kmp Conflicts: nvidia-gfxG02-kmp-default Conflicts: nvidia-gfxG02-kmp-desktop Conflicts: nvidia-gfxG02-kmp-pae Conflicts: nvidia-gfxG02-kmp-xen Conflicts: nvidia-gfxG02-kmp %endif Provides: nvidia-kernel-module = %{version}-%{release} Requires: wget binutils gcc make patch %if 0%{?mdkversion} Requires: dkms-minimal %else Requires: dkms %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build %description This package will download and install the proprietary NVIDIA Accelerated Linux Graphics Driver that brings accelerated 2D functionality and high-performance OpenGL support to Linux x86 with the use of NVIDIA graphics processing units (GPUs). These drivers provide optimized hardware acceleration for OpenGL and X applications and support nearly all recent NVIDIA GPU products (see README.txt, Appendix A for a complete list of supported GPUs). TwinView, TV-Out and flat panel displays are also supported. http://www.nvidia.com %prep %if %{undefined package_name} %{error:%%package_name missing in the Project Config} exit -1 %endif %if %{undefined package_ver} %{error:%%package_ver missing in the Project Config} exit -1 %endif %if %{undefined md5_x86} %{error:%%md5_x86 missing in the Project Config} exit -1 %endif %if %{undefined md5_x86_64} %{error:%%md5_x86_64 missing in the Project Config} exit -1 %endif # cp %SOURCE0 . cp %SOURCE1 . cp %SOURCE2 . cp %SOURCE3 . %build %install install -d 755 %{buildroot}/etc/modprobe.d echo "blacklist nouveau" > %{buildroot}/etc/modprobe.d/50-blacklist-nouveau.conf %pre pushd /usr/src >/dev/null 2>&1 # # Get the nVidia package and unpack # %ifarch x86_64 NV_NAME=%{package_name}_64-%{version} echo %{md5_x86_64} > md5sum.check if [ -f $NV_NAME.run ] ; then # # Check the package # md5sum --status -c md5sum.check || rm -f $NV_NAME.run fi # if [ -x /usr/bin/wget ] && [ ! -f $NV_NAME.run ] ; then # # Get the package # wget %{mirror1}/Linux-x86_64/%{version}/$NV_NAME.run || exit -1 # # Check the package # md5sum --status -c md5sum.check || exit -1 fi rm -f md5sum.check %else NV_NAME=%{package_name}-%{version} echo %{md5_x86} > md5sum.check if [ -f $NV_NAME.run ] ; then # # Check the nVidia package # md5sum --status -c md5sum.check || rm -f $NV_NAME.run fi # if [ -x /usr/bin/wget ] && [ ! -f $NV_NAME.run ] ; then # # Get the package # wget %{mirror1}/Linux-x86/%{version}/$NV_NAME.run || exit -1 # # Check the package # md5sum --status -c md5sum.check || exit -1 fi rm -f md5sum.check %endif # if [ -f $NV_NAME.run ] ; then # # Check the nVidia package # sh $NV_NAME.run --check || exit -2 fi # if [ ! -d $NV_NAME ] && [ -f $NV_NAME.run ] ; then # # Unpack # sh $NV_NAME.run -x || exit -3 fi # # To be used by the new setup # if [ -f $NV_NAME.run ] ; then mv -f $NV_NAME.run $NV_NAME.run.new fi if [ -d $NV_NAME ] ; then if [ -d $NV_NAME.new ] ; then rm -rf $NV_NAME.new fi mv -f $NV_NAME $NV_NAME.new fi # popd >/dev/null 2>&1 %posttrans pushd /usr/src >/dev/null 2>&1 # %ifarch x86_64 NV_NAME=%{package_name}_64-%{version} %else NV_NAME=%{package_name}-%{version} %endif # # Get the new setup # if [ -f $NV_NAME.run.new ] ; then mv -f $NV_NAME.run.new $NV_NAME.run fi if [ -d $NV_NAME.new ] ; then rm -rf $NV_NAME mv -f $NV_NAME.new $NV_NAME fi # MAJOR_VER=$( echo %{version} | cut -d '.' -f 1 ) MINOR_VER=$( echo %{version} | cut -d '.' -f 2 ) PATCH_VER=$( echo %{version} | cut -d '.' -f 3 ) # if [ -d $NV_NAME ] ; then # # Install dkms sources # rm -rf /usr/src/%{modname}-%{version}-%{release} mkdir -p /usr/src/%{modname}-%{version}-%{release} cp -R $NV_NAME/kernel/* /usr/src/%{modname}-%{version}-%{release}/ cp -R $NV_NAME/LICENSE /usr/src/%{modname}-%{version}-%{release}/ cp -R $NV_NAME/README.txt /usr/src/%{modname}-%{version}-%{release}/ pushd /usr/src/%{modname}-%{version}-%{release} >/dev/null 2>&1 echo "nvidia.ko external" > Module.supported ln -sf Makefile.kbuild Makefile # # Kernel patches # patch -p1 < /usr/share/doc/packages/dkms-nvidia/kernel-4.9.patch patch -p2 < /usr/share/doc/packages/dkms-nvidia/kernel-4.10.patch patch -p2 < /usr/share/doc/packages/dkms-nvidia/kernel-4.11.patch # popd >/dev/null 2>&1 # # Setup dkms.conf # cat > /usr/src/%{modname}-%{version}-%{release}/dkms.conf << EOF PACKAGE_NAME=%{modname} PACKAGE_VERSION=%{version}-%{release} MAKE[0]="make -C \${kernel_source_dir} SUBDIRS=\${dkms_tree}/\${PACKAGE_NAME}/\${PACKAGE_VERSION}/build modules" CLEAN="make -f /usr/src/%{modname}-%{version}-%{release}/Makefile.kbuild -C \${kernel_source_dir} SUBDIRS=\${dkms_tree}/\${PACKAGE_NAME}/\${PACKAGE_VERSION}/build clean" DEST_MODULE_LOCATION[0]="/updates/" BUILT_MODULE_NAME[0]=%{modname} AUTOINSTALL="yes" REMAKE_INITRD="yes" NO_WEAK_MODULES="yes" EOF fi # set -x if [ -x /usr/sbin/dkms ] ; then /usr/sbin/dkms add -m %{modname} -v %{version}-%{release} --rpm_safe_upgrade /usr/sbin/dkms build -m %{modname} -v %{version}-%{release} /usr/sbin/dkms install -m %{modname} -v %{version}-%{release} fi # popd >/dev/null 2>&1 %preun # # Remove the module, rmmod can fail # if [ -x /sbin/rmmod ] ; then /sbin/rmmod %{modname} >/dev/null 2>&1 fi # # Remove the module from dkms # set -x if [ -x /usr/sbin/dkms ] ; then /usr/sbin/dkms remove -m %{modname} -v %{version}-%{release} --all --rpm_safe_upgrade || : fi %postun %ifarch x86_64 NV_NAME=%{package_name}_64-%{version} %else NV_NAME=%{package_name}-%{version} %endif # # Remove the sources # rm -rf /usr/src/%{modname}-%{version}-%{release} rm -rf /usr/src/$NV_NAME rm -f /usr/src/$NV_NAME.run %clean rm -rf %{buildroot} %files %defattr(-, root, root) %doc README kernel-4.11.patch %dir /etc/modprobe.d %config /etc/modprobe.d/50-blacklist-nouveau.conf %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor