#!/usr/bin/make -f

#export DH_VERBOSE=1

%:
	dh $@

override_dh_auto_build:
	make doc-dvi

override_dh_auto_clean:
	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

override_dh_fixperms:
	dh_fixperms
	chown -R root.root $(CURDIR)/debian/abntex/usr/share/texmf/
	chmod -R a-x+X $(CURDIR)/debian/abntex/usr/share/texmf/
