summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f647789c51ff31af65950440bd5f07e92c74c850 (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: Damian Höster <damian dot hoester at posteo dot de>

_pkgname=hdrcopier
pkgname=$_pkgname-git
pkgver=0.2.3.r22.91c75fa
pkgrel=1
pkgdesc='Copies colorspace and HDR metadata from one file to another'
arch=(x86_64)
url=https://github.com/shssoichiro/hdrcopier
license=(MIT)
makedepends=(
  git
  cargo
)
depends=(
  mkvtoolnix-cli
  mediainfo
  ffmpeg
)
provides=($_pkgname)
conflicts=($_pkgname)
source=($_pkgname::git+$url.git)
sha256sums=(SKIP)

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

prepare() {
  cd $_pkgname
  cargo fetch --locked --target x86_64-unknown-linux-gnu
}

build() {
  cd $_pkgname
  RUSTUP_TOOLCHAIN=stable
  CARGO_TARGET_DIR=target
  cargo build --release --frozen
}

package() {
  install -Dvm755 $_pkgname/target/release/$_pkgname -t "$pkgdir/usr/bin"
  install -Dm644 $_pkgname/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}