#!/usr/bin/make -f

DH_VERBOSE=1

export DH_VERBOSE=1


%:
#	dh $@ --buildsystem=lua --with lua
	dh $@

override_dh_auto_configure:
	make --no-print-directory -f /usr/share/dh-lua/make/dh-lua.Makefile.multiple configure

override_dh_auto_build:
	make --no-print-directory -f /usr/share/dh-lua/make/dh-lua.Makefile.multiple build

override_dh_auto_install:
	make --no-print-directory -f /usr/share/dh-lua/make/dh-lua.Makefile.multiple install debian/tmp

override_dh_auto_clean:
	make --no-print-directory -f /usr/share/dh-lua/make/dh-lua.Makefile.multiple clean
	rm -f debian/debhelper-build-stamp
	rm -f debian/lua-expat.substvars
	rm -f debian/lua-expat.*.debhelper
	rm -rf debian/lua-expat/
	rm -f debian/lua-expat-dev.substvars
	rm -f debian/lua-expat-dev.*.debhelper
	rm -rf debian/lua-expat-dev/
	rm -rf debian/.debhelper/
	rm -f debian/*.debhelper.log
	rm -f debian/files
	find .  \( \( \
		\( -path .\*/.git -o -path .\*/.svn -o -path .\*/.bzr -o -path .\*/.hg -o -path .\*/CVS \) -prune -o -type f -a \
	        \( -name '#*#' -o -name '.*~' -o -name '*~' -o -name DEADJOE \
		 -o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \
		 -o -name '.*.orig' -o -name .*.rej -o -name '.SUMS' \
		 -o -name TAGS -o \( -path '*/.deps/*' -a -name '*.P' \) \
		\) -exec rm -f {} + \) -o \
		\( -type d -a -name autom4te.cache -prune -exec rm -rf {} + \) \)
	rm -f *-stamp

override_dh_install:
	dh_install
	dh_lua
