summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6fdab7dea365c0723b3ae30880fa9ecb43263566 (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
# Maintainer: James Williams <jowilliams12000 at gmail dot com>
pkgname=wallust
pkgver=3.0.0
pkgrel=1
pkgdesc="generate colors from an image"
arch=('any')
url="https://codeberg.org/explosion-mental/wallust"
license=('custom:MIT')
makedepends=('cargo')
optdepends=('imagemagick')
source=("$pkgname-$pkgver.tar.gz::https://static.crates.io/crates/$pkgname/$pkgname-$pkgver.crate")
options=('!lto')
sha256sums=('145ca5f09aa4905484541f7b68777097aa277b9ba6565f0ff17699c2a9e19767')

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

build() {
	cd "$pkgname"-"$pkgver"
	export RUSTUP_TOOLCHAIN=stable
	export CARGO_TARGET_DIR=target
	cargo build --features themes,doc --frozen --release
}

package() {
	cd "$pkgname"-"$pkgver"
	install -Dm755 -t "${pkgdir}/usr/bin" target/release/wallust
	install -Dm644 -t "${pkgdir}/usr/share/man/man1" man/wallust.1 man/wallust-theme.1 man/wallust-cs.1 man/wallust-run.1
	install -Dm644 -t "${pkgdir}/usr/share/man/man5" man/wallust.5
	install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/wallust/LICENSE"
}