#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --parallel --with autoreconf --builddirectory=build

override_dh_install:
	chrpath -d $(CURDIR)/debian/tmp/usr/bin/*
	chrpath -d $(CURDIR)/debian/tmp/usr/lib/*/libykpiv.so.*
	chrpath -d $(CURDIR)/debian/tmp/usr/lib/*/libykcs11.so.*
	find debian/tmp -name \*.la -delete
	find debian/tmp -name libykcs11.a -delete
	find debian/tmp -name ykcs11-version.h -delete
	dh_install --fail-missing

override_dh_auto_configure:
	dh_auto_configure -- --disable-silent-rules
