# Template file for 'libkcddb'
pkgname=libkcddb
version=24.08.0
revision=1
build_style=cmake
configure_args="-DKF5_HOST_TOOLING=/usr/lib/cmake -DQT_MAJOR_VERSION=5"
hostmakedepends="extra-cmake-modules gettext kconfig kcoreaddons kdoctools
 qt5-host-tools qt5-qmake kcmutils-devel"
makedepends="kcmutils-devel kio-devel libmusicbrainz5-devel"
depends="libkcddb6"
short_desc="KDE CDDB library"
maintainer="Piotr Wójcik <chocimier@tlen.pl>"
license="GPL-2.0-or-later, LGPL-2.0-or-later, BSD-3-Clause, GFDL-1.2-only"
homepage="https://projects.kde.org/projects/kde/kdemultimedia/libkcddb"
changelog="https://kde.org/announcements/changelogs/gear/${version}/#libkcddb"
distfiles="${KDE_SITE}/release-service/${version}/src/libkcddb-${version}.tar.xz"
checksum=62cb6882bff4ce274bc5e98715decc8b8964f9809178219ef49cbd37d091941a

post_install() {
	rm -rf "$DESTDIR/usr/share"
}

do_check() {
	cd build
	broken="musicbrainztest-severaldiscs"
	broken+="|asynchttplookuptest"
	broken+="|asynccddblookuptest"
	broken+="|synccddblookuptest"
	broken+="|synchttplookuptest"
	broken+="|utf8test"
	ctest -E "($broken)"
}

libkcddb-devel_package() {
	depends="libkcddb>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/lib/cmake
		vmove usr/include
		vmove "usr/lib/*.so"
		vmove usr/lib/qt5/mkspecs
		vlicense LICENSES/BSD-3-Clause.txt
	}
}
