#!/usr/bin/make -f

DTMP=debian/hotot

%:
	dh $@ --with python2

override_dh_auto_install:
	dh_auto_install -- --install-lib=/usr/share/hotot
	# rename the binary instead of using --install-scripts (due to name conflict)
	mv ${DTMP}/usr/bin/hotot ${DTMP}/usr/share/hotot/run
	# make use of packaged libjs-jquery
	-rm -f ${DTMP}/usr/share/hotot/js/jquery.js
	# don't ship unused .mo files
	-rm -rf ${DTMP}/usr/share/locale

override_dh_fixperms:
	chmod 644 ${DTMP}/usr/share/hotot/ext/ext.js
	chmod 644 ${DTMP}/usr/share/hotot/js/conf.js
	chmod 644 ${DTMP}/usr/share/hotot/ext/org.hotot.imageupload/entry.js
	chmod 644 ${DTMP}/usr/share/hotot/ext/org.hotot.stat/entry.js
	chmod 644 ${DTMP}/usr/share/hotot/image/ic_*.png
	dh_fixperms

override_dh_auto_clean:
	-rm -rf build/
	-rm -f po/hotot.pot
	dh_auto_clean
