#!/usr/bin/make -f
export DH_VERBOSE=1
export DEB_BUILD_OPTIONS += noautodbgsym

export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=+lto
export LLVM_INSTALL_DIR := $(shell llvm-config-19 --prefix)

include /opt/3rdp4r7yr3p0/qt6.10/env.mk

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

override_dh_auto_configure:
	dh_auto_configure -- \
		-DCMAKE_INSTALL_PREFIX=/opt/3rdp4r7yr3p0/qt6.10 \
		-DCMAKE_MESSAGE_LOG_LEVEL=STATUS

override_dh_auto_build:
	dh_auto_build -- docs

override_dh_auto_install:
	DESTDIR=$(CURDIR)/debian/tmp dh_auto_build -- install_docs
	find $(CURDIR)/debian/tmp/opt/3rdp4r7yr3p0/qt6.10/share/doc -type f -name *.index -exec \
        sed -i 's@$(CURDIR)/@@g' {} \;

override_dh_missing:
	dh_missing -X.tags
