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

pkgname=libmfx-git
_srcname=mfx_dispatch
pkgver=1.25.r0.gb93a3ac
pkgrel=1
pkgdesc='Intel Media SDK dispatcher library (git version)'
arch=('i686' 'x86_64')
url='https://github.com/lu-zero/mfx_dispatch/'
license=('BSD')
depends=('libva')
makedepends=('git')
provides=('libmfx')
conflicts=('libmfx')
source=('git+https://github.com/lu-zero/mfx_dispatch.git')
sha256sums=('SKIP')

prepare() {
    cd "$_srcname"
    
    autoreconf -i
}

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

build() {
    cd "$_srcname"
    
    ./configure \
        --prefix='/usr' \
        --enable-shared='yes' \
        --with-libva_drm='yes' \
        --with-libva_x11='yes' \
        --with-pic
        
    make
}

package() {
    cd "$_srcname"
    
    make DESTDIR="$pkgdir" install
    
    # fix version in pkg-config file
    sed -i "/Version:/s/[0-9]\.[0-9]\{2\}/${pkgver}/" "${pkgdir}/usr/lib/pkgconfig/libmfx.pc"
    
    install -D -m644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}