#!/usr/bin/make -f

# Set temporary HOME for lazarus primary config directory
export HOME=$(CURDIR)/tmphome

%:
	dh $@

override_dh_auto_build:
	lazbuild source/ddrescueview.lpi --bm="GNU/Linux Release" --no-write-project

override_dh_auto_install:
	# Fix some permissions
	chmod -x $(CURDIR)/resources/linux/*
	dh_auto_install

override_dh_clean:
	# Clean up temporary HOME
	rm -rf $(CURDIR)/tmphome
	dh_clean
