#!/usr/bin/make -f

export DH_VERBOSE = 1
export DH_RUBY

%:
	dh $@ --buildsystem=ruby

update_manpage:
	# generate nom.1 manpage
	# needs to be called manually whenever nom --help changes output
	RUBYLIB=debian/nom/usr/lib/ruby/vendor_ruby/ \
	help2man --name "$$(grep '^Description: ' debian/control|cut -d ' ' -f2-)" \
	--section 1 --source "autogenerated from nom help" \
	--version-string "nom" --no-info \
	./bin/nom | sed -s "s#$$HOME#\\\(ti#g" > debian/nom.1
	# the sed is needed to not leak $$HOME into the manpage
