#!/usr/bin/make -f
# -*- makefile -*-

SRCDIR=$(CURDIR)
export USE_PGXS=1

include /usr/share/postgresql-common/pgxs_debian_control.mk
clean: debian/control
.PHONY: debian/control

override_dh_auto_build:
	+pg_buildext build $(SRCDIR) build-%v "$(CFLAGS)"

override_dh_auto_clean:
	+pg_buildext clean $(SRCDIR) build-%v
	rm -rf results/

override_dh_auto_install:
	+pg_buildext install $(SRCDIR) build-%v postgresql-%v-pgsphere

%:
	dh $@
