summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 121f133c6cd8247c8f777cbdd033723b64b37ead (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
# Maintainer : Daniel Bermond <dbermond@archlinux.org>
# Contributor: dummyx <dummyxa at gmail dot com>

pkgname=vvenc
pkgver=1.13.0
pkgrel=1
pkgdesc='A H.266/VVC (Versatile Video Coding) encoder'
arch=('x86_64')
url='https://github.com/fraunhoferhhi/vvenc/'
license=('BSD-3-Clause-Clear')
depends=('gcc-libs')
makedepends=('cmake')
source=("https://github.com/fraunhoferhhi/vvenc/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz"
        '010-vvenc-fix-unit-test-with-shared-lib.patch'::"https://github.com/fraunhoferhhi/vvenc/pull/492/commits/42763a903fe122bc203f3aa9bbe5a5f4754758a0.patch")
sha256sums=('28994435e4f7792cc3a907b1c5f20afd0f7ef1fcd82eee2af7713df7a72422eb'
            '324299c2f01d16c1c77175318ddd3d102e14508da1d4d380f9591b52a946bd2b')

prepare() {
    patch -d "${pkgname}-${pkgver}" -Np1 -i "${srcdir}/010-vvenc-fix-unit-test-with-shared-lib.patch"
}

build() {
    cmake -B build -S "${pkgname}-${pkgver}" \
        -G 'Unix Makefiles' \
        -DBUILD_SHARED_LIBS:BOOL='ON' \
        -DCMAKE_BUILD_TYPE:STRING='None' \
        -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
        -DCMAKE_SKIP_RPATH:BOOL='YES' \
        -DVVENC_INSTALL_FULLFEATURE_APP:BOOL='ON' \
        -Wno-dev
    cmake --build build
}

check() {
    export LD_LIBRARY_PATH="${srcdir}/build/source/Lib/vvenc"
    ctest --test-dir build --output-on-failure
}

package() {
    DESTDIR="$pkgdir" cmake --install build
    cp -dr --no-preserve='ownership' build/source/Lib/vvenc/*.so* "${pkgdir}/usr/lib"
    install -D -m755 build/source/App/{vvencapp/vvencapp,vvencFFapp/vvencFFapp} -t "${pkgdir}/usr/bin"
    install -D -m644 "${pkgname}-${pkgver}/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}