#!/usr/bin/make -f

export DH_GOLANG_INSTALL_EXTRA = emoji.json

%:
	dh $@ --builddirectory=_build --buildsystem=golang

execute_before_dh_auto_build:
	# Repository URL change in go.mod not in this release, this
	# will be removed when the package is updated to the the next
	# tagged release
	sed \
		-e 's/taiite/delthas/' \
		-i `find . -name '*.go'`

execute_before_dh_installman:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	mkdir debian/tmp
	scdoc < doc/senpai.1.scd > debian/tmp/senpai.1
	scdoc < doc/senpai.5.scd > debian/tmp/senpai.5
endif

override_dh_auto_install:
	dh_auto_install -- --no-source
