SHARE
TWEET

Updated 32/64-bit PKGBUILD for amdgpu-pro 16.50.362463

a guest Dec 9th, 2016 1,150 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Inspired from the original work of Janusz Lewandowski <lew21@xtreeme.org>
  2. # and David McFarland <corngood@gmail.com>
  3. # from https://aur.archlinux.org/pkgbase/amdgpu-pro-installer
  4. # Modified : nmset@netcourrier.com
  5. # Thanks to Paullux (https://aur.archlinux.org/account/Paullux)
  6. # for testing the 32-bit setup and sanitizing the 'provides' instructions.
  7.  
  8. #Alien PKGBUILD, not for general use.
  9. #Download amdgpu-pro-16.50-362463.tar.xz separately (.deb) and makepkg.
  10. #Reboot after install, libraries are not in standard locations.
  11. #If X fails to start,
  12. #log through SSH
  13. #OR reboot (wildly or with magic SysRq) and chroot in some way to your partition
  14. #To uninstall in any case:
  15. #Close DE; in a TTY :
  16. #pacman -Rdd amdgpu-pro
  17. #pacman -S xf86-video-amdgpu mesa-libgl ocl-icd lib32-mesa-libgl lib32-ocl-icd
  18. #Reboot
  19.  
  20. pkgbase=amdgpu-pro-alien-installer
  21. pkgname=(amdgpu-pro)
  22. pkgver=16.50.362463
  23. pkgrel=6
  24. arch=('x86_64')
  25. url='http://www.amd.com'
  26. license=('custom:AMD')
  27. conflicts=('xf86-video-amdgpu' 'lib32-mesa-libgl' 'lib32-ocl-icd' 'mesa-libgl' 'ocl-icd')
  28. provides=('lib32-libgl' 'libgl' 'libcl' 'opencl-icd-loader')
  29.  
  30. source=("amdgpu-pro-16.50-362463.tar.xz")
  31. sha256sums=("SKIP")
  32.  
  33. PKGVER="16.50-362463"
  34.  
  35. prepare () {
  36.     cd "${startdir}"
  37. cat > amdgpu-pro-32.conf <<EOF
  38. /opt/amdgpu-pro-32/lib/i386-linux-gnu
  39. /opt/amdgpu-pro-32/lib/i386-linux-gnu/dri
  40. /opt/amdgpu-pro-32/lib/i386-linux-gnu/gbm
  41. /opt/amdgpu-pro-32/lib/i386-linux-gnu/dri
  42. /opt/amdgpu-pro-32/lib/i386-linux-gnu/gstreamer-1.0
  43. /opt/amdgpu-pro-32/lib/i386-linux-gnu/libomxil-bellagio0
  44. /opt/amdgpu-pro-32/lib/i386-linux-gnu/gbm
  45. /opt/amdgpu-pro-32/lib/i386-linux-gnu/vdpau
  46. /opt/amdgpu-pro-32/lib/i386-linux-gnu/xorg/modules
  47. /opt/amdgpu-pro-32/lib/i386-linux-gnu/xorg/modules/drivers
  48. /opt/amdgpu-pro-32/lib/i386-linux-gnu/xorg/modules/extensions
  49. /usr/lib32/dri
  50. EOF
  51.  
  52. cat > amdgpu-pro-32.sh <<EOF
  53. export LD_LIBRARY_PATH=\$(tr "\n" ":" < /etc/ld.so.conf.d/amdgpu-pro-32.conf ):\$LD_LIBRARY_PATH
  54. EOF
  55.  
  56. cat > amdgpu-pro.conf <<EOF
  57. /opt/amdgpu-pro/lib/x86_64-linux-gnu
  58. /opt/amdgpu-pro/lib/x86_64-linux-gnu/dri
  59. /opt/amdgpu-pro/lib/x86_64-linux-gnu/gbm
  60. /opt/amdgpu-pro/lib/x86_64-linux-gnu/dri
  61. /opt/amdgpu-pro/lib/x86_64-linux-gnu/gstreamer-1.0
  62. /opt/amdgpu-pro/lib/x86_64-linux-gnu/libomxil-bellagio0
  63. /opt/amdgpu-pro/lib/x86_64-linux-gnu/gbm
  64. /opt/amdgpu-pro/lib/x86_64-linux-gnu/vdpau
  65. /opt/amdgpu-pro/lib/x86_64-linux-gnu/xorg/modules
  66. /opt/amdgpu-pro/lib/x86_64-linux-gnu/xorg/modules/drivers
  67. /opt/amdgpu-pro/lib/x86_64-linux-gnu/xorg/modules/extensions
  68. /usr/lib/dri
  69. EOF
  70.  
  71. cat > amdgpu-pro.sh <<EOF
  72. export LD_LIBRARY_PATH=\$(tr "\n" ":" < /etc/ld.so.conf.d/amdgpu-pro.conf ):\$LD_LIBRARY_PATH
  73. EOF
  74.  
  75. }
  76.  
  77. unpack_deb () {
  78.     ar x $1
  79.     tar -xJf data.tar.xz
  80.     rm -f control.tar.gz
  81.     rm -f debian-binary
  82.     rm -f data.tar.xz
  83. }
  84.  
  85. package_amdgpu-pro () {
  86.         umask 0022
  87.     pkgdesc="This package install all amdgpu-pro components in a monolithic way, except DKMS."
  88.     arch=('x86_64')
  89.     # You should edit the libtinfo PKGBUILDs and uncomment the line dealing with libtinfo.so.5 symlink. libvdpau_amdgpu.so.1.0.0 needs that.
  90.     depends=('lib32-libtinfo' 'libtinfo')
  91.  
  92.     export XZ_OPT="-T 0"
  93.     SRC="${srcdir}/${pkgname}-${PKGVER}"
  94.     rm -Rf "${srcdir}"
  95.     mkdir "${srcdir}"
  96.     cd "${srcdir}"
  97.     tar -xJf ${startdir}/${pkgname}-${PKGVER}.tar.xz
  98.    
  99.     #Get rid of dkms stuff.
  100.     rm -f ${SRC}/*dkms*
  101.    
  102.     #32 bit libs
  103.     cd ${pkgdir} #Quoted vars get problematic below
  104.         for f in ${SRC}/*_i386.deb;do
  105.             unpack_deb ${f}
  106.             sync
  107.         done
  108.         mv ${pkgdir}/lib ${pkgdir}/lib32
  109.         mv ${pkgdir}/lib32/* ${pkgdir}/usr/lib32/
  110.         rm -fR ${pkgdir}/lib32
  111.         mv ${pkgdir}/usr/lib/i386-linux-gnu/* ${pkgdir}/usr/lib32/
  112.         rm -fR ${pkgdir}/usr/lib
  113.         mv ${pkgdir}/opt/amdgpu-pro ${pkgdir}/opt/amdgpu-pro-32
  114.         cd ${pkgdir}/opt/amdgpu-pro-32/lib/i386-linux-gnu/vdpau
  115.         ln -s libvdpau_amdgpu.so.1 libvdpau_amdgpu.so
  116.         cd -
  117.         mkdir -p ${pkgdir}/etc/ld.so.conf.d
  118.         cp ${startdir}/amdgpu-pro-32.conf ${pkgdir}/etc/ld.so.conf.d/
  119.         mkdir -p ${pkgdir}/etc/profile.d
  120.         cp ${startdir}/amdgpu-pro-32.sh ${pkgdir}/etc/profile.d/
  121.         sed -i "s/amdgpu-pro/amdgpu-pro-32/" "${pkgdir}/etc/vulkan/icd.d/amd_icd32.json"
  122.         #Overlaps with 64 bit pkgs.
  123.         rm -fR "${pkgdir}/etc/{amd,xdg}"
  124.         rm -fR "${pkgdir}/usr/share/{doc,X11}"
  125.         sync
  126.        
  127.         #64 bit libs
  128.         for f in ${SRC}/*_amd64.deb;do
  129.             unpack_deb ${f}
  130.             sync
  131.         done
  132.         mv ${pkgdir}/lib/* ${pkgdir}/usr/lib/
  133.         rm -fR ${pkgdir}/lib
  134.         mv ${pkgdir}/usr/lib/x86_64-linux-gnu/* ${pkgdir}/usr/lib/
  135.         rm -fR ${pkgdir}/usr/lib/x86_64-linux-gnu
  136.         cd ${pkgdir}/opt/amdgpu-pro/lib/x86_64-linux-gnu/vdpau
  137.         ln -s libvdpau_amdgpu.so.1 libvdpau_amdgpu.so
  138.         cd -
  139.         cp ${startdir}/amdgpu-pro.conf ${pkgdir}/etc/ld.so.conf.d/
  140.         cp ${startdir}/amdgpu-pro.sh ${pkgdir}/etc/profile.d/
  141.        
  142.         #Common pkgs
  143.         for f in ${SRC}/*_all.deb;do
  144.             unpack_deb ${f}
  145.             sync
  146.         done
  147.        
  148. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top