#!/usr/bin/make -f

#export DH_VERBOSE = 1

export HOME=$(CURDIR)/debian/fakehome

%:
	dh $@

override_dh_auto_build:
	cd components && yarnpkg
	cp -r debian/vendor/* components/node_modules
	dh_auto_build
	mkdir -p debian/defectdojo/var/lib/defectdojo
	echo "uwsgi_pass uwsgi_server;" > debian/defectdojo/var/lib/defectdojo/uwsgi_pass
	echo "server uwsgi:3031;" > debian/defectdojo/var/lib/defectdojo/uwsgi_server

override_dh_install:
	dh_install -Xnpmignore -Xeslintrc -X~ -Xgitmodules -Xgitattributes -Xgitignore
	sha256sum debian/defectdojo/usr/lib/defectdojo/dojo/settings/settings.dist.py | cut -d ' ' -f1 > debian/defectdojo/usr/lib/defectdojo/dojo/settings/.settings.dist.py.sha256sum
