#!/usr/bin/make -f

export GEM2DEB_TEST_RUNNER = --check-dependencies
export DH_RUBY = --gem-install
export DH_RUBY_GEM_INSTALL_EXCLUDE = doc/*

%:
	dh $@ --buildsystem=ruby --with ruby

override_dh_auto_clean:
	dh_auto_clean
	rm -rf doc

override_dh_auto_build:
	dh_auto_build
	# build documentation
	rdoc --main=README.md --exclude=commands lib
	rm -f doc/js/*.js.gz

override_dh_auto_install:
	# use utf-8 locale so test cases work
	LC_ALL=C.UTF-8 dh_auto_install

override_dh_installchangelogs:
	dh_installchangelogs HISTORY.md