# Contributor: Clayton Craft <clayton@craftyguy.net>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=cosmic-launcher
pkgver=1.0.0_alpha7
_upstreamver="${pkgver/_alpha/-alpha.}"
pkgrel=0
pkgdesc="Application launcher for the COSMIC Desktop Environment"
url="https://github.com/pop-os/cosmic-launcher"
arch="x86_64 aarch64"
license="GPL-3.0-or-later"
depends="
	pop-launcher
"
makedepends="
	appstream-glib
	cargo
	desktop-file-utils
	intltool
	just
	libxkbcommon-dev
	wayland-dev
	wayland-protocols
"
options="net !check"  # fetch dependencies, no tests
source="$pkgname-$pkgver.tar.gz::https://github.com/pop-os/cosmic-launcher/archive/refs/tags/epoch-$_upstreamver.tar.gz"
builddir="$srcdir/$pkgname-epoch-$_upstreamver"

prepare() {
	default_prepare
	cargo fetch --target="$CTARGET" --locked
}

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

check() {
	cargo test --release --frozen
}

package() {
	just rootdir="$pkgdir" install
}

sha512sums="
bc9edccdcb2dafe804a7f8b4653edbfc0b4598dc3200dfe8789c13e2fa653ac0f9585e259a808decd69019d99c951af83d251bff7ea20e2d547e2217afc8abde  cosmic-launcher-1.0.0_alpha7.tar.gz
"
