#!/usr/bin/make -f

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

# Hardening
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

ifeq ($(DEB_HOST_ARCH), mips64el)
  DEB_LDFLAGS_MAINT_APPEND += -flto-partition=none
endif
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

%:
	dh $@ -Scmake

override_dh_auto_configure:
	dh_auto_configure -- -DBUILD_HANDBOOK_PDF=OFF -DBUILD_HOWTO_PDF=OFF

# This works around #1043811 and might be fixed with any new release
override_dh_auto_build:
	cp i18n/howto/howto-pt_BR.po .
	dh_auto_build
	mv howto-pt_BR.po i18n/howto/

override_dh_auto_test:
	echo "Skip dh_auto_test because the tests rely on a display which is not there"
