#!/usr/bin/make -f

#export DH_VERBOSE=1

# Ensure texlive respects SOURCE_DATE_EPOCH
export FORCE_SOURCE_DATE=1

%:
	dh $@

override_dh_auto_build:
	make doc-dvi

execute_after_dh_auto_clean:
	rm -rf compiled.docs

override_dh_auto_install:
	dh_installdirs
	cp -r texmf debian/abntex/usr/share/
	mv $(CURDIR)/debian/abntex/usr/share/texmf/doc $(CURDIR)/debian/abntex/usr/share/doc/abntex
	mv $(CURDIR)/compiled.docs/*.dvi $(CURDIR)/debian/abntex/usr/share/doc/abntex

execute_after_dh_fixperms:
	chmod -R a-x+X $(CURDIR)/debian/abntex/usr/share/texmf/
