#!/usr/bin/make -f
%:
	+dh $@
override_dh_auto_build:
	$(MAKE) -C source -f $(CURDIR)/debian/GNUmakefile $(NAUGHTY)
override_dh_auto_clean:
	$(MAKE) -C source -f $(CURDIR)/debian/GNUmakefile distclean
	# Remove convenience copies to ensure we don't accidentally use them.
	rm -rf source/util/lua source/util/sqlite source/util/pcre
	rm -rf source/dat/tiles
override_dh_installdocs:
	dh_installdocs -XLICENSE
override_dh_installchangelogs:
	dh_installchangelogs docs/changelog.txt
override_dh_fixperms:
	dh_fixperms
	chgrp games	$(CURDIR)/debian/crawl/???/games/crawl
	chmod 2755	$(CURDIR)/debian/crawl/usr/games/crawl
	chmod 2775	$(CURDIR)/debian/crawl/var/games/crawl
override_dh_compress:
	dh_compress $(patsubst %,-X%.txt,$(RUNTIME_DOCS))

# These files are accessed by crawl(1) at run time and thus cannot be
# compressed.  See source/command.cc for the canonical list.
RUNTIME_DOCS = crawl_manual README aptitudes quickstart macros_guide options_guide tiles_help
