summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bb3c8b1ce62f17c6cb4b8e6fd517234b5cfe0660 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Maintainer: dakataca <danieldakataca@gmail.com>
# Contributor: Ivan Shapovalov <intelfx@intelfx.name>
# Contributor: Francois Menning <f.menning@protonmail.com>
# Contributor: ava1ar <mail@ava1ar.me>
# Contributor: Duong Pham <dthpham@gmail.com>
# Contributor: Eric Quackenbush <mail@ericquackenbush.com>
# Contributor: Wei-Ning Huang <aitjcize@gmail.com>

pkgname=intel-opencl
_pkgver=5.0-63503
pkgver="${_pkgver/-/.r}"
pkgrel=2
pkgdesc="Legacy OpenCL(TM) driver 1.2 or 2.0, for Intel graphics from Ivy Bridge GPU model (gen 7), to Haswell (gen 7.5) for Linux (pre-Broadwell)"
arch=('x86_64')
url="https://software.intel.com/en-us/articles/legacy-opencl-drivers#latest_linux_driver"
license=('custom:intel')
depends=('zlib' 'libdrm')
optdepends=('intel-opencl-sdk: Intel SDK for OpenCL Applications')
provides=('opencl-driver')
source=("${pkgname}-${pkgver}-linux64.zip::https://web.archive.org/web/20190526190814if_/https://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_linux64.zip")
#source=("$pkgname-$pkgver-linux64.zip")
sha256sums=('a3989a7a00f216b1a50bad37dc49629c3f7ce65104a2ca665e59d8c699bf7443') #updpkgsums to generate.

# Paquetes internos:
_package_internal=("intel-opencl-r${_pkgver}.$arch.tar.xz"
                   "intel-opencl-devel-r$_pkgver.$arch.tar.xz"
                   "intel-opencl-cpu-r${_pkgver}.$arch.tar.xz")

# Alistar ficheros en el directorio de instalación.
package() {
	# Extraer paquetes internos con "tar".
	for p in "${_package_internal[@]}"; do
		tar -xf "$p" -C "$pkgdir"
	done

	# Copy license
	install -D "$pkgdir/opt/intel/opencl/LICENSE" "$pkgdir/usr/share/licenses/intel-opencl/LICENSE"

	# Renombrar el archivo de índice de control de dispositivo (ICD) de "intel.icd" a "intel-gpu.icd"
	# para evitar conflictos con el archivo "intel.icd" del paquete "intel-opencl-runtime".
	mv "$pkgdir/etc/OpenCL/vendors/intel"{,-gpu}.icd


	## Sanitizar o asegurar los permisos del paquete intel-opencl ##
	
	# Cambiar la propiedad del directorio y sus subdirectorios a root:root.
	chown root:root -R "$pkgdir"

	# Quitar los permisos de escritura para los grupos y otros.
	chmod go-w -R "$pkgdir"
}

## Source:
# https://web.archive.org/web/20190526190814if_/https://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_linux64.zip

## References:
# https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Can-t-find-opencl-driver/m-p/1149053#M12047

## Test:
# updpkgsums
# makepkg --printsrcinfo > .SRCINFO
# git clean -dfx

# 👤 Autor: https://t.me/dakataca 💻 🐬 #