Created
February 5, 2017 20:45
-
-
Save asdkant/10c1b6570d1547f9d28a1ea4fa185cbe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: grmat <grmat@sub.red> | |
# fixed with 16.40 instead of 16.60 by Ariel Kanterewicz <ariel@aknt.com.ar> | |
pkgname=opencl-amd | |
pkgdesc="OpenCL userspace driver as provided in the amdgpu-pro driver stack. This package is intended to work along with the free amdgpu stack." | |
pkgver=16.40.348864 | |
pkgrel=1 | |
arch=('x86_64') | |
url='http://www.amd.com' | |
license=('custom:AMD') | |
makedepends=('wget') | |
depends=('ocl-icd') | |
optdepends=('linux-cik: amdgpu support for CIK cards (Bonaire/Hawaii series)') | |
conflicts=('amdgpocl') | |
DLAGENTS='https::/usr/bin/wget --referer https://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Driver-for-Linux-Release-Notes.aspx -N %u' | |
prefix='amdgpu-pro-' | |
major='16.40' | |
minor='348864' | |
shared="opt/amdgpu-pro/lib/x86_64-linux-gnu" | |
source=("https://www2.ati.com/drivers/linux/ubuntu/${prefix}${major}-${minor}.tar.xz") | |
sha256sums=('59d6b1d975164ff45f6e6be5af6bcc061bf9ef6378ac5757bdb4e67840a706b0') | |
pkgver() { | |
echo "${major}.${minor}" | |
} | |
package() { | |
mkdir "${srcdir}/opencl" | |
cd "${srcdir}/opencl" | |
ar x "${srcdir}/${prefix}${major}-${minor}/opencl-amdgpu-pro-icd_${major}-${minor}_amd64.deb" | |
tar xJf data.tar.xz | |
cd ${shared} | |
sed -i "s|libdrm_amdgpu|libdrm_amdgpo|g" libamdocl64.so | |
mkdir "${srcdir}/libdrm" | |
cd "${srcdir}/libdrm" | |
ar x "${srcdir}/${prefix}${major}-${minor}/libdrm-amdgpu-pro-amdgpu1_2.4.66-${minor}_amd64.deb" | |
tar xJf data.tar.xz | |
cd ${shared} | |
rm "libdrm_amdgpu.so.1" | |
mv "libdrm_amdgpu.so.1.0.0" "libdrm_amdgpo.so.1.0.0" | |
ln -s "libdrm_amdgpo.so.1.0.0" "libdrm_amdgpo.so.1" | |
mv "${srcdir}/opencl/etc" "${pkgdir}/" | |
mkdir -p ${pkgdir}/usr/lib | |
mv "${srcdir}/opencl/${shared}/libamdocl64.so" "${pkgdir}/usr/lib/" | |
mv "${srcdir}/opencl/${shared}/libamdocl12cl64.so" "${pkgdir}/usr/lib/" | |
mv "${srcdir}/libdrm/${shared}/libdrm_amdgpo.so.1.0.0" "${pkgdir}/usr/lib/" | |
mv "${srcdir}/libdrm/${shared}/libdrm_amdgpo.so.1" "${pkgdir}/usr/lib/" | |
rm -r "${srcdir}/opencl" | |
rm -r "${srcdir}/libdrm" | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment