#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

ifeq "$(DEB_HOST_ARCH)" "sparc"
  DEB_BUILD_OPTIONS+= noopt
else ifeq "$(DEB_HOST_ARCH)" "mips"
  DEB_BUILD_OPTIONS+= noopt
else ifeq "$(DEB_HOST_ARCH)" "mipsel"
  DEB_BUILD_OPTIONS+= noopt
endif
export DEB_BUILD_OPTIONS

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

override_dh_auto_clean:
	rm -f tests/lunit.lua debian/trash debian/backup
	rm -rf debian/.dh_lua-libtool
	rm -rf 5.1-json 5.3-json 5.4-json 5.5-json jit-json
	dh_clean -O--buildsystem=lua
