From d6b43ac8e464ec3d67c7b8f75db7859ea7bdd0d5 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 7 Dec 2012 18:16:44 +0100 Subject: [PATCH] New package: nvidia304-304.64 for the 304.xx series. --- srcpkgs/nvidia304-dkms | 1 + srcpkgs/nvidia304-opencl | 1 + srcpkgs/nvidia304/INSTALL | 16 +++ srcpkgs/nvidia304/nvidia304-dkms.template | 26 +++++ srcpkgs/nvidia304/nvidia304-opencl.template | 31 ++++++ srcpkgs/nvidia304/template | 111 ++++++++++++++++++++ 6 files changed, 186 insertions(+) create mode 120000 srcpkgs/nvidia304-dkms create mode 120000 srcpkgs/nvidia304-opencl create mode 100644 srcpkgs/nvidia304/INSTALL create mode 100644 srcpkgs/nvidia304/nvidia304-dkms.template create mode 100644 srcpkgs/nvidia304/nvidia304-opencl.template create mode 100644 srcpkgs/nvidia304/template diff --git a/srcpkgs/nvidia304-dkms b/srcpkgs/nvidia304-dkms new file mode 120000 index 00000000000..b9008ead703 --- /dev/null +++ b/srcpkgs/nvidia304-dkms @@ -0,0 +1 @@ +nvidia304 \ No newline at end of file diff --git a/srcpkgs/nvidia304-opencl b/srcpkgs/nvidia304-opencl new file mode 120000 index 00000000000..b9008ead703 --- /dev/null +++ b/srcpkgs/nvidia304-opencl @@ -0,0 +1 @@ +nvidia304 \ No newline at end of file diff --git a/srcpkgs/nvidia304/INSTALL b/srcpkgs/nvidia304/INSTALL new file mode 100644 index 00000000000..5765f6c7782 --- /dev/null +++ b/srcpkgs/nvidia304/INSTALL @@ -0,0 +1,16 @@ +# Overwrite libGL and libglx symlinks. +case ${ACTION} in +post) + rm -f usr/lib/libGL.so usr/lib/libGL.so.1 + rm -f usr/lib/xorg/modules/extensions/libglx.so + + # libGL + cd usr/lib + ln -sf libGL-nvidia.so.${VERSION%_*} libGL.so + ln -sf libGL-nvidia.so.${VERSION%_*} libGL.so.1 + + # libglx + cd ../../usr/lib/xorg/modules/extensions + ln -sf libglx-nvidia.so.${VERSION%_*} libglx.so + ;; +esac diff --git a/srcpkgs/nvidia304/nvidia304-dkms.template b/srcpkgs/nvidia304/nvidia304-dkms.template new file mode 100644 index 00000000000..596835ced3d --- /dev/null +++ b/srcpkgs/nvidia304/nvidia304-dkms.template @@ -0,0 +1,26 @@ +# Template file for 'nvidia304-dkms'. +# +short_desc="NVIDIA drivers for linux (304.xx series) -- DKMS kernel module" +long_desc=" + This package contains the NVIDIA non free kernel module files for DKMS." + +nonfree=yes +triggers="dkms" +provides="nvidia-dkms-${version}" +replaces="nvidia-dkms>=0" +dkms_modules="nvidia ${version}" + +do_install() { + vmkdir usr/src/nvidia-${version} + vcopy "${_pkg}/kernel/*" usr/src/nvidia-${version} + + # systemd modules-load.d(5) file. + vmkdir usr/lib/modules-load.d + echo "nvidia" > ${DESTDIR}/usr/lib/modules-load.d/nvidia.conf + chmod 644 ${DESTDIR}/usr/lib/modules-load.d/nvidia.conf + + # Blacklist nouveau. + vmkdir usr/lib/modprobe.d + echo "blacklist nouveau" > ${DESTDIR}/usr/lib/modprobe.d/nvidia.conf + chmod 644 ${DESTDIR}/usr/lib/modprobe.d/nvidia.conf +} diff --git a/srcpkgs/nvidia304/nvidia304-opencl.template b/srcpkgs/nvidia304/nvidia304-opencl.template new file mode 100644 index 00000000000..44497923306 --- /dev/null +++ b/srcpkgs/nvidia304/nvidia304-opencl.template @@ -0,0 +1,31 @@ +# Template file for 'nvidia304-opencl'. +# +short_desc="NVIDIA drivers for linux (304.xx series) -- OpenCL implementation" +long_desc=" + This package contains the NVIDIA non free OpenCL implementation." + +nonfree=yes +provides="nvidia-opencl-${version} libOpenCL-${version}" +replaces="nvidia-openctl>=0 libOpenCL>=0" + +do_install() { + cd ${_pkg} + + vinstall nvidia.icd 644 etc/OpenCL/vendors + + vinstall libOpenCL.so.1.0.0 755 usr/lib + ln -sf libOpenCL.so.1.0.0 ${DESTDIR}/usr/lib/libOpenCL.so + ln -sf libOpenCL.so.1.0.0 ${DESTDIR}/usr/lib/libOpenCL.so.1 + + vinstall libnvidia-compiler.so.${version} 755 usr/lib + ln -sf libnvidia-compiler.so.${version} \ + ${DESTDIR}/usr/lib/libnvidia-compiler.so + ln -sf libnvidia-compiler.so.${version} \ + ${DESTDIR}/usr/lib/libnvidia-compiler.so.1 + + vinstall libnvidia-opencl.so.${version} 755 usr/lib + ln -sf libnvidia-opencl.so.${version} \ + ${DESTDIR}/usr/lib/libnvidia-opencl.so + ln -sf libnvidia-opencl.so.${version} \ + ${DESTDIR}/usr/lib/libnvidia-opencl.so.1 +} diff --git a/srcpkgs/nvidia304/template b/srcpkgs/nvidia304/template new file mode 100644 index 00000000000..8e19e049c37 --- /dev/null +++ b/srcpkgs/nvidia304/template @@ -0,0 +1,111 @@ +# Template file for 'nvidia304' +pkgname=nvidia304 +version=304.64 +revision=1 +short_desc="NVIDIA drivers for linux (304.xx series) -- libraries and utilities" +maintainer="Juan RP " +license="Propietary NVIDIA license" +homepage="http://www.nvidia.com" +long_desc=" + This package contains the non free NVIDIA libraries and utilities for + the propietary NVIDIA driver for the Linux kernel." + +create_wrksrc=yes +noextract=yes +nonfree=yes +provides="nvidia-${version}" +replaces="nvidia>=0" +subpackages="${pkgname}-dkms ${pkgname}-opencl" +depends="${pkgname}-dkms-${version}_${revision}" +conflicts="catalyst>=0" + +if [ "${XBPS_MACHINE}" = "i686" ]; then + _pkg="NVIDIA-Linux-x86-${version}" + distfiles="ftp://download.nvidia.com/XFree86/Linux-x86/${version}/${_pkg}.run" + checksum=23464129f7ea5a00f724f67627206b322b6d08efb7134192a56ba50ea93d2252 +else + _pkg="NVIDIA-Linux-x86_64-${version}-no-compat32" + distfiles="ftp://download.nvidia.com/XFree86/Linux-x86_64/${version}/${_pkg}.run" + checksum=b45bbf79599c7344decf79ade1c3d635d20578a0686cda99bc56b39f967163f4 +fi + +do_extract() { + install -m755 ${_pkg}.run ${wrksrc} + cd ${wrksrc} && ./${_pkg}.run --extract-only + rm -f ${_pkg}.run +} + +do_install() { + cd ${_pkg} + + # X driver + vinstall nvidia_drv.so 755 usr/lib/xorg/modules/drivers + + # GLX extension module for X + vinstall libglx.so.${version} 755 usr/lib/xorg/modules/extensions \ + libglx-nvidia.so.${version} + + # OpenGL library + vinstall libGL.so.${version} 755 usr/lib libGL-nvidia.so.${version} + + # OpenGL core library + vinstall libnvidia-glcore.so.${version} 755 usr/lib + ln -sf libnvidia-glcore.so.${version} ${DESTDIR}/usr/lib/libnvidia-glcore.so + + # XvMC + vinstall libXvMCNVIDIA.a 644 usr/lib + vinstall libXvMCNVIDIA.so.${version} 755 usr/lib + ln -sf libXvMCNVIDIA.so.${version} ${DESTDIR}/usr/lib/libXvMCNVIDIA_dynamic.so + ln -sf libXvMCNVIDIA.so.${version} ${DESTDIR}/usr/lib/libXvMCNVIDIA_dynamic.so.1 + + # VDPAU + vinstall libvdpau_nvidia.so.${version} 755 usr/lib/vdpau + ln -sf libvdpau_nvidia.so.${version} ${DESTDIR}/usr/lib/vdpau/libvdpau_nvidia.so + ln -sf libvdpau_nvidia.so.${version} ${DESTDIR}/usr/lib/vdpau/libvdpau_nvidia.so.1 + + # nvidia-tls library + vinstall tls/libnvidia-tls.so.${version} 755 usr/lib + ln -sf libnvidia-tls.so.${version} ${DESTDIR}/usr/lib/libnvidia-tls.so + + vinstall libnvidia-cfg.so.${version} 755 usr/lib + ln -sf libnvidia-cfg.so.${version} ${DESTDIR}/usr/lib/libnvidia-cfg.so + ln -sf libnvidia-cfg.so.${version} ${DESTDIR}/usr/lib/libnvidia-cfg.so.1 + + vinstall libnvidia-ml.so.${version} 755 usr/lib + ln -sf libnvidia-ml.so.${version} ${DESTDIR}/usr/lib/libnvidia-ml.so + ln -sf libnvidia-ml.so.${version} ${DESTDIR}/usr/lib/libnvidia-ml.so.1 + + # CUDA + vinstall libcuda.so.${version} 755 usr/lib + ln -sf libcuda.so.${version} ${DESTDIR}/usr/lib/libcuda.so + ln -sf libcuda.so.${version} ${DESTDIR}/usr/lib/libcuda.so.1 + + vinstall libnvcuvid.so.${version} 755 usr/lib + ln -sf libnvcuvid.so.${version} ${DESTDIR}/usr/lib/libnvcuvid.so + ln -sf libnvcuvid.so.${version} ${DESTDIR}/usr/lib/libnvcuvid.so.1 + + # nvidia-xconfig + vinstall nvidia-xconfig 755 usr/bin + vinstall nvidia-xconfig.1.gz 644 usr/share/man/man1 + + # nvidia-settings + vinstall nvidia-settings 755 usr/bin + vinstall nvidia-settings.1.gz 644 usr/share/man/man1 + vinstall nvidia-settings.desktop 644 usr/share/applications + vinstall nvidia-settings.png 644 usr/share/pixmaps + sed -e 's:__UTILS_PATH__:/usr/bin:' \ + -e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' \ + -i ${DESTDIR}/usr/share/applications/nvidia-settings.desktop + + # nvidia-bug-report + vinstall nvidia-bug-report.sh 755 usr/bin nvidia-bug-report + + # nvidia-smi + vinstall nvidia-smi 755 usr/bin + vinstall nvidia-smi.1.gz 644 usr/share/man/man1 + + # License and documentation. + vinstall LICENSE 644 usr/share/licenses/nvidia + vinstall README.txt 644 usr/share/doc/nvidia README + vinstall NVIDIA_Changelog 644 usr/share/doc/nvidia +}