#!/usr/bin/make -f

NULL=

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

DEB_CMAKE_EXTRA_FLAGS = \
    -DENABLE_TESTS=ON \
    -DENABLE_COVERAGE=OFF \
    -DCMAKE_INSTALL_PREFIX=/usr \
    $(NULL)

ifeq ($(shell dpkg-vendor --is Debian && echo yes),yes)
DEB_CMAKE_EXTRA_FLAGS += \
    -DENABLE_LOMIRI_FEATURES=ON \
    $(NULL)
endif

%:
	dh $@ --with gir

override_dh_auto_configure:
	dh_auto_configure -- \
		$(DEB_CMAKE_EXTRA_FLAGS)
		$(NULL)

override_dh_missing:
	dh_missing --fail-missing

#override_dh_installchangelogs:
#	dh_installchangelogs NEWS

get-orig-source:
	uscan --noconf --force-download --rename --download-current-version --destdir=..
