#!/usr/bin/make -f

export DH_VERBOSE=1

include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/pkg-info.mk

export DEB_BUILD_MAINT_OPTIONS := hardening=+all
export DEB_LDFLAGS_MAINT_APPEND := -fPIE -pie

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
	 -DCMAKE_BUILD_TYPE=Release \
	 -DQT_QMAKE_EXECUTABLE=/usr/lib/qt6/bin/qmake \
	 -DLRELEASE_TOOL=/usr/lib/qt6/bin/lrelease \
	 -DLUPDATE_TOOL=/usr/lib/qt6/bin/lupdate

execute_after_dh_install:
	@echo "Superfluous license file."
	-rm --verbose debian/webcamoid-data/usr/share/webcamoid/qml/License.qml

override_dh_makeshlibs:
	dh_makeshlibs -- -v$(DEB_VERSION_UPSTREAM)
