#!/usr/bin/make -f
%:
	dh $@ --with python2

override_dh_fixperms:
	chmod -x debian/python-guzzle-sphinx-theme/usr/share/pyshared/guzzle_sphinx_theme/guzzle_sphinx_theme/static/fonts/*
	dh_fixperms

override_dh_installdeb:
	# Minify JS file
	rm debian/python-guzzle-sphinx-theme/usr/share/pyshared/guzzle_sphinx_theme/guzzle_sphinx_theme/static/js/bootstrap.min.js
	uglifyjs -o \
		debian/python-guzzle-sphinx-theme/usr/share/pyshared/guzzle_sphinx_theme/guzzle_sphinx_theme/static/js/bootstrap.min.js \
		debian/python-guzzle-sphinx-theme/usr/share/pyshared/guzzle_sphinx_theme/guzzle_sphinx_theme/static/js/bootstrap.js
	# Minify CSS files
	rm debian/python-guzzle-sphinx-theme/usr/share/pyshared/guzzle_sphinx_theme/guzzle_sphinx_theme/static/css/bootstrap.min.css
	rm debian/python-guzzle-sphinx-theme/usr/share/pyshared/guzzle_sphinx_theme/guzzle_sphinx_theme/static/css/bootstrap-theme.min.css
	cleancss -o \
		debian/python-guzzle-sphinx-theme/usr/share/pyshared/guzzle_sphinx_theme/guzzle_sphinx_theme/static/css/bootstrap.min.css \
		debian/missing-sources/bootstrap.css
	cleancss -o \
		debian/python-guzzle-sphinx-theme/usr/share/pyshared/guzzle_sphinx_theme/guzzle_sphinx_theme/static/css/bootstrap-theme.min.css \
		debian/missing-sources/bootstrap-theme.css
	dh_installdeb

get-orig-source:
	uscan --rename --force --verbose
