#!/usr/bin/make -f

%:
	dh $@  --buildsystem=golang --with=golang --sourcedirectory=go --builddirectory=_build
	dh $@ --buildsystem=ruby --with ruby

override_dh_clean:
	dh_clean
	## Remove Files-Excluded (when built from checkout or non-DFSG tarball):
	$(RM) -rv `perl -0nE 'say $$1 if m{^Files\-Excluded\:\s*(.*?)(?:\n\n|Files:|Comment:)}sm;' debian/copyright`
	-find go/vendor -mindepth 1 -type d -empty -delete -printf 'removed %p\n'

override_dh_auto_install:
	dh_auto_install
	mkdir -p debian/gitlab-shell/usr/share/gitlab-shell
	mv debian/gitlab-shell/usr/bin debian/gitlab-shell/usr/share/gitlab-shell
