summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 103c07ee2d0f5a1e8e672a77b71119e2d43f0a6e (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: quietvoid <tcChlisop0@gmail.com>

pkgname=hdr10plus_tool-git
pkgver=1.5.2.r0.g478be3d
pkgrel=1
pkgdesc='CLI utility to work with HDR10+ in HEVC files'
arch=('x86_64')
url='https://github.com/quietvoid/hdr10plus_tool'
license=('MIT')
makedepends=('git' 'cargo')
conflicts=('hdr10plus_tool')
provides=('hdr10plus_tool')
source=(git+https://github.com/quietvoid/hdr10plus_tool.git)
sha256sums=('SKIP')

pkgver() {
  cd hdr10plus_tool

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

prepare() {
  cargo fetch \
    --locked \
    --manifest-path hdr10plus_tool/Cargo.toml
}

build() {
  cargo build \
    --release \
    --frozen \
    --manifest-path hdr10plus_tool/Cargo.toml
}

check() {
  cargo test \
    --release \
    --frozen \
    --manifest-path hdr10plus_tool/Cargo.toml
}

package() {
  cd hdr10plus_tool

  cargo install \
    --frozen \
    --offline \
    --no-track \
    --path . \
    --root "${pkgdir}"/usr

  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/hdr10plus_tool/LICENSE"
}