summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b56ec44ad7247608b9544caf0fa8a4c43a1ea502 (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
# Maintainer: Daniel Bermond <dbermond@archlinux.org>

pkgname=lcevcdec
pkgver=3.2.1
pkgrel=1
pkgdesc='Low Complexity Enhancement Video Codec Decoder (LCEVC_DEC)'
arch=('x86_64')
url='https://github.com/v-novaltd/LCEVCdec/'
license=('BSD-3-Clause-Clear')
depends=('fmt')
makedepends=('git' 'cmake' 'python' 'range-v3' 'rapidjson')
source=("git+https://github.com/v-novaltd/LCEVCdec.git#tag=${pkgver}"
        '010-lcevcdec-fix-pkgconfig-prefix.patch'
        '020-lcevcdec-fix__builtin_clzg-arguments.patch'::'https://github.com/v-novaltd/LCEVCdec/commit/43ef5a17ec1ced77f834136945b3cbfe2e46b9b4.patch')
sha256sums=('1e6b110e235ddcbc124f3fd1c8a7c7fa1603ec08dbc8b58c59c8f1a8995c9c0b'
            '8d4ed24ba3407f9ebb8397960bfebeebcd973f3f3febad6b52768530451d5b73'
            '940faa1bdd443841113f0b3e35200bee3a6f088d6353cc31d49ac5e598343856')

prepare() {
    patch -d LCEVCdec -Np1 -i "${srcdir}/010-lcevcdec-fix-pkgconfig-prefix.patch"
    patch -d LCEVCdec -Np1 -i "${srcdir}/020-lcevcdec-fix__builtin_clzg-arguments.patch"
}

build() {
    cmake -B build -S LCEVCdec \
        -DCMAKE_BUILD_TYPE:STRING='None' \
        -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
        -DVN_SDK_FFMPEG_LIBS_PACKAGE:STRING='' \
        -DVN_SDK_SAMPLE_SOURCE:BOOL='OFF' \
        -DVN_SDK_UNIT_TESTS:BOOL='OFF' \
        -Wno-dev
    cmake --build build
}

check() {
    ctest --test-dir build --output-on-failure
}

package() {
    DESTDIR="$pkgdir" cmake --install build
    mv "${pkgdir}/usr/pkgconfig" "${pkgdir}/usr/lib"
    install -D -m644 LCEVCdec/LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}"
    rm "${pkgdir}/usr"/{COPYING,README.md,conanfile.txt}
    rm -r "${pkgdir}/usr"/{licenses,src}
}