#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

export DEB_CPPFLAGS_MAINT_APPEND = -I/usr/include/postgresql
# avoid build failure with TZ=Etc/GMT+12
export TZ = UTC

override_dh_auto_test:
ifneq ($(DEB_HOST_ARCH_OS),hurd)
	$(MAKE) test LDFLAGS+=-L.libs
	LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):.libs pg_virtualenv ./test ""
endif

override_dh_missing:
	dh_missing -X.la

override_dh_auto_clean:
	dh_auto_clean
	rm -f test

%:
	dh $@
