# Contributor: Clayton Craft <clayton@craftyguy.net>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=cosmic-notifications
pkgver=1.0.0_alpha7
_upstreamver="${pkgver/_alpha/-alpha.}"
pkgrel=0
pkgdesc="Notification daemon for the COSMIC Desktop Environment"
url="https://github.com/pop-os/cosmic-notifications"
arch="aarch64 x86_64"
license="GPL-3.0-only"
depends="
	cosmic-icons
"
makedepends="
	cargo
	just
	libxkbcommon-dev
	wayland-dev
"
options="net !check"  # fetch dependencies, no tests
source="$pkgname-$pkgver.tar.gz::https://github.com/pop-os/cosmic-notifications/archive/refs/tags/epoch-$_upstreamver.tar.gz"
builddir="$srcdir/$pkgname-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="
bf55895870f8f5c0233ba1ffa1a62a0810b362b98519b70e7910c35832bf6406496b9f6b03f29dacac4b5a1ffd8f3aa49bb2160ae9a4ddb5f58cb188780b3871  cosmic-notifications-1.0.0_alpha7.tar.gz
"
