# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-other
maintainer="team/kde <bribbers@disroot.org>"
pkgname=pulseaudio-qt
pkgver=1.7.0
pkgrel=0
# armhf blocked by qt6-qtdeclarative
arch="all !armhf"
url="https://invent.kde.org/libraries/pulseaudio-qt"
pkgdesc="Pulseaudio bindings for Qt"
license="LGPL-2.1-only OR LGPL-3.0-only"
depends_dev="
	glib-dev
	pulseaudio-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	"
makedepends="$depends_dev
	doxygen
	extra-cmake-modules
	graphviz
	qt6-qttools-dev
	samurai
	"
subpackages="$pkgname-dev $pkgname-doc"
_repo_url="https://invent.kde.org/libraries/pulseaudio-qt.git"
source="https://download.kde.org/stable/pulseaudio-qt/pulseaudio-qt-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DBUILD_WITH_QT6=ON \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	ctest --test-dir build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
e59f30eff77bfcb566b4215e9c3aea2a39acde4fdc460eb768da3280ffece8b63547345e0fb3e65b5a50321889f4c210525b141148b027b71cb5a48942402b3b  pulseaudio-qt-1.7.0.tar.xz
"
