summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: edc96ecb079f4e9ecb64e66d0b2bd35ed9e53d67 (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
# Maintainer: Daniel Bermond < gmail-com: danielbermond >

pkgname=libva-intel-driver-git
_srcname=intel-vaapi-driver
pkgver=2.2.0.r15.gecfb0dbc
pkgrel=1
pkgdesc='VA-API implementation for Intel G45 and HD Graphics family (git version)'
arch=('i686' 'x86_64')
url='https://01.org/linuxmedia/vaapi/'
license=('MIT')
depends=(
    # official repositories:
        'libdrm'
    # AUR:
        'libva-git'
)
makedepends=('git' 'meson')
provides=('libva-intel-driver')
conflicts=('libva-intel-driver')
replaces=('libva-driver-intel')
source=('git+https://github.com/intel/intel-vaapi-driver.git')
sha256sums=('SKIP')

prepare() {
    cd "$_srcname"
    
    # Only relevant if intel-gpu-tools is installed,
    # since then the shaders will be recompiled
    sed -i '1s/python$/&2/' src/shaders/gpp.py
}

pkgver() {
    cd "$_srcname"
    
    # git, tags available
    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
}

build() {
    cd "$_srcname"
    
    arch-meson . build
    ninja -C build
}

package() {
    cd "$_srcname"
    
    DESTDIR="$pkgdir" ninja -C build install
    
    install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}