#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

main_package=latexml

%:
	dh $@ --with tex

override_dh_auto_build:
	# Add here commands to compile the package.
	perl Makefile.PL INSTALLDIRS=vendor NOMKTEXLSR=1
	$(MAKE)

	touch build-stamp

override_dh_auto_install:
	$(MAKE) pure_install INSTALLDIRS=vendor DESTDIR=`pwd`/debian/$(main_package) \
	INSTALLTEXMFDIR=/usr/share/texmf/tex/latex/latexml
	# install documentation file
	# mkdir -p debian/latexml/usr/share/texmf/doc/latexml
	# cp manual.pdf debian/latexml/usr/share/texmf/doc/latexml/
	find debian/latexml -type f -name .packlist | xargs rm -f

# Build architecture-independent files here.
override_dh_compress:
	dh_compress -X.pdf
