#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes), yes)
	SUBSTVARS = -Vdist:Depends="python-appindicator"
else
	SUBSTVARS = -Vdist:Depends=""
endif

%:
	dh $@ --with python2

override_dh_auto_install:
	dh_auto_install
	find debian/glipper/usr/share/help/C/glipper/ -type d -empty -delete
	find debian/glipper/usr/share/help/de/glipper/ -type d -empty -delete
	find debian/glipper/usr/share/help/fr/glipper/ -type d -empty -delete
	find debian/glipper/usr/share/help/it/glipper/ -type d -empty -delete

override_dh_auto_clean:
	dh_auto_clean
	rm -rf build

override_dh_gencontrol:
	dh_gencontrol -- $(SUBSTVARS)
