#!/usr/bin/make -f

%:
	dh $@

override_dh_auto_install:
	python ./setup.py install --root=$(CURDIR)/debian/gaupol --install-lib=/usr/share/gaupol/lib/ --prefix=/usr
	# python-configobj provides these files:
	rm -f $(CURDIR)/debian/gaupol/usr/share/gaupol/lib/gaupol/gtk/conf/configobj.py*
	rm -f $(CURDIR)/debian/gaupol/usr/share/gaupol/lib/gaupol/gtk/conf/validate.py*
	# rename the binary instead of using --install-scripts (due to name conflict)
	mv $(CURDIR)/debian/gaupol/usr/bin/gaupol $(CURDIR)/debian/gaupol/usr/share/gaupol/lib/run
	dh_link /usr/share/gaupol/lib/run /usr/bin/gaupol

override_dh_installchangelogs:
	dh_installchangelogs NEWS
