# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: team/gnome <pabloyoyoista@postmarketos.org>
pkgname=totem
pkgver=43.2
pkgrel=0
pkgdesc="Movie player for the GNOME desktop"
url="https://wiki.gnome.org/Apps/Videos"
arch="all"
license="GPL-2.0-or-later"
depends="
	grilo-plugins
	gsettings-desktop-schemas
	gst-plugins-bad
	gst-plugins-good
	gst-plugins-good-gtk
	"
makedepends="
	clutter-gtk-dev
	glib-dev
	gnome-desktop-dev
	gobject-introspection-dev
	grilo-dev
	gsettings-desktop-schemas-dev
	gst-plugins-base-dev
	gstreamer-dev
	gstreamer-tools
	gtk+3.0-dev
	itstool
	libhandy1-dev
	libpeas-dev
	libxml2-dev
	meson
	py3-gobject3-dev
	totem-pl-parser-dev
	vala
	"
checkdepends="xvfb-run desktop-file-utils appstream-glib"
subpackages="
	$pkgname-dev
	$pkgname-doc
	$pkgname-lang
	$pkgname-video-thumbnailer:video_thumbnailer
	"
source="https://download.gnome.org/sources/totem/${pkgver%.*}/totem-$pkgver.tar.xz"

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

check() {
	xvfb-run -a meson test --print-errorlogs -C output
}

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

video_thumbnailer() {
	pkgdesc="Video thumbnailer for the GNOME desktop"
	depends=

	amove usr/bin/totem-video-thumbnailer
}

sha512sums="
4ed3c1a1c5c70279f5f704c98f5cf6903eaacd1fe65c209b5086106a8401d3759ccfd4fa3c43eb542df854076fd08d487e691b7bf5864d5bf6f98c50f21b8dda  totem-43.2.tar.xz
"
