#!/usr/bin/make -f

# settings.py tries to create a local cache directory at build-time, so a home directory is required, otherwise the build fails.
export HOME=$(CURDIR)/home

PACKAGE_DIR=debian/legion/usr/share/legion
%:
	dh $@

override_dh_install:
	PYTHONPATH=$(CURDIR) python3 app/settings.py
	dh_install -X.pyc

override_dh_fixperms:
	dh_fixperms
	chmod 755 debian/legion/usr/share/legion/scripts/*
	chmod 755 debian/legion/usr/share/legion/legion.py
	chmod 644 debian/legion/usr/share/legion/app/legionLogo.txt
	chmod 644 debian/legion/usr/share/legion/wordlists/root-userpass.txt
