# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=piow
pkgver=0.6.0
pkgrel=0
pkgdesc="Put Icons On your sway Workspaces"
url="https://github.com/KuabeM/piow"
arch="all"
license="MIT OR Apache-2.0"
depends="sway-virtual"
makedepends="cargo cargo-auditable"
source="https://github.com/KuabeM/piow/archive/v$pkgver/piow-$pkgver.tar.gz
	cargo.lock.patch
	strip-features.patch
	"
options="!check"  # no tests provided

export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"

prepare() {
	default_prepare

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

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

check() {
	cargo test --frozen
}

package() {
	install -D -m755 target/release/piow -t "$pkgdir"/usr/bin/
	install -D -m644 default.toml "$pkgdir"/etc/xdg/piow/config.toml
}

sha512sums="
193b1a09bd0890a1e72bf62b09db476cb32b412d7389977e1da377450d6fabd6ffc0bff735ae8165fd3f48c7794b6d10d48c7084009cdeeb6710094e10194499  piow-0.6.0.tar.gz
c6509ad5831265382bd1ca29c6ba61c10abc8b535c7cf812ade6be3fc4f4ca6417fa9faa0c4058ba434366c2c81b2f825c74583392e4228e6c2eecdf5901160b  cargo.lock.patch
69afc4e76a0a6acadc7f2c9468bd7b1467b8f42594c367d4ec2374e4cd8e4c66280d90e19bcbdc0f02ee14abd597873761faef541d7cc274a09f020c34c2f51d  strip-features.patch
"
