#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS= hardening=+all

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

override_dh_auto_configure:
	ln -s . paths
	# the following command line generates a paths.h file with patched CMakeLists.txt
	set -e; mkdir build; cd build; cmake ..; cp paths.h ..; cd ..; rm -rf build;
	dh_auto_configure

override_dh_auto_clean:
	-$(RM) -rf paths.h 5.1-torch-paths 5.2-torch-paths debian/trash paths
	dh_auto_clean
