diff options
author | Daniel Bermond | 2018-04-14 01:27:46 +0000 |
---|---|---|
committer | Daniel Bermond | 2018-04-14 02:37:22 +0000 |
commit | 56a64e7f2d6214e85c81513c934786c9325b4060 (patch) | |
tree | c2939d00bdaa000192b689fba394856dbee12beb | |
parent | 1eff7b051bd756237c2850741d3afeb232adbbb8 (diff) | |
download | aur-56a64e7f2d6214e85c81513c934786c9325b4060.tar.gz |
Do not force the use of 'iHD' libva driver by default
This will let the user choose which libva driver to use. No other
libva driver package on the official repositories force the setting
of the installed driver by default. This makes sense because the
user can install this additional iHD driver without modifying any
settings that he might have previously configured.
Configuration is done by setting the 'LIBVA_DRIVER_NAME'
environment variable. In the case of this package, it
must be setted to 'iHD'. See the Wiki page on Hardware
video acceleration (VA-API sections) for details. An
informative message is shown during install and upgrade.
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | PKGBUILD | 9 | ||||
-rw-r--r-- | intel-media-driver-git.install | 9 |
3 files changed, 17 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = intel-media-driver-git pkgdesc = Intel Media Driver for VAAPI (git version) pkgver = r408.eb470bc.gmmlib.r34.2eea1a1 - pkgrel = 2 + pkgrel = 3 url = https://github.com/intel/media-driver/ install = intel-media-driver-git.install arch = x86_64 @@ -14,6 +14,7 @@ pkgbase = intel-media-driver-git provides = intel-media-driver conflicts = intel-media-driver options = !emptydirs + backup = etc/profile.d/intel-media.sh source = intel-media-driver-git::git+https://github.com/intel/media-driver.git source = gmmlib-git::git+https://github.com/intel/gmmlib.git sha256sums = SKIP @@ -2,7 +2,7 @@ pkgname=intel-media-driver-git pkgver=r408.eb470bc.gmmlib.r34.2eea1a1 -pkgrel=2 +pkgrel=3 pkgdesc='Intel Media Driver for VAAPI (git version)' arch=('x86_64') url='https://github.com/intel/media-driver/' @@ -11,6 +11,7 @@ depends=('gcc-libs' 'libva') makedepends=('git' 'cmake') provides=('intel-media-driver') conflicts=('intel-media-driver') +backup=('etc/profile.d/intel-media.sh') options=('!emptydirs') install="${pkgname}.install" source=("$pkgname"::'git+https://github.com/intel/media-driver.git' @@ -57,8 +58,14 @@ build() { package() { cd build + make DESTDIR="$pkgdir" install + # do not force the use of 'iHD' libva driver by default (let user choose) + local _info='uncomment the LIBVA_DRIVER_NAME line to use the Intel Media Driver (iHD) for VAAPI' + sed -i "2i\\ \\${_info}" "${pkgdir}/etc/profile.d/intel-media.sh" + sed -i '/LIBVA_DRIVER_NAME/s/^/#/' "${pkgdir}/etc/profile.d/intel-media.sh" + # license cd "${srcdir}/${pkgname}" install -D -m644 LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" diff --git a/intel-media-driver-git.install b/intel-media-driver-git.install index bd3460e59fae..bed3c13f5b17 100644 --- a/intel-media-driver-git.install +++ b/intel-media-driver-git.install @@ -1,4 +1,9 @@ post_install() { - printf '%s\n' 'For the proper configuration of Intel VAAPI media driver,' - printf '%s\n' 'you need to re-login or source /etc/profile.d/intel-media.sh' + printf '%s\n' 'In order to use the the Intel Media Driver for VAAPI you need to set the' + printf '%s\n' "environment variable 'LIBVA_DRIVER_NAME' to 'iHD'. You can do this, for" + printf '%s\n' "example, by uncommenting the proper line in '/etc/profile.d/intel-media.sh'." +} + +post_upgrade() { + post_install } |