# Template file for 'better-blur-dx'
pkgname=better-blur-dx
version=2.5.1
revision=2
build_style=cmake
configure_args="
 -DKDE_INSTALL_QMLDIR=lib/qt6/qml -DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins"
hostmakedepends="extra-cmake-modules gettext pkg-config qt6-base qt6-tools
 kf6-kconfig kf6-kcmutils"
makedepends="qt6-base-devel qt6-tools-devel kf6-kconfig-devel
 kf6-kconfigwidgets-devel kf6-kcoreaddons-devel kf6-kcrash-devel
 kf6-kglobalaccel-devel kf6-ki18n-devel kf6-kio-devel kf6-kservice-devel
 kf6-knotifications-devel kf6-kservice-devel kf6-kwidgetsaddons-devel
 kf6-kwindowsystem-devel kf6-kguiaddons-devel kf6-kcmutils-devel
 kf6-kdecoration-devel kwin-devel kwin-x11-devel"
depends="plasma-desktop>=6.5.0"
short_desc="Plasma 6 blur effect with additional features"
maintainer="Cass Spencer <casscardboard@gmail.com>"
license="GPL-3.0-or-later"
homepage="https://github.com/xarblu/kwin-effects-better-blur-dx"
distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
checksum=42152f040434f0adfef55eab510000a5fc00b0afe1935e0dc6f01c766b4c9dbb

post_configure() {
	configure_args+=" -DBETTERBLUR_X11=ON"
	cmake_builddir=build-x11 do_configure
}

post_build() {
	cmake_builddir=build-x11 do_build
}

post_install() {
	cmake_builddir=build-x11 do_install
}

better-blur-dx-x11_package() {
	depends="plasma-desktop>=6.5.0"
	short_desc+=" - X11 version"
	pkg_install() {
		vmove usr/lib/qt6/plugins/kwin-x11
	}
}
