#!/usr/bin/make -f

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

%:
	dh $@ --with autoreconf

override_dh_autoreconf:
	dh_autoreconf --as-needed

override_dh_auto_configure:
	[ -f po/en.po ] || mv po/en_GB.po po/en.po
	[ -f po/es.po ] || mv po/es_ES.po po/es.po
	[ -f po/fi.po ] || mv po/fi_FI.po po/fi.po
	[ -f po/fr.po ] || mv po/fr_FR.po po/fr.po
	./configure --prefix=/usr --enable-dnotify --enable-startup-notification --enable-nls --enable-acpi-linux

override_dh_clean:
	[ -f po/en_GB.po ] || mv po/en.po po/en_GB.po 
	[ -f po/es_ES.po ] || mv po/es.po po/es_ES.po 
	[ -f po/fi_FI.po ] || mv po/fi.po po/fi_FI.po 
	[ -f po/fr_FR.po ] || mv po/fr.po po/fr_FR.po 
	dh_clean

override_dh_install:
	-rm debian/matchbox-panel/usr/bin/mb-applet-xterm-wrapper.sh
	-rm debian/matchbox-panel/usr/share/applications/mb-launcher-term.desktop
	dh_install