#!/usr/bin/make -f

export PYBUILD_DESTDIR_python3=debian/tryton-server
# Run tests on sqlite memory database
# For the complete test suites refer to http://tests.tryton.org/
export TRYTOND_DATABASE_URI=sqlite://
export DB_NAME=:memory:

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

override_dh_auto_clean:
	dh_auto_clean
	rm -rf build

override_dh_auto_build:
	dh_auto_build
	sphinx-build -C doc build/html


override_dh_installinit:
	dh_installinit --name=tryton-server --restart-after-upgrade --update-rcd-params='defaults 21'
	dh_installinit --name=tryton-server-cron --restart-after-upgrade --no-enable
	dh_installinit --name=tryton-server-worker --restart-after-upgrade --no-enable
	dh_installsystemd --name=tryton-server
	dh_installsystemd --name=tryton-server-cron@ --no-enable
	dh_installsystemd --name=tryton-server-worker@ --no-enable
