#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

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

DEB_DH_STRIP_ARGS := --dbgsym-migration='gsasl-dbg (<< 1.8.0-9~)'
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
