#!/usr/bin/make -f
# -*- makefile -*-

include /usr/share/dpkg/architecture.mk
export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed

# do not strip
export SFLAGS=
# build with verbose output
export VERBOSE=1
# install into multiarch libdir
export LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
# disable check's timeout funtionality
export CK_DEFAULT_TIMEOUT=0
# use little endian mo files everywhere
export MSGFMTFLAGS=--endianness little
# do not use colors
export COLOR=0

%:
	dh $@

override_dh_auto_test-arch:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	xvfb-run -a $(MAKE) test
endif

override_dh_auto_build-indep:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	$(MAKE) doc
	find doc/build/html -name *.md5 -delete
endif

override_dh_auto_test-indep override_dh_auto_install-indep:
	# no tests and install for indep
