mirh

PKGBUILD

Jul 25th, 2018
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.46 KB | None | 0 0
  1. # Half-asser: mirh
  2.  
  3. pkgname=('16.101.X_Repack_Catalyst-Win7_64_17.X.X_')
  4. pkgver=16.101.2901.1003
  5. pkgrel=1
  6. pkgdesc="AMD/ATI Catalyst drivers utilities and libraries."
  7. arch=('x86_64')
  8. url="http://www.amd.com"
  9. license=('custom')
  10. makedepends=('p7zip>=15.07' 'rsync')
  11. source=(http://download.windowsupdate.com/c/msdownload/update/driver/drvs/2016/08/20914313_3c31ab0de83f8a6264c0c75883ce366752eeab9d.cab
  12. http://download.windowsupdate.com/d/msdownload/update/driver/drvs/2016/06/20885003_3519f4d116c54a7a0368e99f528ffe06dfea3304.cab
  13. http://download.windowsupdate.com/c/msdownload/update/driver/drvs/2017/03/6a405032-a970-44fb-ac93-6fff53822c65_93722c39b14ac032c71ade1c5f7eaa7b40318202.cab
  14. https://www2.ati.com/drivers/whql-win8.1-64bit-radeon-software-crimson-relive-17.2.1-feb28.exe
  15. https://www2.ati.com/drivers/beta/amd-catalyst-15.11.1beta-64bit-win10-win8.1-win7-nov14.exe
  16. https://www2.ati.com/drivers/beta/non-whql-64bit-nieg-radeon-crimson-16.2.1-win10-win8.1-win7-feb27.exe
  17. )
  18. sha1sums=('3c31ab0de83f8a6264c0c75883ce366752eeab9d'
  19.           '3519f4d116c54a7a0368e99f528ffe06dfea3304'
  20.           '93722c39b14ac032c71ade1c5f7eaa7b40318202'
  21.           'f5d9885c7f6f8da47c57c6d94af28d6d709c9cb1'
  22.           '5a37443d499652dfab2bc41ee8ca905e0292c70b'
  23.           'c744c06ca57b6d2c5c305554e98db42d7d0b3906')
  24. noextract=("${source[@]##*/}")
  25. NOBUILD=1
  26. NOARCHIVE=1
  27.          
  28. url_ref="http://support.amd.com/en-us/download/desktop?os=Linux+x86"
  29. DLAGENTS="https::/usr/bin/curl --referer ${url_ref} -o %o %u"
  30.  
  31. prepare() {
  32. #TODO: only extract the files we *actually* need?
  33.     7z x -bso0 20914313_3c31ab0de83f8a6264c0c75883ce366752eeab9d.cab -o16.101
  34.     7z x -bso0 amd-catalyst-15.11.1beta-64bit-win10-win8.1-win7-nov14.exe -obase
  35.     7z x -bso0 20885003_3519f4d116c54a7a0368e99f528ffe06dfea3304.cab -oOCL
  36.     7z x -bso0 whql-win8.1-64bit-radeon-software-crimson-relive-17.2.1-feb28.exe -oADL
  37.     7z x -bso0 6a405032-a970-44fb-ac93-6fff53822c65_93722c39b14ac032c71ade1c5f7eaa7b40318202.cab -oHDMI10
  38.     7z x -bso0 non-whql-64bit-nieg-radeon-crimson-16.2.1-win10-win8.1-win7-feb27.exe -oHDMI
  39.    
  40.     cd "${srcdir}"/OCL/b302643/
  41.     install -Dpt "${pkgdir}/Packages/Drivers/Display/WT6A_INF/B305648" {atiumdva.*,atiumd6a.*,amd*o*cl*.dll,clinfo.exe}
  42.    
  43.     cd "${srcdir}"/ADL/Packages/Drivers/Display/WB6A_INF/B311170/
  44.     7z e -bso0 'atia*x*.*_' -o"${pkgdir}/Packages/Drivers/Display/WT6A_INF/B305648"
  45.     install -p atiapfxx.blb "${pkgdir}/Packages/Drivers/Display/WT6A_INF/B305648"
  46.    
  47.     cd "${srcdir}"/HDMI10
  48.     install -Dpt "${pkgdir}/Packages/Drivers/WDM/HDMI/WT64A" *.???
  49.     sed -i -e 's/;%/%/g' "${pkgdir}/Packages/Drivers/WDM/HDMI/WT64A/AtihdWT6.inf"
  50.     cd "${srcdir}"/HDMI/Packages/Drivers
  51.     cp -prn *M* "${pkgdir}/Packages/Drivers"
  52.    
  53.     cd "${srcdir}"/16.101
  54.     rsync -rt --exclude=ccc2_install.exe --ignore-existing * "${pkgdir}/Packages/Drivers/Display/WT6A_INF"
  55.    
  56.     cd "${srcdir}"/base
  57.     cp -pr {Bin64,Config,Images,*.dll,*.exe} "${pkgdir}/"
  58.     # forums.guru3d.com/showthread.php?t=373501 seems important, and 15.3xx branch either miss them, or has .sys suspiciously smaller
  59.     cd Packages && cp -pr Drivers/amdkm*fd "${pkgdir}/Packages/Drivers"
  60.     rsync -rt Apps/{ACP64,AppEx,CCC2,CIM,SteadyVideo,VC12RTx64,VC12RTx86,WirelessDisplay64} "${pkgdir}/Packages/Apps"
  61.      
  62.       #a patch could be shipped to edit .infs (or included inside this script?)
  63.       #patch -Np1 -i ../GPUs.patch
  64.    
  65.     if [ -e /usr/lib/p7zip/7z.sfx ]; then
  66.         cd "${pkgdir}"/../
  67.         7z a -sfx7z.sfx magic.exe "${pkgname}"
  68.     else
  69.         warning "You miss the dandy SFXWin module, so.. take care of that"
  70.     fi
  71. }
Add Comment
Please, Sign In to add comment