# Contributor: Anjandev Momi <anjan@momi.ca>
# Maintainer: Anjandev Momi <anjan@momi.ca>
pkgname=peanutbutter
pkgver=0.3
pkgrel=0
pkgdesc="A lock screen for linux mobile - specially designed for Sxmo (sway edition)"
url="https://git.sr.ht/~anjan/peanutbutter"
# s390x: build fails on nix dependency
arch="all !s390x"
license="AGPL-3.0-only"
makedepends="cargo cargo-auditable"
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~anjan/peanutbutter/archive/$pkgver.tar.gz
	cargo-update.patch"
options="!check"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

package() {
	install -Dm755 target/release/peanutbutter \
		-t "$pkgdir"/usr/bin/
}

sha512sums="
1bff0df188a370e55048ed97bc0a4441b30ce31c67165d1c965ccd2e7b59f2d0dbd04f0ccee408129c02c3f33c38b839bf94e41f627b93585625242b6dc2a51c  peanutbutter-0.3.tar.gz
486b48ea176887c3af8bac0575f7bd1f6a5d3f84c0a836b143e0132f359ddfb2f53ae4a06b3255699fef8eb2e1879ecc4c44d1e2d7848acc907d89b3f1b1fde1  cargo-update.patch
"
