#!/usr/bin/make -f

export GEM2DEB_TEST_RUNNER = --check-dependencies

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

override_dh_fixperms:
	dh_fixperms
	chmod a+x debian/ruby-github-markup/usr/lib/ruby/vendor_ruby/github/commands/pod2html
	chmod a+x debian/ruby-github-markup/usr/lib/ruby/vendor_ruby/github/commands/rest2html
