#!/usr/bin/make -f

export PYBUILD_NAME=django-colorfield

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

override_dh_auto_clean:
	rm -f colorfield/static/jscolor/jscolor.min.js
	rm -rf colorfield/__pycache__/ tests/__pycache__/ .pybuild/
	rm -rf django_colorfield.egg-info/

override_dh_auto_make:
	uglifyjs colorfield/static/jscolor/jscolor.js > colorfield/static/jscolor/jscolor.min.js

override_dh_auto_install:
	dh_auto_install
	find debian/ -type f -name "*.html" -exec chmod 644 \{\} \;

override_dh_auto_test:
	python3 runtests.py
