pkgname=networkmanager-qt
pkgver=5.46.0
pkgrel=0
pkgdesc='Qt wrapper for NetworkManager API'
arch="all"
url='https://community.kde.org/Frameworks'
license="LGPL-2.1"
depends="networkmanager"
depends_dev="networkmanager-dev"
makedepends="$depends_dev extra-cmake-modules doxygen qt5-qttools-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz"

build() {
	cd "$builddir"
	cmake "$srcdir"/${pkgname}-${pkgver} \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DKDE_INSTALL_LIBDIR=lib \
		-DBUILD_TESTING=OFF \
		-DBUILD_QCH=ON
	make
}

check() {
	cd "$builddir"
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}


package() {
	cd "$builddir"
	make DESTDIR="${pkgdir}" install
}
sha512sums="6ea85f44a014fb11f7274d7d81b22bea81d7025d691d56393d6c67732ecc081fb78c5a7b26be8ce6c7edcde23078a4f2e52c68f5ff04fca512b2225a509b63a7  networkmanager-qt-5.46.0.tar.xz"
