#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
export DH_VERBOSE = 1

TMP       = $(CURDIR)/debian/tmp
BUILD     = $(CURDIR)/debian/build

%:
	dh $@ 

#override_dh_auto_configure:
#	dh_auto_configure -- #	-DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)

override_dh_auto_build:
	perl6 bootstrap.pl --prefix=$(BUILD)
	find $(BUILD) -name *.bat -delete
	pod2man debian/panda.pod > debian/panda.1
	rm -rf $(BUILD)/lib/.precomp

override_dh_install:
	mkdir -p $(TMP)/usr/share/perl6/
	cp -pr $(BUILD)/lib $(TMP)/usr/share/perl6/
	cp -pr $(BUILD)/bin $(TMP)/usr/
	dh_install

override_dh_clean:
	rm -rf $(BUILD)

