#!/usr/bin/make -f

export CFLAGS += -fPIC 

%:
	dh $@

override_dh_auto_install:
	$(MAKE) PREFIX=$(CURDIR)/debian/fillmore/usr install-fillmore
	$(MAKE) PREFIX=$(CURDIR)/debian/lombard/usr install-lombard

	-rm -f $(CURDIR)/debian/lombard/usr/share/lombard/resources/fillmore*
	-rm -f $(CURDIR)/debian/lombard/usr/share/lombard/resources/dot.png
	-rm -f $(CURDIR)/debian/lombard/usr/share/lombard/resources/*_speaker.png
	-rm -f $(CURDIR)/debian/fillmore/usr/share/fillmore/resources/lombard*

	-rm -f $(CURDIR)/debian/*/usr/share/mime/*
	-rm -rf $(CURDIR)/debian/*/usr/share/mime/text
	-rm -rf $(CURDIR)/debian/*/usr/share/mime/application
	-rm -f $(CURDIR)/debian/*/usr/share/icons/hicolor/icon-theme.cache

override_dh_installchangelogs:
	dh_installchangelogs NEWS

override_dh_installman:
	dh_installman -pfillmore $(CURDIR)/debian/fillmore.1
	dh_installman -plombard $(CURDIR)/debian/lombard.1
