#!/usr/bin/make -f

DEB_DH_STRIP_ARGS := --dbg-package=libgss-dbg

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk

DEB_CONFIGURE_EXTRA_FLAGS = --with-po-suffix --with-packager=Debian --with-packager-version=$(DEB_VERSION) --with-packager-bug-reports=http://bugs.debian.org/

DEB_DH_MAKESHLIBS_ARGS_libgss3 = -V'libgss3 (>= $(DEB_UPSTREAM_VERSION))'

DEB_COMPRESS_EXCLUDE := gss.pdf

# Build manual.
common-install-prehook-indep:: common-install-prehook-impl
	cd doc && $(MAKE) install-ps install-pdf install-html DESTDIR=$(DEB_DESTDIR)

# Binutils is buggy on mips(el) see <http://bugs.debian.org/519006>,
# so we have to disable self-tests.
DEB_HOST_ARCH  ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
ifeq (,$(filter $(DEB_HOST_ARCH),mips mipsel))
  DEB_MAKE_CHECK_TARGET = check
endif
