#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

%:
	dh $@ --with apache2,python3

override_dh_auto_install:
	pkgos-dh_auto_install --no-py2

override_dh_install:
	PYTHONPATH=$(CURDIR) oslo-config-generator --config-file=etc/panko/panko-config-generator.conf
	dh_install --fail-missing
	pkgos-fix-config-default $(CURDIR)/debian/panko-common/etc/panko/panko.conf database backend sqlalchemy
	pkgos-fix-config-default $(CURDIR)/debian/panko-common/etc/panko/panko.conf database connection \
		sqlite:////var/lib/panko/sqlite.db


ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	OS_TEST_PATH=./panko/tests/unit pkgos-dh_auto_test --no-py2
endif

override_dh_auto_clean:
	rm -rf .testrepository

override_dh_python3:
	dh_python3 --shebang=/usr/bin/python3
