#!/usr/bin/make -f
#export DH_VERBOSE=1

DPKG_EXPORT_BUILDFLAGS=1
include /usr/share/dpkg/default.mk

%:
	dh $@

override_dh_clean:
	-$(MAKE) new
	dh_clean

override_dh_auto_install:
	$(MAKE) BINDIR=`pwd`/debian/coolmail/usr/bin MANDIR=`pwd`/debian/coolmail/usr/share/man/man1 install
	rm -rf debian/coolmail/usr/X11R6/lib
	mkdir -p debian/coolmail/etc/X11/app-defaults
	install -m644 Coolmail.ad debian/coolmail/etc/X11/app-defaults/Coolmail
	dh_installdocs README
	dh_installchangelogs README.changes
