#!/usr/bin/make -f

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

# see https://cgit.freedesktop.org/libreoffice/core/commit/?id=fabad007c60958f2ff87e8f636ff6a798ad1f963
ifeq "$(shell dpkg --compare-versions `pkg-config --modversion icu-i18n` ge 59 && echo true)" "true"
        export DEB_CXXFLAGS_MAINT_APPEND := -DUCHAR_TYPE=uint16_t
endif
export DPKG_EXPORT_BUILDFLAGS=y
include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/buildflags.mk

CONFIGURE_FLAGS = --disable-werror --enable-static

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- $(CONFIGURE_FLAGS) --docdir=/usr/share/doc/libwpd-doc
