#!/usr/bin/make -f

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

# generate manpages based on --help of script itself
_ruby2man = RUBYLIB=lib help2man \
 --name "Sass compiles CSS from SASS or SCSS files" \
 --no-info --output=$2 $1 \
 || { RUBYLIB=lib $1 --help; false; }

override_dh_auto_build:
	dh_auto_build
	cp -t lib/sass VERSION VERSION_NAME
	chmod +x bin/sass bin/sass-convert bin/scss
	$(call _ruby2man,bin/sass,debian/sass.1)
	$(call _ruby2man,bin/sass-convert,debian/sass-convert.1)
	$(call _ruby2man,bin/scss,debian/scss.1)

override_dh_installchangelogs:
	dh_installchangelogs doc-src/SASS_CHANGELOG.md
