#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/default.mk

QT_SELECT = qt5
export QT_SELECT

QMAKE_ARGS = -r qcs.pro \
    "CONFIG += build64 debugger record_support release rtmidi" \
    INSTALL_DIR=/usr SHARE_DIR=/usr/share \
    "DEFAULT_CSOUND_LIBRARY_DIRS=/usr/lib/$(DEB_HOST_MULTIARCH) /usr/lib" \

%:
	dh $@

build:
	dh build

override_dh_auto_configure:
	dh_auto_configure -- $(QMAKE_ARGS)

override_dh_install-arch:
	dh_install -a

override_dh_install-indep:
	dh_install -i
	find $(CURDIR)/debian/csoundqt-examples/usr/share/csoundqt/ -type f -print0 | xargs -0 chmod 644

.PHONY: build
