summaryrefslogtreecommitdiff
path: root/debian/rules
blob: 55b23e74c1092a813dd74c6d845949f5e1a9d674 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

## Prevent setuptools/distribute from accessing the internet.
#export http_proxy = http://127.0.9.1:9

export PYBUILD_NAME = ishtar

%:
	@dh $@ --with python3 --buildsystem=pybuild

override_dh_auto_install:
	dh_auto_install
	mkdir -p debian/tmp/usr/sbin
	mkdir -p debian/tmp/etc/ishtar
	mkdir -p debian/tmp/srv/ishtar

override_dh_auto_test:
	sudo -u postgres psql -c 'DROP DATABASE IF EXISTS "ishtar-setup-test";'
	sudo -u postgres psql -c 'DROP DATABASE IF EXISTS "test_ishtar-setup-test";'
	sudo -u postgres psql -c 'DROP ROLE IF EXISTS "ishtar-setup-test";'
	# superuser needed to create postgis extension...
	sudo -u postgres createuser --superuser ishtar-setup-test
	sudo -u postgres psql -c "ALTER USER \"ishtar-setup-test\" WITH PASSWORD 'ishtar-setup-test';"
	sudo -u postgres createdb -O ishtar-setup-test ishtar-setup-test
	dh_auto_test