#!/usr/bin/make -f
#export DH_VERBOSE=1

%:
	dh $@

pkg_perl = xmlformat-perl
pkg_ruby = xmlformat-ruby
pkg_doc  = xmlformat-doc

override_dh_install:
	dh_install -p$(pkg_perl) xmlformat.pl usr/bin
	dh_install -p$(pkg_ruby) xmlformat.rb usr/bin
	# rename:
	mv $(CURDIR)/debian/xmlformat-perl/usr/bin/xmlformat.pl $(CURDIR)/debian/xmlformat-perl/usr/bin/xmlformat
	mv $(CURDIR)/debian/xmlformat-ruby/usr/bin/xmlformat.rb $(CURDIR)/debian/xmlformat-ruby/usr/bin/xmlformat

override_dh_installman:
	dh_installman -p$(pkg_perl) debian/xmlformat.1
	dh_installman -p$(pkg_ruby) debian/xmlformat.1

override_dh_auto_build-indep:
	$(MAKE) dist-prep

override_dh_compress:
	dh_compress -X.pdf

# ruby and perl use the same interface:
debian/xmlformat.1: debian/xmlformat.1.in
	help2man --include=debian/xmlformat.1.in \
		--output=$@ --no-info xmlformat

get-orig-source:
	uscan --verbose --force-download --rename
