# Contributor: Thomas Aldrian <aldrian.thom@proton.me>
# Maintainer: team/gnome <aldrian.thom@proton.me>
pkgname=snapshot
pkgver=47.1
pkgrel=2
pkgdesc="Take pictures and videos"
url="https://gitlab.gnome.org/GNOME/snapshot"
arch="all !s390x"
license="GPL-3.0-or-later"
makedepends="
	cargo
	cargo-auditable
	desktop-file-utils
	glib-dev
	gst-plugins-bad-dev
	gst-plugins-base-dev
	gstreamer-dev
	gtk4.0-dev
	libadwaita-dev
	libseccomp-dev
	meson
	"
depends="
	gst-plugin-pipewire
	gst-plugins-bad
	gst-plugins-good
	pipewire
	"
subpackages="$pkgname-lang"
source="https://download.gnome.org/sources/snapshot/${pkgver%%.*}/snapshot-$pkgver.tar.xz
	cargo-auditable.patch
	"
case "$CARCH" in
loongarch64) ;;
*) depends="$depends gst-plugins-rs-gtk4 glycin-loaders" ;;
esac

build() {
	abuild-meson \
		. output
	meson compile -C output
}

check() {
	cargo test
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
721787f988931988a15d6378b4dbe4095edf3dd1f8251a34e23ee56154b05ce004cc441ff44e3109f9596197020cc04832d727d62d1694b16dcc69881678e1be  snapshot-47.1.tar.xz
e0546fe1fdf1e0cfe2f353adf931175ad385f40690f9aef89f45175f22048c3ee8c16017ae75ac074db70e7146c33b88984d7d87cb111a97da2bb92d845fb477  cargo-auditable.patch
"
