#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

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

CONFIGURE_OPTS = -Denable-bgets-workaround=false -Denable-fuzzing=false -Denable-old-api=false -Denable-utf8=true

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
CONFIGURE_OPTS += -Denable-tests=true
endif

ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
CONFIGURE_OPTS += -Denable-docs=true
endif

override_dh_auto_configure:
	dh_auto_configure --buildsystem=meson+ninja -- $(CONFIGURE_OPTS)
