#!/usr/bin/make -f

PG_INCLUDEDIR = $(shell pg_config --includedir)
PG_LIBDIR = $(shell pg_config --libdir)
PG_BINDIR = $(shell pg_config --bindir)

export POSTGRES_INCLUDE=$(PG_INCLUDEDIR)
export POSTGRES_LIB=$(PG_LIBDIR)
export DBDPG_INITDB=$(PG_BINDIR)/initdb
export LC_ALL=C

%:
	dh $@ --with perl_dbi

override_dh_auto_test:
	USER=$(shell whoami) dh_auto_test
