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

pkgname=uavs3e-git
pkgver=r187.g0a4e7c4
pkgrel=1
pkgdesc='An AVS3 encoder supporting AVS3-P2 baseline profile (git version)'
arch=('x86_64')
url='https://github.com/uavs3/uavs3e/'
license=('BSD')
depends=('glibc')
makedepends=('git' 'cmake')
provides=('uavs3e')
conflicts=('uavs3e')
source=('git+https://github.com/uavs3/uavs3e.git'
        '010-uavs3e-10bit.patch')
sha256sums=('SKIP'
            '8004c81cc9ee9bab08d179e4e8ecb5d4abe53d7eefefd16f9c6b36662587debb')

prepare() {
    cp -a uavs3e uavs3e-10bit
    patch -d uavs3e-10bit -Np1 -i "${srcdir}/010-uavs3e-10bit.patch"
}

pkgver() {
    printf 'r%s.g%s' "$(git -C uavs3e rev-list --count HEAD)" "$(git -C uavs3e rev-parse --short HEAD)"
}

build() {
    cd uavs3e
    cmake -B build/linux -S . \
        -DCMAKE_BUILD_TYPE:STRING='None' \
        -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
        -DCMAKE_SKIP_RPATH:BOOL='YES' \
        -DBUILD_SHARED_LIBS:BOOL='ON' \
        -Wno-dev
    make -C build/linux
    
    cd "${srcdir}/uavs3e-10bit"
    cmake -B build/linux -S . \
        -DCMAKE_BUILD_TYPE:STRING='None' \
        -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
        -DCMAKE_SKIP_RPATH:BOOL='YES' \
        -DBUILD_SHARED_LIBS:BOOL='ON' \
        -Wno-dev
    make -C build/linux
}

package() {
    make -C uavs3e/build/linux DESTDIR="$pkgdir" install
    make -C uavs3e-10bit/build/linux DESTDIR="$pkgdir" install
    install -D -m755 uavs3e/build/linux/uavs3enc -t "${pkgdir}/usr/bin"
    install -D -m755 uavs3e-10bit/build/linux/uavs3enc "${pkgdir}/usr/bin/uavs3enc-10bit"
    install -D -m644 uavs3e/COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}