#!/usr/bin/make -f
#export DH_VERBOSE=1
#
# Uncomment to ignore all test failures (but the tests will run anyway)
#export DH_RUBY_IGNORE_TESTS=all
#
# Uncomment to ignore some test failures (but the tests will run anyway).
# Valid values:
#export DH_RUBY_IGNORE_TESTS=ruby1.9.1 ruby2.0 require-rubygems
#
# If you need to specify the .gemspec (eg there is more than one)
#export DH_RUBY_GEMSPEC=gem.gemspec

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

override_dh_auto_install:
	if grep '# Use ruby extconf.rb to generate makefile' ext/fcgi/Makefile; then mv ext/fcgi/Makefile ext/fcgi/Makefile.dummy; fi
	dh_auto_install -O--buildsystem=ruby

override_dh_auto_clean:
	# restore included dummy makefile
	if grep '# Use ruby extconf.rb to generate makefile' ext/fcgi/Makefile; then mv ext/fcgi/Makefile ext/fcgi/Makefile.dummy; fi
	dh_auto_clean -O--buildsystem=ruby
	if test -f ext/fcgi/Makefile.dummy; then mv ext/fcgi/Makefile.dummy ext/fcgi/Makefile; fi
