#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

%:
	dh $@ --with bash-completion

override_dh_auto_configure:
	ROOTSBINDIR=/usr/sbin dh_auto_configure -- --enable-cifsidmap --enable-cifscreds --with-libcap-ng=auto --enable-pam --with-pamdir=/usr/lib/$(DEB_HOST_MULTIARCH)/security

override_dh_auto_install-indep:
override_dh_auto_install-arch:
	dh_auto_install
	sed -e 's/__DEB_HOST_MULTIARCH__/$(DEB_HOST_MULTIARCH)/g' <debian/postinst.in > debian/postinst
	sed -e 's/__DEB_HOST_MULTIARCH__/$(DEB_HOST_MULTIARCH)/g' <debian/prerm.in > debian/prerm

override_dh_fixperms:
	dh_fixperms
	chmod u+s debian/cifs-utils/usr/sbin/mount.cifs

override_dh_auto_clean-indep:
override_dh_auto_clean-arch:
	rm -f debian/postinst debian/prerm
