summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2e4c4ff3f21d1fe6dafaabc048962158823478f5 (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
# Maintainer: Thibault Saunier <tsaunier@gnome.org>
# Contributor: Arti Zirk <arti.zirk@gmail.com>

pkgname="dssim-git"
_pkgname="dssim"
pkgrel=1
pkgver=3.2.4.r9.gfb60e92
pkgdesc="Image similarity comparison simulating human perception (multiscale SSIM in Rust)"
arch=('x86_64')
url="https://github.com/pornel/dssim/"
license=(AGPL)
depends=()
makedepends=('git' 'rust')
source=("git+https://github.com/pornel/${_pkgname}.git")
sha256sums=('SKIP')

pkgver() {
  cd "${srcdir}/${_pkgname}"
  git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "${srcdir}/${_pkgname}"
  cargo build --release
}

package() {
  cd "${srcdir}/${_pkgname}"
  install -Dm755 target/release/${_pkgname} "${pkgdir}/usr/bin/${_pkgname}"
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
}