#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

%:
	dh $@

# Handle the multiple README files
override_dh_auto_build:
	@find * -name README -o -iname ChangeLog | \
	while read readme; do \
	  dirname=`dirname $$readme`; \
	  dir=debian/.build/docs/$$dirname; \
	  mkdir -p $$dir; \
	  cp -v $$readme $$dir/; \
	done
	rm -rf debian/.build/docs/debian

TOP_DIR = debian/fonts-culmus-fancy
FONTS_DIR = $(TOP_DIR)/usr/share/fonts/truetype/culmus-fancy
DOC_DIR = $(TOP_DIR)/usr/share/doc/fonts-culmus-fancy
override_dh_install:
	dh_install
	# Sofar and KeterYG are included with the main culmus package:
	rm -f $(FONTS_DIR)/Shofar*.ttf $(FONTS_DIR)/KeterYG*.ttf

override_dh_installdocs:
	dh_installdocs
	rm -rf $(DOC_DIR)/Shofar $(DOC_DIR)/KeterYG
