#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk
export AUTOMAKE = automake-1.11
export ACLOCAL = aclocal-1.11
include /usr/share/cdbs/1/rules/autoreconf.mk
DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

DEB_DH_STRIP_ARGS = --dbg-package=gsasl-dbg
DEB_MAKE_CHECK_TARGET = check
DEB_DH_MAKESHLIBS_ARGS_libgsasl7 = -- -c4

DEB_CONFIGURE_USER_FLAGS = --disable-valgrind-tests --without-libgcrypt --with-gssapi-impl=mit
DEB_CONFIGURE_EXTRA_FLAGS = --with-packager=Debian --with-packager-version=$(DEB_VERSION) --with-packager-bug-reports=http://bugs.debian.org/ --libdir=/usr/lib/$(DEB_HOST_MULTIARCH)

common-install-arch::
	find debian/tmp/usr/lib -name "*.la" -exec \
		sed -i -e "s,^dependency_libs=.*,dependency_libs=''," {} +
	chrpath -d debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libgsasl.so.7.?.?
	chrpath -d debian/tmp/usr/bin/gsasl
