#!/usr/bin/make -f
# This file is public domain.

export TZ=UTC

%:
	dh $@ --sourcedir=build/src --buildsystem=makefile

execute_before_dh_auto_clean:
	cd build/src; ln -sf gcc.mak Makefile

execute_after_dh_clean:
	rm -f build/src/Makefile

execute_before_dh_auto_build:
	cd build/src; ln -sf gcc.mak Makefile

execute_after_dh_auto_build:
	docbook-to-man debian/kosui.sgml > kosui.6
	docbook-to-man debian/kawari_encode.sgml > kawari_encode.6

override_dh_install:
	dh_install --sourcedir=build/mach/linux

execute_after_dh_installdocs:
	mv debian/kawari8/usr/share/doc/kawari8/document \
		debian/kawari8/usr/share/doc/kawari8/html
