# Template file for 'gnome-secrets'
pkgname=gnome-secrets
version=12.3
revision=1
build_style=meson
hostmakedepends="pkg-config gettext gobject-introspection
 glib-devel desktop-file-utils gtk-update-icon-cache python3"
makedepends="libglib-devel gtk4-devel libadwaita-devel python3-gobject-devel gtksourceview5-devel"
depends="gtk4 libadwaita python3-gobject gtksourceview5
 python3-validators python3-pyotp python3-zxcvbn-rs-py python3-pykcs11 python3-pykeepass
 python3-pyhibp"
checkdepends="python3-pytest"
short_desc="Keepass compatible password manager for GNOME"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://gitlab.gnome.org/World/secrets"
distfiles="https://gitlab.gnome.org/World/secrets/-/archive/${version}/secrets-${version}.tar.gz"
checksum=068f69e607c24d5165b64cf06669bc4eccacd1d52b4c99e3385f4abac1564574
make_check=no  # Test suite fails, reported upstream: https://gitlab.gnome.org/World/secrets/-/issues/481

pre_check() {
	local testdir="${wrksrc}/.xbps-testdir/$(date +%s)"
	meson install -C build --destdir "${testdir}"
	export PATH="${testdir}/usr/bin:${PATH}" \
		PYTHONPATH="${testdir}/${py3_sitelib}"
}

gnome-passwordsafe_package() {
	depends="${sourcepkg}>=${version}_${revision}"
	metapackage=yes
	short_desc+=" - transitional dummy package"
}
