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

pkgname=libultrahdr-git
pkgver=1.0.0.r167.ge9932b3
pkgrel=1
pkgdesc='Codec for the Ultra HDR format (git version)'
arch=('x86_64')
url='https://github.com/google/libultrahdr/'
license=('Apache-2.0')
depends=('gcc-libs' 'libjpeg')
makedepends=('git' 'cmake')
provides=('libultrahdr')
conflicts=('libultrahdr')
source=('git+https://github.com/google/libultrahdr.git')
sha256sums=('SKIP')

pkgver() {
    git -C libultrahdr describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
}

build() {
    cmake -B build -S libultrahdr \
        -G 'Unix Makefiles' \
        -DCMAKE_BUILD_TYPE:STRING='None' \
        -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
        -DUHDR_BUILD_TESTS:BOOL='ON' \
        -Wno-dev
    cmake --build build
}

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

package() {
    DESTDIR="$pkgdir" cmake --install build
    install -D -m755 build/ultrahdr_app -t "${pkgdir}/usr/bin"
}