+common-build-indep:: debian/postgresql.conf.invirt
+
+debian/postgresql.conf.invirt: debian/transform_postgresql.conf.invirt
+ set -e; \
+ export invirt_tmp="$$(mktemp -dt invirt-database.XXXXXX)"; \
+ chmod a+rwx "$$invirt_tmp"; \
+ PG_CLUSTER_CONF_ROOT="$$invirt_tmp/etc/postgresql" \
+ LC_ALL=en_US.UTF-8 \
+ pg_createcluster 8.3 main \
+ --datadir="$$invirt_tmp/var/lib/postgresql/8.3/main" \
+ --socketdir=/var/run/postgresql \
+ --port=5432; \
+ chmod +x $<; \
+ $< < "$$invirt_tmp/etc/postgresql/8.3/main/postgresql.conf" > $@; \
+ rm -rf "$$invirt_tmp"
+
+clean::
+ rm -rf invirt.database.egg-info
+ rm -f debian/postgresql.conf.invirt