diff options
author | Edward W. Koenig <kingbeowulf@gmail.com> | 2014-11-24 08:20:05 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2014-11-24 08:20:05 +0700 |
commit | abca7c2558aca25e14063a1ec80776bb14bd684f (patch) | |
tree | 468df1d504ecd7ef886fec78af949967f52b1e98 /system/nvidia-driver | |
parent | 15bbae439167fc86240d86c5ff78aaf8c77edb25 (diff) |
system/nvidia-driver: Script cleanup.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/nvidia-driver')
-rw-r--r-- | system/nvidia-driver/nvidia-driver.info | 20 | ||||
-rw-r--r-- | system/nvidia-driver/nvidia-switch | 57 |
2 files changed, 38 insertions, 39 deletions
diff --git a/system/nvidia-driver/nvidia-driver.info b/system/nvidia-driver/nvidia-driver.info index d0f686f5c5ade..fe1f02c14deed 100644 --- a/system/nvidia-driver/nvidia-driver.info +++ b/system/nvidia-driver/nvidia-driver.info @@ -14,17 +14,17 @@ MD5SUM="b993f9fc59434140f560e32fd7bd2b3d \ cbe2bf2ebe6267a905ed35d58fbadda3 \ 30577e2a71ecbd2b30bbb1ab72b4e150" DOWNLOAD_x86_64="ftp://download.nvidia.com/XFree86/Linux-x86_64/340.58/NVIDIA-Linux-x86_64-340.58.run \ - ftp://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-340.58.tar.bz2 \ - ftp://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-340.58.tar.bz2 \ - ftp://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-340.58.tar.bz2 \ - ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-340.58.tar.bz2 \ - ftp://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-340.58.tar.bz2" + ftp://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-340.58.tar.bz2 \ + ftp://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-340.58.tar.bz2 \ + ftp://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-340.58.tar.bz2 \ + ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-340.58.tar.bz2 \ + ftp://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-340.58.tar.bz2" MD5SUM_x86_64="26ebeb6f4adb507bb3b573d9e0c0e2f9 \ - a536f4ad74620a629c3aecad68c19f63 \ - cb0dc0141f4118efa3d8ca2ae867dbaf \ - 848ac5d824d239b36d8188de4e2584b4 \ - cbe2bf2ebe6267a905ed35d58fbadda3 \ - 30577e2a71ecbd2b30bbb1ab72b4e150" + a536f4ad74620a629c3aecad68c19f63 \ + cb0dc0141f4118efa3d8ca2ae867dbaf \ + 848ac5d824d239b36d8188de4e2584b4 \ + cbe2bf2ebe6267a905ed35d58fbadda3 \ + 30577e2a71ecbd2b30bbb1ab72b4e150" REQUIRES="libvdpau nvidia-kernel" MAINTAINER="Edward W. Koenig" EMAIL="kingbeowulf@gmail.com" diff --git a/system/nvidia-driver/nvidia-switch b/system/nvidia-driver/nvidia-switch index 07f65f5358318..b33e532cec1d3 100644 --- a/system/nvidia-driver/nvidia-switch +++ b/system/nvidia-driver/nvidia-switch @@ -49,16 +49,18 @@ save_GL(){ if [ ! -e libGL.so.$GL_VERSION-xorg ]; then mv libGL.so.$GL_VERSION libGL.so.$GL_VERSION-xorg fi - ln -sf libGL.so.$NV_VERSION-nvidia libGL.so.$NV_VERSION + mv libGL.so.$NV_VERSION-nvidia libGL.so.$NV_VERSION ln -sf libGL.so.$NV_VERSION libGL.so.1 ln -sf libGL.so.$NV_VERSION libGL.so fi if [ "$1" = "xorg" ]; then - mv libGL.so.$GL_VERSION-xorg libGL.so.$GL_VERSION - ln -sf libGL.so.$GL_VERSION libGL.so.1 - ln -sf libGL.so.$GL_VERSION libGL.so - rm -f libGL.so.$NV_VERSION + if [ -e libGL.so.$GL_VERSION-xorg ]; then + mv libGL.so.$GL_VERSION-xorg libGL.so.$GL_VERSION + ln -sf libGL.so.$GL_VERSION libGL.so.1 + ln -sf libGL.so.$GL_VERSION libGL.so + fi + mv libGL.so.$NV_VERSION libGL.so.$NV_VERSION-nvidia fi cd "$CWD" } @@ -66,14 +68,14 @@ save_GL(){ save_wfb(){ cd "$XMOD" if [ "$1" = "nvidia" ]; then - ln -sf libnvidia-wfb.so.$NV_VERSION-nvidia libnvidia-wfb.so.$NV_VERSION + mv libnvidia-wfb.so.$NV_VERSION-nvidia libnvidia-wfb.so.$NV_VERSION ln -sf libnvidia-wfb.so.$NV_VERSION libnvidia-wfb.so.1 if [ ! -e libwfb.so ]; then mv libwfb.so libwfb.so-xorg ln -sf libnvidia-wfb.so.$NV_VERSION libwfb.so fi elif [ "$1" = "xorg" ]; then - rm -f libnvidia-wfb.so.$NV_VERSION + mv libnvidia-wfb.so.$NV_VERSION libnvidia-wfb.so.$NV_VERSION-nvidia rm -f libnvidia-wfb.so.1 if [ -L libwfb.so ]; then rm -f libwfb.so @@ -105,24 +107,25 @@ cd "$CWD" multilib(){ # rejigger multilib paths/links - cd $LIB32 - case "$1" in - "nvidia") - if [ ! -e libGL.so.$GL_VERSION-xorg ]; then - mv libGL.so.$GL_VERSION libGL.so.$GL_VERSION-xorg - fi - ln -sf libGL.so.$NV_VERSION-nvidia libGL.so.$NV_VERSION - ln -sf libGL.so.$NV_VERSION libGL.so.1 - ln -sf libGL.so.$NV_VERSION libGL.so - ;; - "xorg") - mv libGL.so.$GL_VERSION-xorg libGL.so.$GL_VERSION - ln -sf libGL.so.$GL_VERSION libGL.so.1 - ln -sf libGL.so.$GL_VERSION libGL.so - rm -f libGL.so.$NV_VERSION - ;; - esac - cd "$CWD" + cd $LIB32 + if [ "$1" = "nvidia" ]; then + if [ ! -e libGL.so.$GL_VERSION-xorg ]; then + mv libGL.so.$GL_VERSION libGL.so.$GL_VERSION-xorg + fi + mv libGL.so.$NV_VERSION-nvidia libGL.so.$NV_VERSION + ln -sf libGL.so.$NV_VERSION libGL.so.1 + ln -sf libGL.so.$NV_VERSION libGL.so + fi + + if [ "$1" = "xorg" ]; then + if [ -e libGL.so.$GL_VERSION-xorg ]; then + mv libGL.so.$GL_VERSION-xorg libGL.so.$GL_VERSION + ln -sf libGL.so.$GL_VERSION libGL.so.1 + ln -sf libGL.so.$GL_VERSION libGL.so + fi + mv libGL.so.$NV_VERSION libGL.so.$NV_VERSION-nvidia + fi + cd "$CWD" } nvidia_ldconfig(){ @@ -147,8 +150,6 @@ nvidia_install(){ LD_NVIDIA="${LIB}/libGL.so.$NV_VERSION" nvidia_ldconfig $LD_NVIDIA - WFB-NVIDIA="${XMOD}/libnvidia_wfb.so.$NV_VERSION" - nvidia_ldconfig $WFB_NVIDIA } nvidia_remove(){ @@ -171,8 +172,6 @@ nvidia_remove(){ LD_NVIDIA="${LIB}/libGL.so.$GL_VERSION" nvidia_ldconfig $LD_NVIDIA - WFB-NVIDIA="${XMOD}/libwfb.so" - nvidia_ldconfig $WFB_NVIDIA } usage(){ |