#!/usr/bin/make -f
# SPDX-License-Identifier: LGPL-2.0-or-later
# SPDX-FileCopyrightText: 2023 Jonathan Riddell <jr@jriddell.org>

%:
	dh $@ --with kf6 --buildsystem kf6

override_dh_auto_configure:
	dh_auto_configure -- -DCMAKE_CXX_STANDARD=23 -DCMAKE_CXX_STANDARD_REQUIRED=TRUE


override_dh_installdeb:
	# make sure dir exists
	mkdir -p debian/kwin-wayland/DEBIAN
	# sed in our multiarch path
	sed 's|@DEB_HOST_MULTIARCH@|$(DEB_HOST_MULTIARCH)|g' debian/kwin-wayland.postinst.in > debian/kwin-wayland/DEBIAN/postinst
	# ensure the postinst is executable
	chmod 755 debian/kwin-wayland/DEBIAN/postinst
	dh_installdeb
