# Template file for 'kwin-x11'
# group=kde-plasma
pkgname=kwin-x11
version=6.7.4
revision=1
build_style=cmake
build_helper=qemu
configure_args="-DBUILD_TESTING=OFF -DFORCE_CROSSCOMPILED_TOOLS=ON
 -DKDE_INSTALL_QMLDIR=lib/qt6/qml
 -DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins"
hostmakedepends="extra-cmake-modules gettext pkg-config libcap-progs
 qt6-base qt6-tools qt6-declarative-host-tools wayland-devel hwids
 kf6-kwindowsystem
 python3 kf6-kpackage kf6-kconfig kf6-kauth-tools kf6-kcmutils kf6-kdoctools"
makedepends="qt6-tools-devel qt6-base-private-devel qt6-sensors-devel
 kf6-kglobalaccel-devel qt6-svg-devel kf6-kcolorscheme-devel kf6-kconfig-devel
 kf6-kconfigwidgets-devel kf6-kcoreaddons-devel kf6-kguiaddons-devel
 kf6-ki18n-devel kf6-kservice-devel kf6-kwidgetsaddons-devel
 kf6-kpackage-devel kf6-ksvg-devel kf6-kcmutils-devel kf6-knewstuff-devel
 kf6-kxmlgui-devel kf6-kdecoration-devel libdisplay-info-devel xorg-server-xwayland
 plasma-wayland-protocols kscreenlocker-devel plasma-activities-devel
 libqaccessibilityclient-devel kf6-kdeclarative-devel kf6-kauth-devel
 qt6-qt5compat-devel libcap-devel breeze-qt6 aurorae kglobalacceld-devel
 kf6-kidletime-devel kf6-kcrash-devel kf6-kwindowsystem-devel
 knighttime-devel kf6-kdoctools-devel libplasma-devel wayland-devel
 libcanberra-devel libX11-devel libxkbcommon-devel libdrm-devel
 eudev-libudev-devel lcms2-devel freetype-devel fontconfig-devel
 libqaccessibilityclient-devel libdisplay-info-devel libgbm-devel
 libei-devel libxkbcommon-devel kf6-knotifications-devel
 elogind-devel kf6-kdbusaddons-devel"
# transitive deps from kscreenlocker, for build ordering
makedepends+=" layer-shell-qt-devel libkf6screen-devel"
depends="aurorae kf6-kirigami"
short_desc="KDE X11 window manager"
maintainer="John <me@johnnynator.dev>"
license="GPL-2.0-or-later AND MIT"
homepage="https://invent.kde.org/plasma/kwin-x11"
distfiles="${KDE_SITE}/plasma/${version}/${pkgname}-${version}.tar.xz"
checksum=2c471ec076532b657a101761a3505ae4521aca3d90c86d783c813f42622a1e2e

# stage builds
makedepends+=" kde-plasma-base"
shlib_requires="KDE_Plasma.${version}"

kwin-x11-devel_package() {
	depends="${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/cmake
		vmove "usr/lib/*.so"
	}
}

post_install() {
	vlicense LICENSES/MIT.txt MIT.txt
}
