#!/usr/bin/make -f

config.status: configure
	dh_testdir
	./configure $(CROSS) --prefix=/usr

build: build-stamp

build-stamp: config.status 
	dh_testdir
	$(MAKE)
	touch $@

clean:
	dh_testdir
	dh_testroot
	[ ! -f Makefile ] || $(MAKE) distclean
	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_prep  
	$(MAKE) DESTDIR=$(CURDIR)/debian/task install

binary-indep: install

binary-arch: install
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdocs 
	dh_installman
	install -D -m644 scripts/bash/task_completion.sh $(CURDIR)/debian/task/etc/bash_completion.d/task
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
