#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DEB_CONFIGURE_EXTRA_ARGS := \
	--enable-gcrypt \
	$(NULL)

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- $(DEB_CONFIGURE_EXTRA_ARGS)

override_dh_auto_install:
	dh_auto_install

	mkdir -p debian/libpam-ccreds/usr/share/pam-configs
	install -m 0644 debian/libpam-ccreds.pam-auth-update.ccreds-save \
		debian/libpam-ccreds/usr/share/pam-configs/ccreds-save
	install -m 0644 debian/libpam-ccreds.pam-auth-update.ccreds-check \
		debian/libpam-ccreds/usr/share/pam-configs/ccreds-check

execute_after_dh_fixperms:
	chmod 4755 debian/libpam-ccreds/usr/sbin/ccreds_chkpwd

