#!/usr/bin/make -f
%:
	dh $@

OUTDIR=$(CURDIR)/debian/tmp

override_dh_auto_clean:

override_dh_clean:
	dh_clean
	find libs/krypto -name "*.pic.o.list" -delete
	rm -f build/OUTDIR.linux

override_dh_auto_configure:
	export OUTDIR=$(OUTDIR) ; make OUTDIR=$(OUTDIR) out ; make release dynamic

override_dh_auto_build:
	export LD_LIBRARY_PATH="$$LD_LIBRARY_PATH:$(OUTDIR)/lib"; export OUTDIR=$(OUTDIR) ; make DEB_CFLAGS="$(CFLAGS)" DEB_LDFLAGS="$(LDFLAGS)"

override_dh_auto_test:

override_dh_prep:
	dh_prep -X debian/tmp

# Remark: The following uscan command requires devscripts > 2.12.4 which is not
#         yet released at the time of this package release.  The code can be obtained
#         via
#   git clone git://tille@git.debian.org/git/users/tille/devscripts.git
#         and then use scripts/uscan.pl
get-orig-source:
	uscan --verbose --force-download --repack-compression xz
