# Contributor: Clayton Craft <clayton@craftyguy.net>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=cosmic-app-library
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-applibrary"
arch="aarch64 x86_64"
license="GPL-3.0-only"
depends="
	cosmic-icons
"
makedepends="
	cargo
	just
	libxkbcommon-dev
"
options="net !check"  # fetch dependencies, no tests
source="$pkgname-$pkgver.tar.gz::https://github.com/pop-os/cosmic-applibrary/archive/refs/tags/epoch-$_upstreamver.tar.gz"
builddir="$srcdir/cosmic-applibrary-epoch-$_upstreamver"

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

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

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

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

sha512sums="
22e61fd01aa7148bc6538ccc1101233117153f3889ad55e73e66eed222547ec39e88fc8759f6654347b55db596d159d4e12b39545a8f492aa8d57abb94a49a7c  cosmic-app-library-1.0.0_alpha7.tar.gz
"
