#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE = 1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# Possible overlinkage.
# see: https://github.com/OpenShot/libopenshot/issues/38
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

%:
	dh $@ --with python3

override_dh_auto_configure:
	dh_auto_configure -- \
		-DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" \
		-DUSE_SYSTEM_JSONCPP=ON \
		-DDISABLE_TESTS=1

override_dh_auto_build-indep:
ifeq (,$(findstring nodoc,$(DEB_BUILD_PROFILES)))
	dh_auto_build -- doc
endif

override_dh_auto_test-indep:

override_dh_auto_install-indep:

override_dh_installdocs-indep:
ifeq (,$(findstring nodoc,$(DEB_BUILD_PROFILES)))
	dh_installdocs --indep
	dh_doxygen --indep
endif

override_dh_strip:
	dh_strip --no-automatic-dbgsym
