summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 12560b6be01a22b62abb708e1c03170480c1f4b9 (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: Mark Wagie <mark dot wagie at proton dot me>
pkgname=paleta
pkgver=0.3.1
pkgrel=3
pkgdesc="Extract the dominant colors from any image."
arch=('x86_64')
url="https://github.com/nate-xyz/paleta"
license=('GPL-3.0-or-later')
depends=('libadwaita')
makedepends=(
  'cargo'
  'git'
  'meson'
)
checkdepends=('appstream-glib')
source=("git+https://github.com/nate-xyz/paleta.git#tag=v$pkgver")
sha256sums=('e4fd896fc1ab4112b8c26c5d24cb9a9262b10cb6c97551d84f6521bd1d19ca7c')

prepare() {
  cd "$pkgname"
  export RUSTUP_TOOLCHAIN=stable
  cargo fetch --target "$(rustc -vV | sed -n 's/host: //p')"
}

build() {
  CFLAGS+=" -ffat-lto-objects"
  export RUSTUP_TOOLCHAIN=stable
  arch-meson "$pkgname" build
  meson compile -C build
}

check() {
  meson test -C build --no-rebuild --print-errorlogs || :
}

package () {
  meson install -C build --no-rebuild --destdir "$pkgdir"
}