#!/usr/bin/make -f

#export DH_VERBOSE=1

export CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
export CFLAGS   := $(shell dpkg-buildflags --get CFLAGS)
export LDFLAGS  := $(shell dpkg-buildflags --get LDFLAGS)

%:
	dh $@ --with autoreconf --parallel

override_dh_auto_configure:
	dh_auto_configure -- \
	    --enable-static \
	    --disable-fd-passing \
	    --infodir=/usr/share/info \
	    --with-gpg=/usr/bin/gpg \
	    --with-gpgsm=/usr/bin/gpgsm \
	    --with-gpgconf=/usr/bin/gpgconf

override_dh_auto_test:
	dh_auto_test --max-parallel=1

override_dh_install:
	dh_install --list-missing -X.la -Xinfo/dir

override_dh_installdocs:
	dh_installdocs -A

override_dh_makeshlibs:
	dh_makeshlibs -V

override_dh_clean:
	dh_clean tests/gpg/*.gpg
