# Template file for 'gpgme-qt6'
pkgname=gpgme-qt6
version=2.2.0
revision=3
build_style=cmake
hostmakedepends="gnupg pkg-config qt5-host-tools qt5-qmake qt6-base"
makedepends="libassuan-devel libgpg-error-devel qt5-devel qt6-base-devel gpgme-devel
 gpgmepp-devel"
checkdepends="which gnupg"
short_desc="GnuPG Made Easy - Qt6 binding"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later, LGPL-2.1-or-later"
homepage="https://www.gnupg.org/software/gpgme/index.html"
changelog="https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgmeqt.git;a=blob_plain;f=NEWS;hb=HEAD"
distfiles="https://www.gnupg.org/ftp/gcrypt/qgpgme/qgpgme-${version}.tar.xz"
checksum=3c6290ff5bfeab981bb48b2951703761f1dbea640cb637beb3560d5fefb0e0b3

gpgmeqt_package() {
	short_desc="GnuPG Made Easy - Qt5 binding"
	pkg_install() {
		vmove "usr/lib/libqgpgme.so.*"
	}
}

gpgmeqt-devel_package() {
	depends="gpgme-devel qt5-devel gpgmeqt>=${version}_${revision}"
	replaces="gpgmeqt-headers<=1.24.0"
	short_desc="GnuPG Made Easy - Qt5 development files"
	pkg_install() {
		vmove usr/include/qgpgme-qt5
		vmove usr/lib/libqgpgme.so
		vmove usr/lib/cmake/QGpgme
	}
}

gpgme-qt6-devel_package() {
	depends="gpgmepp-devel qt6-base-devel gpgme-qt6>=${version}_${revision}"
	replaces="gpgmeqt-headers<1.24.0"
	short_desc="GnuPG Made Easy - Qt6 development files"
	pkg_install() {
		vmove usr/include/qgpgme-qt6
		vmove usr/lib/libqgpgmeqt6.so
		vmove usr/lib/cmake/QGpgmeQt6
	}
}
