#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all  optimize=+lto

%:
	dh $@ --buildsystem=cmake+ninja

override_dh_auto_configure:
	dh_auto_configure -- \
		--log-level=STATUS

override_dh_auto_build-indep:
	dh_auto_build -- docs

override_dh_auto_install-indep:
	DESTDIR=$(CURDIR)/debian/tmp dh_auto_build -- install_docs
	# Remove build path from index files.
	find $(CURDIR)/debian/tmp/usr/share/qt6/doc -type f -name *.index -exec \
                sed -i 's@$(CURDIR)/@@g' {} \;
