Update changelog
[invirt/packages/invirt-database.git] / debian / rules
1 #!/usr/bin/make -f
2
3 DEB_PYTHON_SYSTEM=pysupport
4
5 DEB_DIVERT_EXTENSION = .invirt
6
7 DEB_DIVERT_FILES_invirt-database-server += \
8         /etc/postgresql/8.3/main/postgresql.conf.invirt \
9         /etc/init.d/postgresql-8.3.invirt
10
11 include /usr/share/cdbs/1/rules/debhelper.mk
12 include /usr/share/cdbs/1/class/python-distutils.mk
13 include /usr/share/cdbs/1/rules/config-package.mk
14
15 common-build-indep:: debian/postgresql.conf.invirt
16
17 debian/postgresql.conf.invirt: debian/transform_postgresql.conf.invirt
18         set -e; \
19         export invirt_tmp="$$(mktemp -dt invirt-database.XXXXXX)"; \
20         chmod a+rwx "$$invirt_tmp"; \
21         PG_CLUSTER_CONF_ROOT="$$invirt_tmp/etc/postgresql" \
22             LC_ALL=en_US.UTF-8 \
23             pg_createcluster 8.3 main \
24             --datadir="$$invirt_tmp/var/lib/postgresql/8.3/main" \
25             --socketdir=/var/run/postgresql \
26             --port=5432; \
27         chmod +x $<; \
28         $< < "$$invirt_tmp/etc/postgresql/8.3/main/postgresql.conf" > $@; \
29         rm -rf "$$invirt_tmp"
30
31 clean::
32         rm -rf invirt.database.egg-info
33         rm -f debian/postgresql.conf.invirt