#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -llua5.4-cjson

%:
	dh $@

DEB_CONFIGURE_EXTRA_FLAGS = --external=y --verbose

build-indep:
	# pass

override_dh_auto_configure:
	dh_auto_configure -- $(DEB_CONFIGURE_EXTRA_FLAGS)

override_dh_auto_build:
	dh_auto_build -- VERBOSE=1

execute_after_dh_install:
	rm -rf debian/xmake-data/usr/share/xmake/scripts/xpack/deb/

execute_after_dh_fixperms:
	find debian/ -type f -name update-script.sh -exec chmod 755 {} \;

execute_after_dh_auto_clean:
	find . -type f -name ".gitignore" -exec rm -f {} \;
