# Template file for 'signond'
pkgname=signond
version=8.61
revision=3
_commit="c8ad98249af541514ff7a81634d3295e712f1a39"
build_style=qmake
configure_args="LIBDIR=/usr/lib .."
conf_files="/etc/signond.conf"
hostmakedepends="pkg-config doxygen qt6-base"
makedepends="qt6-base-devel"
short_desc="Daemon providing SSO over D-Bus for the gSSO framework"
maintainer="John Rowley <enterthevoid@codesector.co>"
license="LGPL-2.1-only"
homepage="https://gitlab.com/accounts-sso/signond"
distfiles="https://gitlab.com/accounts-sso/signond/-/archive/$_commit/signond-$_commit.tar.gz"
checksum=2c3dd97fcdb90f38bb9884f7e11d0fb9ba214f78bddaacb27e4969cefff7d690

post_extract() {
	mkdir -p build-qt6
}

pre_configure() {
	build_wrksrc=build-qt6
}

do_build() {
	make -C build-qt6 ${make_jobs}
}

do_install() {
	make -C build-qt6 install DESTDIR=${DESTDIR} PREFIX=/usr \
		INSTALL_ROOT=${DESTDIR} STRIP=true
}

signond-doc_package() {
	short_desc+=" - documentation"
	pkg_install() {
		vmove usr/share/doc
	}
}

signond-devel_package() {
	short_desc+=" - development files"
	depends="qt6-base-devel ${sourcepkg}>=${version}_${revision}"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/*.so
		vmove usr/lib/pkgconfig
		vmove usr/lib/*.a
		vmove usr/lib/cmake
	}
}
